On demand resources

RSS for tag

On-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

68 Posts

Post

Replies

Boosts

Views

Activity

Change App Bundle ID
Hello Apple Forum friends. We launched an application on app store few years back and its live and running. Now we have created an upgraded version of this app independent to old app's xcode project. We have finished developing our first releasable product and are ready to publish on app store but we do not want to publish it as a separate app, instead we want to publish as an update of old app which is available on app store. These two apps now use different bundle id, so is there any possible way to publish it as an update ?
1
0
2.5k
Oct ’21
All in-app purchases are suddenly marked with a red warning sign in the App Store
My app is currently being reviewed. It is being rejected because of the error 301 (it is an "underlying error") encountered when purchasing an item through the review team. With Testflight, all purchases and restores work just fine with no such error ever occurring. I have already using 15 different sandbox account users and performed about 1000 test purchases and restores without errors. I still don't know when or why the 301 error occurs. The error only occurs when the app is in review. In any case, after the rejection message, I looked at the product list in the App Store. I noticed that all products have a red warning label: Then I changed the price for one of the products, which initially led to an error message. But after a second try the price change worked for one of the products, and all warning messages were gone: Does anyone know the reason for these warning labels? Does anyone have experience with error number 301? I am using iOS 14.5 with the target platforms iPhone / iPodTouch and as IAP: non-consumable content hosted by Apple.
1
0
1.8k
Sep ’21
URLSession can access password protected directory without credentials
I am trying to download app content from a password protected directory of a website served by Apache24. The directory is protected using the following configuration segment: <Directory "<directory path"> AuthType Basic AuthName "Restricted Content" AuthUserFile <password file path>.htpasswd Require valid-user </Directory> Here is my swift code (running on latest betas of iOS15 or macOS12) class Downloader: NSObject { lazy var downloadSession: URLSession = { // Setup configuration let configuration = URLSessionConfiguration.default configuration.allowsCellularAccess = true configuration.timeoutIntervalForResource = 60 configuration.waitsForConnectivity = true // Add authorisation header to handle credentials let user = "*****" let password = "******" let userPasswordData = "\(user):\(password)".data(using: .utf8) let base64EncodedCredential = userPasswordData!.base64EncodedString(options: Data.Base64EncodingOptions.init(rawValue: 0)) let authString = "Basic \(base64EncodedCredential)" // Add authorisation header to configuration //configuration.httpAdditionalHeaders = ["Authorization" : authString] return URLSession(configuration: configuration, delegate: self, delegateQueue: nil) }() // Download file using async/await func downloadAsync(subpath: String) async throws { let request = URLRequest(url: URL(string: "https://<server>/")!) let (data, response) = try await downloadSession.data(for: request) guard (response as? HTTPURLResponse)?.statusCode == 200 else { throw HTTPError.withIdentifier((response as! HTTPURLResponse).statusCode) } print(String(data: data, encoding: .utf8)) } } let downloader = Downloader() Task.init { do { try await downloader.downloadAsync(subpath: "<filename>") } catch { print("Unable to download file") } } As expected, if I run the code as is (with the authorisation header commented out) it does not download the file As expected, if I then uncomment the authorisation line, and run it again, it DOES download the file Here is the unexpected part (to me!): If I re-comment out the authorisation line, and run it again it STILL downloads the file This can be repeated for several minutes, before it finally refuses to download the file The issue occurs on both iOS and macOS There is a clear gap in my understanding here about what is going on, so my questions are: What is causing this behaviour? A session cookie on the client, or something on the server? Does it represented a security risk? (Could another client without credentials download the file shortly after a legitimate download) If the answer to 2 is YES, how do I stop it? Many thanks, Bill Aylward
3
0
1.7k
Sep ’21
Reference folder not working
I'm getting a question mark near my reference folder. Any idea why this would be happening?? The app builds and then spits out this error "Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value" by bundle.main.url import UIKit import WebKit class ViewController: UIViewController {     @IBOutlet weak var loadhtml: WKWebView!     override func viewDidLoad() {         super.viewDidLoad()         let webView = WKWebView()         let htmlURL = Bundle.main.url(forResource: "index", withExtension: "html", subdirectory: "FILES")!         webView.loadFileURL(htmlURL, allowingReadAccessTo: htmlURL.deletingLastPathComponent())         view = webView     }     override func didReceiveMemoryWarning() {         super.didReceiveMemoryWarning()         // dispose of any resources that can be recreated     } }
0
0
717
Aug ’21
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/) 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
3
0
1.9k
Aug ’21
Unable to pause NSBundleResourceRequest
I'm downloading resources from Itunes, using NSBundleResourceRequest. The following code is using to pause the progress. var request = NSBundleResourceRequest(tags: [tags]) self.request.beginAccessingResources { error in if let error = error { onFailure(error) } else { onSuccess() } } @IBAction func buttonPauseAction() { self.request.progress.pause() } But download is not getting paused. Please help me on this, why I'm not able to pause. any reason for this Thanks in advance.
0
0
629
Aug ’21
On-Demand Resources Update
I spent hours to read documentation and watched wwdc videos about on-demand resources and looked through tons of on-demand resources topics on stackoverflow and so, but I still don't understand how Apple stores on-demand resources for app. Does Apple store on-demand resources for each build or it has shared storage for an app? My assumptions is that one shared storage is used per app (bundle id) but I can't find any proof of that. For example: We have app(v1.0) with tag "someImage" (green image). We publish new app to Appstore (v2.0) with the same tag but with the new image(black image). App(v2.0) will use new image (black) (according to wwdc 2016 video) 1)Will App(v1.0) be using new image or it will be using old one? 2) Will App(v1.0) be working with tags & resources that were added to App(V2.0)
3
0
2.1k
Jun ’21
Change App Bundle ID
Hello Apple Forum friends. We launched an application on app store few years back and its live and running. Now we have created an upgraded version of this app independent to old app's xcode project. We have finished developing our first releasable product and are ready to publish on app store but we do not want to publish it as a separate app, instead we want to publish as an update of old app which is available on app store. These two apps now use different bundle id, so is there any possible way to publish it as an update ?
Replies
1
Boosts
0
Views
2.5k
Activity
Oct ’21
All in-app purchases are suddenly marked with a red warning sign in the App Store
My app is currently being reviewed. It is being rejected because of the error 301 (it is an "underlying error") encountered when purchasing an item through the review team. With Testflight, all purchases and restores work just fine with no such error ever occurring. I have already using 15 different sandbox account users and performed about 1000 test purchases and restores without errors. I still don't know when or why the 301 error occurs. The error only occurs when the app is in review. In any case, after the rejection message, I looked at the product list in the App Store. I noticed that all products have a red warning label: Then I changed the price for one of the products, which initially led to an error message. But after a second try the price change worked for one of the products, and all warning messages were gone: Does anyone know the reason for these warning labels? Does anyone have experience with error number 301? I am using iOS 14.5 with the target platforms iPhone / iPodTouch and as IAP: non-consumable content hosted by Apple.
Replies
1
Boosts
0
Views
1.8k
Activity
Sep ’21
URLSession can access password protected directory without credentials
I am trying to download app content from a password protected directory of a website served by Apache24. The directory is protected using the following configuration segment: <Directory "<directory path"> AuthType Basic AuthName "Restricted Content" AuthUserFile <password file path>.htpasswd Require valid-user </Directory> Here is my swift code (running on latest betas of iOS15 or macOS12) class Downloader: NSObject { lazy var downloadSession: URLSession = { // Setup configuration let configuration = URLSessionConfiguration.default configuration.allowsCellularAccess = true configuration.timeoutIntervalForResource = 60 configuration.waitsForConnectivity = true // Add authorisation header to handle credentials let user = "*****" let password = "******" let userPasswordData = "\(user):\(password)".data(using: .utf8) let base64EncodedCredential = userPasswordData!.base64EncodedString(options: Data.Base64EncodingOptions.init(rawValue: 0)) let authString = "Basic \(base64EncodedCredential)" // Add authorisation header to configuration //configuration.httpAdditionalHeaders = ["Authorization" : authString] return URLSession(configuration: configuration, delegate: self, delegateQueue: nil) }() // Download file using async/await func downloadAsync(subpath: String) async throws { let request = URLRequest(url: URL(string: "https://<server>/")!) let (data, response) = try await downloadSession.data(for: request) guard (response as? HTTPURLResponse)?.statusCode == 200 else { throw HTTPError.withIdentifier((response as! HTTPURLResponse).statusCode) } print(String(data: data, encoding: .utf8)) } } let downloader = Downloader() Task.init { do { try await downloader.downloadAsync(subpath: "<filename>") } catch { print("Unable to download file") } } As expected, if I run the code as is (with the authorisation header commented out) it does not download the file As expected, if I then uncomment the authorisation line, and run it again, it DOES download the file Here is the unexpected part (to me!): If I re-comment out the authorisation line, and run it again it STILL downloads the file This can be repeated for several minutes, before it finally refuses to download the file The issue occurs on both iOS and macOS There is a clear gap in my understanding here about what is going on, so my questions are: What is causing this behaviour? A session cookie on the client, or something on the server? Does it represented a security risk? (Could another client without credentials download the file shortly after a legitimate download) If the answer to 2 is YES, how do I stop it? Many thanks, Bill Aylward
Replies
3
Boosts
0
Views
1.7k
Activity
Sep ’21
Reference folder not working
I'm getting a question mark near my reference folder. Any idea why this would be happening?? The app builds and then spits out this error "Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value" by bundle.main.url import UIKit import WebKit class ViewController: UIViewController {     @IBOutlet weak var loadhtml: WKWebView!     override func viewDidLoad() {         super.viewDidLoad()         let webView = WKWebView()         let htmlURL = Bundle.main.url(forResource: "index", withExtension: "html", subdirectory: "FILES")!         webView.loadFileURL(htmlURL, allowingReadAccessTo: htmlURL.deletingLastPathComponent())         view = webView     }     override func didReceiveMemoryWarning() {         super.didReceiveMemoryWarning()         // dispose of any resources that can be recreated     } }
Replies
0
Boosts
0
Views
717
Activity
Aug ’21
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/) 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
3
Boosts
0
Views
1.9k
Activity
Aug ’21
Unable to pause NSBundleResourceRequest
I'm downloading resources from Itunes, using NSBundleResourceRequest. The following code is using to pause the progress. var request = NSBundleResourceRequest(tags: [tags]) self.request.beginAccessingResources { error in if let error = error { onFailure(error) } else { onSuccess() } } @IBAction func buttonPauseAction() { self.request.progress.pause() } But download is not getting paused. Please help me on this, why I'm not able to pause. any reason for this Thanks in advance.
Replies
0
Boosts
0
Views
629
Activity
Aug ’21
not able to find video "Optimizing On-Demand Resources - WWDC 2016"
Hi, I am not able to find below topic video in developer resources and videos. https://developer.apple.com/videos/play/wwdc2016/221/?time=93 i.e. Optimizing On-Demand Resources - WWDC 2016 - Videos
Replies
0
Boosts
0
Views
478
Activity
Jul ’21
On-Demand Resources Update
I spent hours to read documentation and watched wwdc videos about on-demand resources and looked through tons of on-demand resources topics on stackoverflow and so, but I still don't understand how Apple stores on-demand resources for app. Does Apple store on-demand resources for each build or it has shared storage for an app? My assumptions is that one shared storage is used per app (bundle id) but I can't find any proof of that. For example: We have app(v1.0) with tag "someImage" (green image). We publish new app to Appstore (v2.0) with the same tag but with the new image(black image). App(v2.0) will use new image (black) (according to wwdc 2016 video) 1)Will App(v1.0) be using new image or it will be using old one? 2) Will App(v1.0) be working with tags & resources that were added to App(V2.0)
Replies
3
Boosts
0
Views
2.1k
Activity
Jun ’21