Questions about On Demand Resources

Hi,Apple I am using On Demand Resources Technology introduced in WWDC 2015 (https://developer.apple.com/videos/play/wwdc2015/214/%EF%BC%89 I have some questions above: 1.I tagged some Resources as "Prefetch tag order". Are these "Prefetch tag order" resources downloaded automatically by iOS system immediately once App is installed?Even though App was not launched by users finger? 2.To download "Prefetch tag order" resources, Does Developer need write specific codes to invoke ? 3.To upload our App(one ipa package)To App Store,we use Transporter,not Xcode Archive.How do we upload our On Demand Resources propertyly?At the beginning,We set EMBED_ASSET_PACKS_IN_PRODUCT_BUNDLE to YES,and all the On-Demand resources was packed into ipa file.but two errors were reported by you system,like this:ERROR ITMS-90047: "Disallowed paths ( "OnDemandResources" ) found at: Payload/wework.app." and ERROR ITMS-90047: "Disallowed paths [wework.app/AssetPackManifest.plist] found at: Payload/wework.app.".Then,We set EMBED_ASSET_PACKS_IN_PRODUCT_BUNDLE to NO,this time,no error was reported,but On-Demand resources were missing and there is no way to download them.How do I upload both App and On-Demand resources propertyly?

Thank you so much

Replies

Are these "Prefetch tag order" resources downloaded automatically by iOS system immediately once App is installed?Even though App was not launched by users finger? 2.To download "Prefetch tag order" resources, Does Developer need write specific codes to invoke ?

These questions are answered in the documentation.

To App Store,we use Transporter,not Xcode Archive.How do we upload our On Demand Resources propertyly?

How do you create the .ipa file?

How do you create the .ipa file?

we use a bash shell script on mac machine,like: $XCODE_PATH -project src/ios/wework.xcodeproj -target "$TARGET" $CONFIGURATION -sdk $SDK CONFIGURATION_BUILD_DIR=$BUILD_FOLDER -parallelizeTargets -jobs 8 $BUILD_SETTING for these variants: $XCODE_PATH is xcodebuild binary file path on this mac,TARGET is our App's name,CONFIGURATION maybe release or AppStore which is predefined in Xcode project,$SDK is iphoneos13.2,$BUILD_FOLDER is builded result files directory,$BUILD_SETTING is some setting about signature or entilements

and then,zip all the results files into a ipa package.

and then,zip all the results files into a ipa package.

I see — that's not a supported method of packing your app for distribution. I wanted to know if you just weren't using the Archive menu item in Xcode but were on the command line, or if your command line was doing something else, as is here.

The supported method for packaging an app for distribution is through the archive process. This is true for all scenarios, even if On-Demand Resources weren't involved. Your commands to build need to follow this recipe:

xcodebuild archive -project <PathTo>.xcodeproj -scheme <SchemeName> -archivePath <PathToPutArchive>
xcodebuild -exportArchive -archivePath <PathToArchiveFromAbove>.xcarchive -exportPath <PathToExportTo> -exportOptionsPlist <PathToPlist>

The contents of the export options plist is key, and the options are documented under xcodebuild -help. If you archive and export for the App Store in Xcode, you’ll also get a copy of the plist file you can use for the command line builds as a starting point.

Make sure that all build settings for On-Demand Resources are reset to their default values, such as the EMBED_ASSET_PACKS_IN_PRODUCT_BUNDLE default of NO.