Hi. My app hits an API. I have the API key stored in a config.plist file. Of course, I don't want to include this file in version control. So I omitted it. I have a workflow that when I push to my main branch, it pushes the newest version to internal testers on test flight.
The problem is, the deployed code cannot find the config file, which makes sense.
My approach to this problem has been to use resource tags
Targets > Resource Tags
And I declared that this app should download this resource. I can't figure out how to categorize it as other than download on demand . I would like it to be downloaded immediately with the app.
Am I even on the right track here?
On demand resources
RSS for tagOn-demand resources are app contents that are hosted on the App Store and are separate from the related app bundle that you download.
Posts under On demand resources tag
10 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
Hi, I want to create an offline mode for my iOS app. Where is it better to keep files in terms of download speed: in a CDN like Cloudflare or using On-Demand Resources? The total file size is 2 GB.
As per the new App Review Guidelines, are HTML5 games provided within apps required to embed in the binary?
Given that the App Review Guidelines' section 4.7 has been updated.
When making an NSBundleResourceRequest to request resources, it works fine the first time. However, after calling endAccessingResources and making the request again, the app crashes when interacting with the page。
Xcode 15.0.1 (15A507)
iPhone Xs 17.1.2
error prompt:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'CoreUI: CGImageBlockSetRef __CUIImageProviderCopyImageBlockSetWithOptions(void *, CGImageProviderRef, CGRect, CGSize, CFDictionaryRef) unknown pixel format 0 rendition '(null)''
*** First throw call stack:
(0x197258870 0x18f57fc00 0x1967c2e54 0x1b34532c4 0x198d46128 0x198d45f84 0x198d30134 0x198d3017c 0x198d30134 0x198d2fe00 0x198d2d54c 0x198d2cae4 0x198d37bf8 0x198d37434 0x198d20390 0x198d1fd28 0x198d061bc 0x198d053c0 0x199467ca0 0x199467c50 0x199466f94 0x199466e04 0x199466d30 0x19a5bbf80 0x1993fe200 0x1993fdc74 0x1993fdb90 0x1993fd708 0x1993fd580 0x1993fd288 0x1993fd21c 0x1993fea3c 0x1993fce8c 0x1993d1c68 0x1993d1990 0x1993fffdc 0x1993ffb58 0x1993ffaa4 0x1993c2694 0x1987d81c0 0x1987d7d48 0x1987de278 0x1987d7574 0x1987d721c 0x1971a1a2c 0x1971a0434 0x19719fb50 0x19719f668 0x1da56a5ec 0x1995bc2b4 0x1995bb8f0 0x100e2e454 0x1b9bf2dcc)
libc++abi: terminating due to uncaught exception of type NSException
*** Assertion failure in CGImageBlockSetRef __CUIImageProviderCopyImageBlockSetWithOptions(void *, CGImageProviderRef, CGRect, CGSize, CFDictionaryRef)(), CUIThemeRendition.m:1,328
I create a new project just for testing on-demand resources and it works properly on real devices and iOS simulators but no luck on Mac(Designed for iPad).
The project is very simple like bellow:
NSBundleResourceRequest* request = [[NSBundleResourceRequest alloc] initWithTags:[NSSet setWithArray:@[@"A"]]];
[request beginAccessingResourcesWithCompletionHandler:^(NSError* error){
if (error != nil) {
NSLog(@"%@", error.description);
}
}];
The error I encounter on my M1 Mac is consistently: Error Domain=NSCocoaErrorDomain Code=-1 "(null)". However, I'm unsure about what steps to take to resolve this issue.
Just wondering can we test on-demand resources on apple silicon macs directly by 'Designed for iPad', or we can only test on real devices and simulators? I have read many documentations and websites but it seems like no one addresses about this.
Hi, ALL,
I'm writing a program that should operate with different DBMSes...
I'm using Xcode and test it under OSX High Sierra 10.13.6.
The compilation of my code succeeds however, when I tried to run it from Terminal, I got following:
Filed to load shared library liblibdbloader.dylib: dlopen(liblibdbloader.dylib, 2). Library not loaded: /usr/local/lib/liblibmysql.dylib.
Referenced from
Reason: image not found
At the end of the compilation I'm running a script which contains following lines:
cp -f ~/dbhandler/dbhandler/mysql-server/BuildOSX/libmysql/libmysqlclient.dylib "$TARGET_BUILD_DIR/$TARGET_NAME.app/Contents/Frameworks/libmysqlclient.dylib"
install_name_tool -id "@rpath/Frameworks/libmysqlclient.dylib" "$TARGET_BUILD_DIR/$TARGET_NAME.app/Contents/Frameworks/libmysqlclient.dylib"
cp ~/dbhandler/dbhandler/Build/Products/Debug/liblibmysql.dylib "$TARGET_BUILD_DIR/$TARGET_NAME.app/Contents/Frameworks/liblibmysql.dylib"
install_name_tool -id '@rpath/Frameworks/liblibmysql.dylib' "$TARGET_BUILD_DIR/$TARGET_NAME.app/Contents/Frameworks/liblibmysql.dylib"
install_name_tool -change "/Users/igorkorot/dbhandler/dbhandler/mysql-server/buildOSX/libmysql/libmysqlclient.21.dylib" @executable_path/../Frameworks/libmysqlclient.dylib "$TARGET_BUILD_DIR/$TARGET_NAME.app/Contents/Frameworks/liblibmysql.dylib"
install_name_tool -change "/usr/local/lib/liblibmysql.dylib" @executable_path/../Frameworks/liblibmysql.dylib "$TARGET_BUILD_DIR/$TARGET_NAME.app/Contents/Frameworks/liblibdbloader.dylib"
Trying to verify the linkage I have:
Igors-MacBook-Air:Frameworks igorkorot$ otool -L liblibmysql.dylib
liblibmysql.dylib:
@rpath/Frameworks/liblibmysql.dylib (compatibility version 1.0.0, current version 1.0.0)
@executable_path/../Frameworks/libmysqlclient.dylib (compatibility version 21.0.0, current version 21.0.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 400.9.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4)
Igors-MacBook-Air:Frameworks igorkorot$ otool -L libmysqlclient.dylib
libmysqlclient.dylib:
@rpath/Frameworks/libmysqlclient.dylib (compatibility version 21.0.0, current version 21.0.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 400.9.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4)
Igors-MacBook-Air:Frameworks igorkorot$ pwd
/Users/igorkorot/dbhandler/dbhandler/Build/Products/Debug/dbhandler.app/Contents/Frameworks
Igors-MacBook-Air:Frameworks igorkorot$
I don't understand why the linker still trying to load the library from the /usr/local/lib. The library is not referencing anything from /usr/local/lib.
Can someone explain what is going on?
before use on demand resource it was enough to check TestFlight build size on App Store Connect.
but now it includes ODR size and main bundle size.
I mean it is hard to know app size reaches limit now.
How do you check main bundle size?
Hi all, we're developing the Real Money Gambling app and store our games in Apple Cloud (we use game bundles that store as Hosted on-demand resources). We know, that we have only 20Gb available space in Apple's Cloud - https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/On_Demand_Resources_Guide/PlatformSizesforOn-DemandResources.html#//apple_ref/doc/uid/TP40015083-CH23-SW1
So, we use all this 20 Gb for storing the games, we successfully pass the review and now live in Apple Store.
My question is, we want to update the app, for example we fix the minor bugs or add some new functionality into the app. We create the new build and send it for review. But when we create the new build we need to sign all games in Apple's storage with this new build and upload all the games one more time on Apple's cloud, so we rewrite the games. And what will be with the old version of the app? As I understand, the games in the old version will not be available for the user (and will be available only after he updates the app), because we deleted these games and uploaded the same games but these games will work only with the new build.
How does app update work in general if we use hosted on-demand resources (we use the full 20 Gb of storage)?
Help me please, guys.
Hey there!
We have noticed that any downloaded ODR tags (and thus resources) are purged when a user updates their app even though the ODR resources, tags, etc, have not changed between the two versions. Is there any way to prevent this?
I found this thread regarding how resources are managed between different versions of the app. I presume that the explanation provided there extends to this case. Is there a checksum mechanism that we can use to compare the downloaded resource tags with the resource tags in the update prevent the identical downloaded tags from being purged during an update?
Thanks!
Is there a solution for increasing the size of on-demand resource files to the platform maximum of 20 GB? We need to integrate more assets but are now constrained by the size constraint.