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);
Post
Replies
Boosts
Views
Activity
I use WKWebView to display a web page in my app that has custom fonts with hard coded font sizes.
Based on the dynamic type text size specified in the settings app by the user, I want to set a certain zoom level on the web page like this (using WKNavigationDelegate):
- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation
{
[webView evaluateJavaScript:@"document.getElementsByTagName('body')[0].style.webkitTextSizeAdjust='120%'" completionHandler:nil];
}
This works just fine on iPhone, but on iPad the zoom level stays at 100%.
Any ideas?
At startup of my app I call
[[INVoiceShortcutCenter sharedCenter] getAllVoiceShortcutsWithCompletion:
^void(NSArray<INVoiceShortcut *> *voiceShortcuts, NSError *error)
{
to get the invokation phrases of the supported Siri voice shortcuts.
Immediately after the call (before the completion handler is called) I get a bunch of log messages:
2023-01-09 20:32:15.415950+0100 MyAppName[11673:607994] [default]
LaunchServices: store (null) or url (null) was nil:
Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database"
UserInfo={NSDebugDescription=process may not map database,
_LSLine=264, _LSFunction=-[_LSDReadClient getServerStoreWithCompletionHandler:]}
2023-01-09 20:32:15.417786+0100 MyAppName[11673:607994] [default]
Attempt to map database failed: permission was denied. This attempt will not be retried.
2023-01-09 20:32:15.418049+0100 MyAppName[11673:607994] [db]
Failed to initialize client context with error Error Domain=NSOSStatusErrorDomain Code=-54
"process may not map database" UserInfo={NSDebugDescription=process may not map database,
_LSLine=264, _LSFunction=-[_LSDReadClient getServerStoreWithCompletionHandler:]}
2023-01-09 20:32:15.419079+0100 MyAppName[11673:607994] [default]
LaunchServices: store (null) or url (null) was nil: Error Domain=NSOSStatusErrorDomain Code=-54
"process may not map database" UserInfo={NSDebugDescription=process may not map database,
_LSLine=264, _LSFunction=-[_LSDReadClient getServerStoreWithCompletionHandler:]}
2023-01-09 20:32:15.419193+0100 MyAppName[11673:607994] [default]
Attempt to map database failed: permission was denied. This attempt will not be retried.
2023-01-09 20:32:15.419304+0100 MyAppName[11673:607994] [db]
Failed to initialize client context with error Error Domain=NSOSStatusErrorDomain Code=-54
"process may not map database" UserInfo={NSDebugDescription=process may not map database,
_LSLine=264, _LSFunction=-[_LSDReadClient getServerStoreWithCompletionHandler:]}
Then, the completion handler is called and I receive the INVoiceShortcut instances as expected with the invokation phrase as maintained by the user.
When the user wants to change the invokation phrase, I call
INUIAddVoiceShortcutViewController *addShortcutCntrl =
[[INUIAddVoiceShortcutViewController alloc] initWithShortcut:siriShortcut];
addShortcutCntrl.modalPresentationStyle = UIModalPresentationCurrentContext;
addShortcutCntrl.delegate = self;
[self presentViewController:addShortcutCntrl animated:YES completion:nil];
The Apple-provided UI comes up and I tap 'Change Voice Phrase'. I say the new phrase, it is recogized by speech recognition and immediately afterwards, it again prompts me with another peep signal to record the phrase again. I basically always have to record the phrase twice.
This problem only happens on iPad. With the exact same code on iPhone everything works correctly (I also do not get the log messages above).
Any ideas on how to analyse this or what might help to solve it?