Post

Replies

Boosts

Views

Activity

Reply to App Crashes on Paper Selection After Background Printer Connection
Yes, we see a lot of crashes like this in our apps, too. But we can't reproduce it. OS Version: iPhone OS 18.6 (22G86) Release Type: User Baseband Version: 2.70.02 Report Version: 104 Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Reason: *** -[__NSSingleObjectArrayI objectAtIndex:]: index 2 beyond bounds [0 .. 0] Termination Reason: SIGNAL 6 Abort trap: 6 Terminating Process: OurAppName [72412] Triggered by Thread: 0 Last Exception Backtrace: 0 CoreFoundation 0x1950500c0 __exceptionPreprocess + 164 (NSException.m:249) 1 libobjc.A.dylib 0x1924e9abc objc_exception_throw + 88 (objc-exception.mm:356) 2 CoreFoundation 0x1950418c8 -[__NSSingleObjectArrayI objectAtIndex:] + 308 (NSSingleObjectArray.m:18) 3 PrintKitUI 0x1f34d4518 -[UIPrintPaperSizeOption listItemSelected:] + 88 (UIPrintMoreOptions.m:896) 4 PrintKitUI 0x1f34a0a0c -[UIPrintOptionListViewController tableView:didSelectRowAtIndexPath:] + 116 (UIPrintOptionCells.m:103) 5 UIKitCore 0x198b902fc -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:isCellMultiSelect:deselectPrevious:performCustomSelectionAction:] + 1184 (UITableView.m:9365) 6 UIKitCore 0x198b90620 -[UITableView _userSelectRowAtPendingSelectionIndexPath:animatedSelection:] + 256 (UITableView.m:9419) 7 UIKitCore 0x198b9072c -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 216 (UITableView.m:9438) 8 UIKitCore 0x1978b984c -[_UIAfterCACommitBlock run] + 72 (_UIAfterCACommitQueue.m:137) 9 UIKitCore 0x1978b9784 -[_UIAfterCACommitQueue flush] + 168 (_UIAfterCACommitQueue.m:228) 10 UIKitCore 0x19783e254 _runAfterCACommitDeferredBlocks + 260 (UIApplication.m:3284) 11 UIKitCore 0x19783df74 _cleanUpAfterCAFlushAndRunDeferredBlocks + 80 (UIApplication.m:3262) 12 UIKitCore 0x19783de84 _UIApplicationFlushCATransaction + 72 (UIApplication.m:3325) 13 UIKitCore 0x19783de0c __setupUpdateSequence_block_invoke_2 + 336 (_UIUpdateScheduler.m:1659) 14 UIKitCore 0x19783d404 _UIUpdateSequenceRun + 84 (_UIUpdateSequence.mm:136) 15 UIKitCore 0x19783cab4 schedulerStepScheduledMainSection + 208 (_UIUpdateScheduler.m:1173) 16 UIKitCore 0x1978381e4 runloopSourceCallback + 92 (_UIUpdateScheduler.m:1341) 17 CoreFoundation 0x194f4592c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 (CFRunLoop.c:1970) 18 CoreFoundation 0x194f45744 __CFRunLoopDoSource0 + 172 (CFRunLoop.c:2014) 19 CoreFoundation 0x194f455a0 __CFRunLoopDoSources0 + 232 (CFRunLoop.c:2051) 20 CoreFoundation 0x194f45f20 __CFRunLoopRun + 840 (CFRunLoop.c:2969) 21 CoreFoundation 0x194f47adc CFRunLoopRunSpecific + 572 (CFRunLoop.c:3434) 22 GraphicsServices 0x1e1d6d454 GSEventRunModal + 168 (GSEvent.c:2196) 23 UIKitCore 0x197969274 -[UIApplication _run] + 816 (UIApplication.m:3845) 24 UIKitCore 0x197934a28 UIApplicationMain + 336 (UIApplication.m:5540) 25 OurAppName 0x102a2a4dc main + 76 (main.m:16) 26 dyld 0x1bb9d9f08 start + 6040 (dyldMain.cpp:1450)
Topic: UI Frameworks SubTopic: UIKit Tags:
Aug ’25
Reply to UIPrintInteractionController.shared on Mac OS Sonoma running iPad App
It turns out that our solution is not really a solution. It works with a single image, but not always. If we print multiple images on one page or on multiple pages, it doesn't work on the Mac. It doesn't matter whether we convert the images to JPG beforehand or not. It seems to be a timing problem. If we don't do anything in drawPageAtIndex, the print preview always appears. If we do a lot in drawPageAtIndex, the print preview doesn't appear on the Mac. It worked in earlier macOS versions. It always works on the iPhone and iPad. Unfortunately, we haven't been able to find a solution. It would be ideal if we had the option to only draw something in drawPageAtIndex when the print preview is already displayed. We have the instance method printInteractionControllerDidPresentPrinterOptions. This is called a moment before the print preview has actually been displayed. But we could set a flag from this method with a delay of perhaps one second so that something should only be drawn in drawPageAtIndex from then on. However, we are missing the option to restart the drawing in the print preview using the programming code. If, for example, the print orientation is changed manually in the print preview dialog, then drawPageAtIndex is called again and everything is drawn correctly. Does anyone know a way to restart the drawing in drawPageAtIndex of the UIPrintPageRenderer from the programming code?
Topic: UI Frameworks SubTopic: UIKit Tags:
Jun ’24
Reply to UIPrintInteractionController.shared on Mac OS Sonoma running iPad App
And an html string can be printed using a UIGraphicsBeginPDFContextToData. The disadvantage is that you have to define a fixed page size, but it prints with this solution in an iPad app on the Mac. - (NSData *)createPDFfromHTML:(NSString *)htmlString { UIMarkupTextPrintFormatter *formatter = [[UIMarkupTextPrintFormatter alloc] initWithMarkupText:htmlString]; UIPrintPageRenderer *pageRenderer = [[UIPrintPageRenderer alloc] init]; [pageRenderer addPrintFormatter:formatter startingAtPageAtIndex:0]; NSMutableData *pdfData = [NSMutableData data]; CGRect paperRect = CGRectMake(0, 0, 595.3, 841.9); // A4 CGRect printableRect = CGRectInset(paperRect, 72, 72); // 1-inch margins UIGraphicsBeginPDFContextToData(pdfData, paperRect, nil); [pageRenderer setValue:[NSValue valueWithCGRect:paperRect] forKey:@"paperRect"]; [pageRenderer setValue:[NSValue valueWithCGRect:printableRect] forKey:@"printableRect"]; NSInteger pages = [pageRenderer numberOfPages]; for (NSInteger i = 0; i < pages; i++) { UIGraphicsBeginPDFPageWithInfo(paperRect, nil); [pageRenderer drawPageAtIndex:i inRect:paperRect]; } UIGraphicsEndPDFContext(); return pdfData; } - (void)printHtmlTest { NSString *htmlContent = @"<h1>Hello World</h1>"; NSData * pdfData = [self createPDFfromHTML:htmlContent]; UIPrintInteractionController *printController = [UIPrintInteractionController sharedPrintController]; printController.printingItem = pdfData; UIViewController *controller = [[UIViewController alloc] init]; [printController presentAnimated:YES completionHandler:^(UIPrintInteractionController *printInteractionController, BOOL completed, NSError *error) { // }]; }
Topic: UI Frameworks SubTopic: UIKit Tags:
May ’24
Reply to UIPrintInteractionController.shared on Mac OS Sonoma running iPad App
We have finally found a solution for this problem. Where it works, we load the UIImage from a JPG file. Where it doesn't work, the UIImage is created programmatically. The solution is to convert the UIImage to JPEG data and then create a new UIImage for printing. With this new UIImage, printing finally also works on a Mac in an iPad app. UIImage *imageToPrint = [UIImage imageWithData:UIImageJPEGRepresentation(originalImage, 1)];
Topic: UI Frameworks SubTopic: UIKit Tags:
May ’24
Reply to UIPrintInteractionController.shared on Mac OS Sonoma running iPad App
We have now noticed an interesting behavior in one of our apps. The app uses the same code to print from two different UIViewControllers. On a Mac as an iPad app it works without any problems in one of the two ViewControllers. The print preview appears and you can print. But in the other ViewController it doesn't work. The print preview does not appear. Unfortunately we cannot find the difference that causes the different behavior. The ViewController in which it works is called with push segue from the first controller. We thought that maybe that was the important difference. But in another app of ours we have exactly the same configuration and printing in the second ViewController doesn't work in this app.
Topic: UI Frameworks SubTopic: UIKit Tags:
May ’24
Reply to UIPrintInteractionController.shared on Mac OS Sonoma running iPad App
The new macOS version Sonoma 14.4 has just been released. Unfortunately the bug is still not fixed. It is still not possible to print with a "Designed for iPad" app. However, more errors are now displayed in the console: CLIENT ERROR: TUINSRemoteViewController does not override -viewServiceDidTerminateWithError: and thus cannot react to catastrophic errors beyond logging them Failed to connect (genericPrinterImage) outlet from (PMPrinterSelectionController) to (NSImageView): missing setter or instance variable Failed to connect (localPrintersLabel) outlet from (PMPrinterSelectionController) to (NSTextField): missing setter or instance variable Failed to connect (otherPrintersLabel) outlet from (PMPrinterSelectionController) to (NSTextField): missing setter or instance variable Failed to connect (recentPrintersLabel) outlet from (PMPrinterSelectionController) to (NSTextField): missing setter or instance variable CGContextClipToRect: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Topic: UI Frameworks SubTopic: UIKit Tags:
Mar ’24
Reply to Crash When Run app On Xcode15 Simulator
We migrated all UIGraphicsBeginImageContext code in all our apps to UIGraphicsImageRenderer and the crashes disappeared. Now everything is good again. UIGraphicsImageRendererFormat *format = [UIGraphicsImageRendererFormat defaultFormat]; format.opaque = NO; format.scale = 1; format.preferredRange = UIGraphicsImageRendererFormatRangeStandard; UIGraphicsImageRenderer *renderer = [[UIGraphicsImageRenderer alloc] initWithSize:imageSize format:format]; UIImage *image = [renderer imageWithActions:^(UIGraphicsImageRendererContext * _Nonnull rendererContext) { CGContextRef context = rendererContext.CGContext; }];
Feb ’24
Reply to Why does App Store Connect mess up the order of uploaded screenshots?
So now the automatic sorting of the screenshots is also broken. It has worked perfectly for at least 10 years and now it is sorted by upload order. The screenshots with the smallest file size are uploaded first and are placed at the front. This makes it random and unusable. Three months ago it worked perfectly. Now I have to upload each image one after the other for 33 languages, 4 device types and 10 screenshots each, i.e. a total of 1320 screenshots. That's another way to waste your valuable time.
Jan ’24
Reply to Crash When Run app On Xcode15 Simulator
We are also seeing crashes with UIGraphicsBeginImageContext on iOS 17 devices. At first we also thought that it would happen because of a 0 in the width or height of the size. But it crashes in one app at this point: if(size.width < 50 || size.height < 50) { return nil; } size = CGSizeMake(size.width*2.0f, size.height*2.0f); UIGraphicsBeginImageContext(size); With this code, it is impossible for the width or height to be 0. The crash must therefore also have other causes. Unfortunately, we cannot reproduce the crash with our test devices. Incident Identifier: AAAAAAAAAA-893D-4C7B-A933-AAAAAAAAAA Hardware Model: iPad13,16 Process: AAAAAAAAAA [37228] Path: /private/var/containers/Bundle/Application/AAAAAAAAAA-F8FB-405B-8DC7-AAAAAAAAAA/AAAAAAAAAA.app/AAAAAAAAAA Identifier: AAAAAAAAAA.AAAAAAAAAA.AAAAAAAAAA Version: 13.6 (1.0) AppStoreTools: 15A240a AppVariant: 1:iPad13,16:15 Code Type: ARM-64 (Native) Role: Background Parent Process: launchd [1] Coalition: AAAAAAAAAA.AAAAAAAAAA.AAAAAAAAAA [700] Date/Time: 2023-11-24 21:03:57.5000 -0500 Launch Time: 2023-11-24 08:47:34.0066 -0500 OS Version: iPhone OS 17.1.1 (21B91) Release Type: User Report Version: 104 Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Termination Reason: SIGNAL 6 Abort trap: 6 Terminating Process: AAAAAAAAAA [37228] Triggered by Thread: 0 Last Exception Backtrace: 0 CoreFoundation 0x18863c870 __exceptionPreprocess + 164 (NSException.m:249) 1 libobjc.A.dylib 0x1809a7c00 objc_exception_throw + 60 (objc-exception.mm:356) 2 Foundation 0x187ba6e54 -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 172 (NSException.m:261) 3 UIKitCore 0x18a8683a4 _UIGraphicsBeginImageContextWithOptions + 568 (UIGraphics.m:407) 4 AAAAAAAAAA 0x100a9e83c -[AAAAAAAAAA getAaaaaImage:] + 88 (AAAAAAAAAA.m:7815) 5 AAAAAAAAAA 0x100a9e6b0 -[AAAAAAAAAA createAaaaa] + 92 (AAAAAAAAAA.m:7783) 6 AAAAAAAAAA 0x100a8b14c -[AAAAAAAAAA setAaaaaSize:] + 2664 (AAAAAAAAAA.m:2566) 7 AAAAAAAAAA 0x100a84164 -[AAAAAAAAAA viewDidLayoutSubviews] + 284 (AAAAAAAAAA.m:890) 8 UIKitCore 0x18a7a67f0 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1876 (UIView.m:20001) 9 QuartzCore 0x189bbc1c0 CA::Layer::layout_if_needed(CA::Transaction*) + 500 (CALayer.mm:10804) 10 UIKitCore 0x18a7a9744 -[UIView(Hierarchy) layoutBelowIfNeeded] + 296 (UIView.m:14119) 11 UIKitCore 0x18a7ac3e8 -[UINavigationController _layoutViewController:] + 816 (UINavigationController.m:7728) 12 UIKitCore 0x18a7ac0b4 -[UINavigationController _layoutTopViewControllerLookForNested:] + 436 (UINavigationController.m:5626) 13 UIKitCore 0x18a9392a0 __105-[UINavigationController _repositionPaletteWithNavigationBarHidden:duration:shouldUpdateNavigationItems:]_block_invoke + 440 (UINavigationController.m:3149)
Nov ’23
Reply to UIDocumentPickerViewController ignores directoryURL on iOS/iPadOS 16.1
Ok, now I understood how directoryURL from the UIDocumentPickerViewController works. It expects a security-scoped URL. Either a direct "Security Scoped URL" or from a "Security-Scoped Bookmark". This means that the user must first select the folders that are to be available using the UIDocumentPickerViewController with directoryURL. The returned security-scoped URLs can be saved as security-scoped bookmarks and later one can be passed to the UIDocumentPickerViewController as directoryURL.
Topic: UI Frameworks SubTopic: UIKit Tags:
Nov ’23
Reply to App Crashes on Paper Selection After Background Printer Connection
Yes, we see a lot of crashes like this in our apps, too. But we can't reproduce it. OS Version: iPhone OS 18.6 (22G86) Release Type: User Baseband Version: 2.70.02 Report Version: 104 Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Reason: *** -[__NSSingleObjectArrayI objectAtIndex:]: index 2 beyond bounds [0 .. 0] Termination Reason: SIGNAL 6 Abort trap: 6 Terminating Process: OurAppName [72412] Triggered by Thread: 0 Last Exception Backtrace: 0 CoreFoundation 0x1950500c0 __exceptionPreprocess + 164 (NSException.m:249) 1 libobjc.A.dylib 0x1924e9abc objc_exception_throw + 88 (objc-exception.mm:356) 2 CoreFoundation 0x1950418c8 -[__NSSingleObjectArrayI objectAtIndex:] + 308 (NSSingleObjectArray.m:18) 3 PrintKitUI 0x1f34d4518 -[UIPrintPaperSizeOption listItemSelected:] + 88 (UIPrintMoreOptions.m:896) 4 PrintKitUI 0x1f34a0a0c -[UIPrintOptionListViewController tableView:didSelectRowAtIndexPath:] + 116 (UIPrintOptionCells.m:103) 5 UIKitCore 0x198b902fc -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:isCellMultiSelect:deselectPrevious:performCustomSelectionAction:] + 1184 (UITableView.m:9365) 6 UIKitCore 0x198b90620 -[UITableView _userSelectRowAtPendingSelectionIndexPath:animatedSelection:] + 256 (UITableView.m:9419) 7 UIKitCore 0x198b9072c -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 216 (UITableView.m:9438) 8 UIKitCore 0x1978b984c -[_UIAfterCACommitBlock run] + 72 (_UIAfterCACommitQueue.m:137) 9 UIKitCore 0x1978b9784 -[_UIAfterCACommitQueue flush] + 168 (_UIAfterCACommitQueue.m:228) 10 UIKitCore 0x19783e254 _runAfterCACommitDeferredBlocks + 260 (UIApplication.m:3284) 11 UIKitCore 0x19783df74 _cleanUpAfterCAFlushAndRunDeferredBlocks + 80 (UIApplication.m:3262) 12 UIKitCore 0x19783de84 _UIApplicationFlushCATransaction + 72 (UIApplication.m:3325) 13 UIKitCore 0x19783de0c __setupUpdateSequence_block_invoke_2 + 336 (_UIUpdateScheduler.m:1659) 14 UIKitCore 0x19783d404 _UIUpdateSequenceRun + 84 (_UIUpdateSequence.mm:136) 15 UIKitCore 0x19783cab4 schedulerStepScheduledMainSection + 208 (_UIUpdateScheduler.m:1173) 16 UIKitCore 0x1978381e4 runloopSourceCallback + 92 (_UIUpdateScheduler.m:1341) 17 CoreFoundation 0x194f4592c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 (CFRunLoop.c:1970) 18 CoreFoundation 0x194f45744 __CFRunLoopDoSource0 + 172 (CFRunLoop.c:2014) 19 CoreFoundation 0x194f455a0 __CFRunLoopDoSources0 + 232 (CFRunLoop.c:2051) 20 CoreFoundation 0x194f45f20 __CFRunLoopRun + 840 (CFRunLoop.c:2969) 21 CoreFoundation 0x194f47adc CFRunLoopRunSpecific + 572 (CFRunLoop.c:3434) 22 GraphicsServices 0x1e1d6d454 GSEventRunModal + 168 (GSEvent.c:2196) 23 UIKitCore 0x197969274 -[UIApplication _run] + 816 (UIApplication.m:3845) 24 UIKitCore 0x197934a28 UIApplicationMain + 336 (UIApplication.m:5540) 25 OurAppName 0x102a2a4dc main + 76 (main.m:16) 26 dyld 0x1bb9d9f08 start + 6040 (dyldMain.cpp:1450)
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Aug ’25
Reply to UIPrintInteractionController.shared on Mac OS Sonoma running iPad App
With macOS 15 Sequoia, printing in the iPad app works without any problems.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to UIPrintInteractionController.shared on Mac OS Sonoma running iPad App
It turns out that our solution is not really a solution. It works with a single image, but not always. If we print multiple images on one page or on multiple pages, it doesn't work on the Mac. It doesn't matter whether we convert the images to JPG beforehand or not. It seems to be a timing problem. If we don't do anything in drawPageAtIndex, the print preview always appears. If we do a lot in drawPageAtIndex, the print preview doesn't appear on the Mac. It worked in earlier macOS versions. It always works on the iPhone and iPad. Unfortunately, we haven't been able to find a solution. It would be ideal if we had the option to only draw something in drawPageAtIndex when the print preview is already displayed. We have the instance method printInteractionControllerDidPresentPrinterOptions. This is called a moment before the print preview has actually been displayed. But we could set a flag from this method with a delay of perhaps one second so that something should only be drawn in drawPageAtIndex from then on. However, we are missing the option to restart the drawing in the print preview using the programming code. If, for example, the print orientation is changed manually in the print preview dialog, then drawPageAtIndex is called again and everything is drawn correctly. Does anyone know a way to restart the drawing in drawPageAtIndex of the UIPrintPageRenderer from the programming code?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Jun ’24
Reply to UIPrintInteractionController.shared on Mac OS Sonoma running iPad App
And an html string can be printed using a UIGraphicsBeginPDFContextToData. The disadvantage is that you have to define a fixed page size, but it prints with this solution in an iPad app on the Mac. - (NSData *)createPDFfromHTML:(NSString *)htmlString { UIMarkupTextPrintFormatter *formatter = [[UIMarkupTextPrintFormatter alloc] initWithMarkupText:htmlString]; UIPrintPageRenderer *pageRenderer = [[UIPrintPageRenderer alloc] init]; [pageRenderer addPrintFormatter:formatter startingAtPageAtIndex:0]; NSMutableData *pdfData = [NSMutableData data]; CGRect paperRect = CGRectMake(0, 0, 595.3, 841.9); // A4 CGRect printableRect = CGRectInset(paperRect, 72, 72); // 1-inch margins UIGraphicsBeginPDFContextToData(pdfData, paperRect, nil); [pageRenderer setValue:[NSValue valueWithCGRect:paperRect] forKey:@"paperRect"]; [pageRenderer setValue:[NSValue valueWithCGRect:printableRect] forKey:@"printableRect"]; NSInteger pages = [pageRenderer numberOfPages]; for (NSInteger i = 0; i < pages; i++) { UIGraphicsBeginPDFPageWithInfo(paperRect, nil); [pageRenderer drawPageAtIndex:i inRect:paperRect]; } UIGraphicsEndPDFContext(); return pdfData; } - (void)printHtmlTest { NSString *htmlContent = @"<h1>Hello World</h1>"; NSData * pdfData = [self createPDFfromHTML:htmlContent]; UIPrintInteractionController *printController = [UIPrintInteractionController sharedPrintController]; printController.printingItem = pdfData; UIViewController *controller = [[UIViewController alloc] init]; [printController presentAnimated:YES completionHandler:^(UIPrintInteractionController *printInteractionController, BOOL completed, NSError *error) { // }]; }
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to UIPrintInteractionController.shared on Mac OS Sonoma running iPad App
We have finally found a solution for this problem. Where it works, we load the UIImage from a JPG file. Where it doesn't work, the UIImage is created programmatically. The solution is to convert the UIImage to JPEG data and then create a new UIImage for printing. With this new UIImage, printing finally also works on a Mac in an iPad app. UIImage *imageToPrint = [UIImage imageWithData:UIImageJPEGRepresentation(originalImage, 1)];
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to UIPrintInteractionController.shared on Mac OS Sonoma running iPad App
We have now noticed an interesting behavior in one of our apps. The app uses the same code to print from two different UIViewControllers. On a Mac as an iPad app it works without any problems in one of the two ViewControllers. The print preview appears and you can print. But in the other ViewController it doesn't work. The print preview does not appear. Unfortunately we cannot find the difference that causes the different behavior. The ViewController in which it works is called with push segue from the first controller. We thought that maybe that was the important difference. But in another app of ours we have exactly the same configuration and printing in the second ViewController doesn't work in this app.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to Privacy Third Party SDK
Uploading is not enough to receive this email. You have to submit the new build for review, then you will receive the email with the information about missing API declarations.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Mar ’24
Reply to UIPrintInteractionController.shared on Mac OS Sonoma running iPad App
The new macOS version Sonoma 14.4 has just been released. Unfortunately the bug is still not fixed. It is still not possible to print with a "Designed for iPad" app. However, more errors are now displayed in the console: CLIENT ERROR: TUINSRemoteViewController does not override -viewServiceDidTerminateWithError: and thus cannot react to catastrophic errors beyond logging them Failed to connect (genericPrinterImage) outlet from (PMPrinterSelectionController) to (NSImageView): missing setter or instance variable Failed to connect (localPrintersLabel) outlet from (PMPrinterSelectionController) to (NSTextField): missing setter or instance variable Failed to connect (otherPrintersLabel) outlet from (PMPrinterSelectionController) to (NSTextField): missing setter or instance variable Failed to connect (recentPrintersLabel) outlet from (PMPrinterSelectionController) to (NSTextField): missing setter or instance variable CGContextClipToRect: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Mar ’24
Reply to Crash When Run app On Xcode15 Simulator
We migrated all UIGraphicsBeginImageContext code in all our apps to UIGraphicsImageRenderer and the crashes disappeared. Now everything is good again. UIGraphicsImageRendererFormat *format = [UIGraphicsImageRendererFormat defaultFormat]; format.opaque = NO; format.scale = 1; format.preferredRange = UIGraphicsImageRendererFormatRangeStandard; UIGraphicsImageRenderer *renderer = [[UIGraphicsImageRenderer alloc] initWithSize:imageSize format:format]; UIImage *image = [renderer imageWithActions:^(UIGraphicsImageRendererContext * _Nonnull rendererContext) { CGContextRef context = rendererContext.CGContext; }];
Replies
Boosts
Views
Activity
Feb ’24
Reply to UIPrintInteractionController.shared on Mac OS Sonoma running iPad App
Has anyone found a solution? Printing no longer works in all of our apps on Sonoma 14.3.1 as "Designed tfor iPad" app. The detour via a WKWebView or PDF is not a solution for us because we print images in the exact size.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Feb ’24
Reply to Why does Appstore not show 3 screenshots for my app?
The screenshots will not be displayed in the App Store for the apps you have already installed. Uninstall your app and you will see the screenshots in the App Store for your app too.
Replies
Boosts
Views
Activity
Jan ’24
Reply to Why does App Store Connect mess up the order of uploaded screenshots?
So now the automatic sorting of the screenshots is also broken. It has worked perfectly for at least 10 years and now it is sorted by upload order. The screenshots with the smallest file size are uploaded first and are placed at the front. This makes it random and unusable. Three months ago it worked perfectly. Now I have to upload each image one after the other for 33 languages, 4 device types and 10 screenshots each, i.e. a total of 1320 screenshots. That's another way to waste your valuable time.
Replies
Boosts
Views
Activity
Jan ’24
Reply to Crash When Run app On Xcode15 Simulator
We are also seeing crashes with UIGraphicsBeginImageContext on iOS 17 devices. At first we also thought that it would happen because of a 0 in the width or height of the size. But it crashes in one app at this point: if(size.width < 50 || size.height < 50) { return nil; } size = CGSizeMake(size.width*2.0f, size.height*2.0f); UIGraphicsBeginImageContext(size); With this code, it is impossible for the width or height to be 0. The crash must therefore also have other causes. Unfortunately, we cannot reproduce the crash with our test devices. Incident Identifier: AAAAAAAAAA-893D-4C7B-A933-AAAAAAAAAA Hardware Model: iPad13,16 Process: AAAAAAAAAA [37228] Path: /private/var/containers/Bundle/Application/AAAAAAAAAA-F8FB-405B-8DC7-AAAAAAAAAA/AAAAAAAAAA.app/AAAAAAAAAA Identifier: AAAAAAAAAA.AAAAAAAAAA.AAAAAAAAAA Version: 13.6 (1.0) AppStoreTools: 15A240a AppVariant: 1:iPad13,16:15 Code Type: ARM-64 (Native) Role: Background Parent Process: launchd [1] Coalition: AAAAAAAAAA.AAAAAAAAAA.AAAAAAAAAA [700] Date/Time: 2023-11-24 21:03:57.5000 -0500 Launch Time: 2023-11-24 08:47:34.0066 -0500 OS Version: iPhone OS 17.1.1 (21B91) Release Type: User Report Version: 104 Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Termination Reason: SIGNAL 6 Abort trap: 6 Terminating Process: AAAAAAAAAA [37228] Triggered by Thread: 0 Last Exception Backtrace: 0 CoreFoundation 0x18863c870 __exceptionPreprocess + 164 (NSException.m:249) 1 libobjc.A.dylib 0x1809a7c00 objc_exception_throw + 60 (objc-exception.mm:356) 2 Foundation 0x187ba6e54 -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 172 (NSException.m:261) 3 UIKitCore 0x18a8683a4 _UIGraphicsBeginImageContextWithOptions + 568 (UIGraphics.m:407) 4 AAAAAAAAAA 0x100a9e83c -[AAAAAAAAAA getAaaaaImage:] + 88 (AAAAAAAAAA.m:7815) 5 AAAAAAAAAA 0x100a9e6b0 -[AAAAAAAAAA createAaaaa] + 92 (AAAAAAAAAA.m:7783) 6 AAAAAAAAAA 0x100a8b14c -[AAAAAAAAAA setAaaaaSize:] + 2664 (AAAAAAAAAA.m:2566) 7 AAAAAAAAAA 0x100a84164 -[AAAAAAAAAA viewDidLayoutSubviews] + 284 (AAAAAAAAAA.m:890) 8 UIKitCore 0x18a7a67f0 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1876 (UIView.m:20001) 9 QuartzCore 0x189bbc1c0 CA::Layer::layout_if_needed(CA::Transaction*) + 500 (CALayer.mm:10804) 10 UIKitCore 0x18a7a9744 -[UIView(Hierarchy) layoutBelowIfNeeded] + 296 (UIView.m:14119) 11 UIKitCore 0x18a7ac3e8 -[UINavigationController _layoutViewController:] + 816 (UINavigationController.m:7728) 12 UIKitCore 0x18a7ac0b4 -[UINavigationController _layoutTopViewControllerLookForNested:] + 436 (UINavigationController.m:5626) 13 UIKitCore 0x18a9392a0 __105-[UINavigationController _repositionPaletteWithNavigationBarHidden:duration:shouldUpdateNavigationItems:]_block_invoke + 440 (UINavigationController.m:3149)
Replies
Boosts
Views
Activity
Nov ’23
Reply to UIDocumentPickerViewController ignores directoryURL on iOS/iPadOS 16.1
It is important that before you create a bookmark with bookmarkDataWithOptions, you must call startAccessingSecurityScopedResource from the url. And after creating the bookmark, call stopAccessingSecurityScopedResource.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Nov ’23
Reply to UIDocumentPickerViewController ignores directoryURL on iOS/iPadOS 16.1
Ok, now I understood how directoryURL from the UIDocumentPickerViewController works. It expects a security-scoped URL. Either a direct "Security Scoped URL" or from a "Security-Scoped Bookmark". This means that the user must first select the folders that are to be available using the UIDocumentPickerViewController with directoryURL. The returned security-scoped URLs can be saved as security-scoped bookmarks and later one can be passed to the UIDocumentPickerViewController as directoryURL.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Nov ’23