Yesterday evening, upon a fresh install, my app was not able to decrypt the CoreML model and kept returning status code 503. I understood this as: Apple's service to download the decryption key is not available at the moment. This problem persisted for at least 8 hours. Three questions:
- Does that occur more often? It means that during such times, new customers of my app will not be able to use the app.
- Anyone has some sample code on how to identify this situation / extract the status code from the error object? (Instead of error 'You need an internet connection' I would like to issue error 'Apple server currently not available - try again later')
- Anyone knows how to force/simulate this situation so that I can analyse the error object and see how I can identify the situation?
Below my code to retrieve the model:
NSURL *modelUrl = [[NSBundle mainBundle] URLForResource:modelName withExtension:@"mlmodelc"];
[MLModel loadContentsOfURL:modelUrl
configuration:[[MLModelConfiguration alloc] init]
completionHandler:^(MLModel *loadedModel, NSError *error) {
if (nil == loadedModel) {
NSLog(@"Error loading model: %@", (nil != error) ? error : modelUrl);