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);
Selecting any option will automatically load the page
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?
Since installing the latest Xcode Beta (version 26.0 beta 4 17A5285i), it no longer runs my app on iPhone 11 and also not on iPad 10.2, both running iOS 18.5.
The following code in
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
...
// Preload both Tabbar Views
NSArray* tabViewControllers = _tabBarController.viewControllers;
_firstViewCntrl = (FirstViewController *)[tabViewControllers objectAtIndex:0];
_secndViewCntrl = (SecondViewController *)[tabViewControllers objectAtIndex:1];
UIView *dummy1 __unused;
UIView *dummy2 __unused;
dummy2 = _secndViewCntrl.view; // Triggers viewDidLoad <<<<< CRASH
will crash the app (the problem is with the 'view' attribute):
*** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named TtGC5UIKit17UICoreHostingViewVCS_21ToolbarVisualProvider8RootView because no class named TtGC5UIKit17UICoreHostingViewVCS_21ToolbarVisualProvider8RootView was found; the class needs to be defined in source code or linked in from a library (ensure the class is part of the correct target)'
When I instead choose the Simulator (iPhone 16 Rosetta) as a destination, the app runs fine and the above assignment will trigger the viewDidLoad method of the second ViewController. So the Rosetta simulator runs fine, but the physical device fails.
The debugger console illustrates the differences between stable and beta Xcode versions (both on physical device):
Xcode Version 16.4 (16F6) from AppStore (app runs fine):
(lldb) p _secndViewCntrl.view
(UIView *) 0x0000000108366d00
Xcode Beta version 26.0 beta 4 17A5285i (app now crashes):
(lldb) p _secndViewCntrl.view
error: Execution was interrupted, reason: internal ObjC exception breakpoint(-9)..
The process has been returned to the state before expression evaluation.
Any ideas?
Topic:
UI Frameworks
SubTopic:
UIKit