[英]Add static file to Resource folder with ionic in XCode project
[英]Xcode add resource files from folder or with wildcard
我有一個跨越 2 個平台的項目:一個項目在 linux/ubuntu 上,另一個在 mac/iOS 上。
我想要實現的是將我的 linux 安裝程序 package (.deb 文件)嵌入到我的 iOS 應用程序資源中。 It's a long story why I want to do this, but basically my iOS app will be communicating with my linux app on some external hardware and so I want my iOS app to be able to update the app on my linux hardware (I already know how進行通信和更新步驟)。
我還將使用 CI(在我的例子中是 Jenkins)設置我的項目來自動構建我的項目。 So I want to be able to automate the process of 1) creating the linux.deb package installer, 2) move the.deb package installer over to the iOS project, 3) build the iOS project and have the.deb package stored in my iOS 建成項目。
我遇到的問題是 my.deb 文件名會在每個構建版本中更改。 例如,我的 deb package 在一次構建中可能被命名為“MyLinuxApp_x86_64_v1.0.1234.deb”,但在下一個構建中將被命名為“MyLinuxApp_x86_64_v1.0.1235.deb”。
所以我的問題是,有沒有辦法將我的 XCode 項目設置為:
需要明確的是,我知道每次文件名更改時如何“手動”添加此文件,但我需要一種方法來自動化它。
感謝您的任何幫助,您可以提供。
是的,您可以使用通配符,但您應該確保您的源目錄中只有一個文件匹配。
將此添加為構建步驟:
RESOURCE_PATH="$SRCROOT/where/ever/.../MyLinuxApp_x86_64_*.deb"
BUILD_APP_DIR=${BUILT_PRODUCTS_DIR}/${FULL_PRODUCT_NAME}
cp $RESOURCE_PATH "$BUILD_APP_DIR/BundledLinuxApp_x86_64.deb"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.