iOS is the operating system for iPhone.

Posts under iOS tag

200 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Crash when presenting UIPrintInteractionController on iOS 16
Starting iOS 16 seeing some crashes related to pdf printing in the crash reporter. It looks like the issue is not so frequent. Also, I'm unable to reproduce the crash. Looks like the app crashes when the print preview dialog is opening. According to crash reports, there are some crashes on different iOS 16 versions: 16.0.0, 16.0.2, and 16.0.3. Printing code: let printInfo = UIPrintInfo.printInfo() printInfo.jobName = "Printing Job Name" self.printViewController = UIPrintInteractionController.shared self.printViewController?.printInfo = printInfo self.printViewController?.printingItem = pdfURL self.printViewController?.present(from: barButtonItem, animated: true) { (controller, completed, error) in self.printViewController = nil } Stack trace: compare_key + 4 (CGPDFObject.c:134) bsearch + 68 (bsearch.c:70) CGPDFDictionaryGetUnresolvedObject + 68 (CGPDFDictionary.c:153) CGPDFDictionaryGetObject + 44 (CGPDFDictionary.c:172) CGPDFDictionaryGetDictionary + 44 (CGPDFDictionary.c:284) get_pages_dictionary + 68 (pdf-reader.c:410) pdf_reader_get_number_of_pages + 76 (pdf-reader.c:557) -[UIPrintPreviewPageFetcher fetchNumberOfItems] + 76 (UIPrintPreviewPageFetcher.m:115) -[UIPrintPreviewViewController collectionView:numberOfItemsInSection:] + 32 (UIPrintPreviewViewController.m:482) -[UICollectionViewData _updateItemCounts] + 220 (UICollectionViewData.mm:335) -[UICollectionViewData isIndexPathValid:validateItemCounts:] + 52 (UICollectionViewData.mm:348) -[UICollectionViewData validatedGlobalIndexForItemAtIndexPath:] + 36 (UICollectionViewData.mm:778) -[UICollectionView _cellForItemAtIndexPath:] + 108 (UICollectionView.m:7112) -[UICollectionView _endItemAnimationsWithInvalidationContext:tentativelyForReordering:animator:collectionViewAnimator:] + 1384 (UICollectionView.m:9357) -[UICollectionView _updateRowsAtIndexPaths:updateAction:updates:] + 396 (UICollectionView.m:9104) -[UICollectionView reloadItemsAtIndexPaths:] + 52 (UICollectionView.m:9124) -[UIPrintPreviewViewController reloadVisibleItems:] + 256 (UIPrintPreviewViewController.m:568) __63-[UIPrintPreviewViewController updatePdfURL:options:completed:]_block_invoke_2 + 44 (UIPrintPreviewViewController.m:305) __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 24 (NSOperation.m:1545) -[NSBlockOperation main] + 104 (NSOperation.m:1564) __NSOPERATION_IS_INVOKING_MAIN__ + 16 (NSOperation.m:2189) -[NSOperation start] + 708 (NSOperation.m:2206) There is full stack trace I got from the Organizer Thanks!
13
5
3.7k
3w
UIDocumentPickerViewController ignores directoryURL on iOS/iPadOS 16.1
I found a glitch on my app on iOS/iPadOS 16.1. The directory to open files is not saved. I filed this on Feedback Assistant but Apple says that it is a specified behavior. Isn't it a bug? // // ViewController.m // #import "ViewController.h" #import <UniformTypeIdentifiers/UniformTypeIdentifiers.h> @interface ViewController () <UIDocumentPickerDelegate> @end @implementation ViewController { NSURL *directoryURL; } - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. } - (void)documentPicker:(UIDocumentPickerViewController *)controller didPickDocumentsAtURLs:(NSArray<NSURL *> *)urls { directoryURL = [[urls firstObject] URLByDeletingLastPathComponent]; } - (IBAction)trigger:(id)sender { UIDocumentPickerViewController *picker = [[UIDocumentPickerViewController alloc] initForOpeningContentTypes:@[UTTypeData] asCopy:NO]; picker.directoryURL = directoryURL; [self presentViewController:picker animated:YES completion:nil]; } @end To reproduce the issue. Tap the button and select a file on another directory. Tap the button again. The directory should be the selected one but is the default one.
5
1
1.3k
Nov ’23
PKCanvasView no longer shows edit (paste) menu on long press (iOS 16.1)
You used to be able to select a drawing, long press to show the edit menu (copy, duplicate, delete, ...), copy the item and paste it after another long press on the canvas. However, since iOS / iPadOS 16.1 long pressing the canvas does not show any menu. The action still works if you connect an external mouse to your iPad, activate the secondary click functionality and use the right mouse button to click on the canvas. This shows the menu and you can paste the copied drawing. It seems to be broken in all PencilKit-based apps, including Apple's sample apps. Is there any workaround? This is a major problem for my app and used to work fine since the introduction of PencilKit with iOS 13.
7
1
2.3k
Oct ’23
1 minute Delay in External Accessory framework showBluetoothAccessoryPicker
I have to pair the classic Bluetooth device with my iOS application. For that, I have implemented showBluetoothAccessoryPicker with the External Accessory framework. EAAccessoryManager.shared().showBluetoothAccessoryPicker(withNameFilter: nil)), this is the code I have used for that. Added "Supported external accessory protocols" in .plist and enabled Wireless Accessory Configuration from capabilities. The actual issue is the picker displaying the device to pair with a 1-minute delay. What is the reason behind this reason and how can we resolve that?
1
0
889
Oct ’23
XCode 14.x, adding Watch to existing and WCSession isWatchAppInstalled = false
I added a Watch app to an existing iOS app using XCode 14.1. (single target template) When using WCSession delegate, so I can message between the apps, I always get isWatchAppInstalled = false. If Icreate the same scenario using XCode 13.x, I have no issues. Has anyone been able to add a watch app to an existing iOS app, create a WCSession object and have isWatchAppInstalled = true? print("Session:activationDidCompleteWith --> IsPaired[(String(describing: session.isPaired))] isWatchAppInstalled[(String(describing: session.isWatchAppInstalled))] isReachable[(String(describing: session.isReachable))]"); displays: Session:activationDidCompleteWith --> IsPaired[true] isWatchAppInstalled[false] isReachable[false]
1
0
1.1k
Dec ’23
Not able to enroll to Apple Developer Program, Getting Error - (Please ensure your device and iCloud account meet our system requirements)
I am trying to Enroll to Apple developer program to upload my first app to App Store. I checked many tutorials but they all uses old method of enrolling through browser and now apple is only allowing to enrollment through Developer App So i downloaded Developer app and logged in using my Apple developer account. But when i click on "Enroll Now" button i am getting this error - Please ensure your device and iCloud account meet our system requirements I also have attached a screenshot of error I am using MacBook Air (13-inch, Early 2015) with MacOs Monterey 12.6.1 I also try by logging in my i-cloud with same apple account But still getting the Error. Please guide me through the process to register in apple developer program.
18
3
11k
Sep ’23
Command CodeSign fails because of two Apple Worldwide Developer certificates
I have an Apple Development certificate issued by: Apple Worldwide Developer Relations Certification Authority (until February 20, 2030). From time to time the Xcode build fails and I see that my certificate is invalid. In this situation, I see two "Apple Worldwide Developer Relations Certification Authority" certificates. One is valid until 2030 and the other is valid until 2023. When I remove the second one (until 2023), my Apple Development certificate becomes valid and the build goes fine. But after a while CodeSign fails again, and I have to remove the second certificate again to build the application. Seems to be that second certificates is auto downloaded by Xcode, how can i fix it?
14
1
2k
Nov ’23
iOS16.1 Connection Interval Changes?
Hello, When Apple officially released iOS16 to users in Sept and Oct this year, our custom device that uses a nRF52832 Nordic based BLE chip would no longer hold the connection for more that 90 seconds before disconnecting. Through other forums and documentation, we realized that with iOS16, Apple changed their requested Connection Intervals and we had to modify them on our product to solve. [Previously Worked with iOS15 & below] Connection Interval for Product: Min 7.5ms - Max 15ms Does not work with iOS16.0 Does work with iOS16.1 & iOS16.1.1 [Had to Change for iOS16.0, 16.0.1, 16.0.2, 16.0.3] Connection Interval for Product: Min 15ms - Max 30ms However, with the release of iOS16.1 in November, our original connection interval parameters work again. Does anyone know what Apple changed for iOS16.1 for the connection intervals? Why does iOS16.1 accept 7.5-15ms intervals when iOS16.0 doesn't? There are no changes to the connection interval requirements on the Apple Design Guidelines as of the last revision Oct26th,2022. Would really appreciate if anyone can share more info on the BLE change logs for iOS16.1. Thanks for the help!
1
0
1.3k
Apr ’24
Missing recommended icon for iPad when using new xCode 14 single size app icon
Hi, We recently migrated our iOS app icon to use the new 'single size' feature in xCode 14. However upon submission to App Store Connect we are getting the following issues: ITMS-90892: Missing recommended icon - The bundle does not contain an alternate app icon for iPad of exactly '167x167' pixels, in .png format for iOS versions supporting iPad Pro. To support older operating systems, the icon may be required in the bundle outside of an asset catalog. Make sure the Info.plist file includes appropriate entries referencing the file. See https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleicons ITMS-90892: Missing recommended icon - The bundle does not contain an alternate app icon for iPad of exactly '152x152' pixels, in .png format for iOS versions >= 10.0. To support older operating systems, the icon may be required in the bundle outside of an asset catalog. Make sure the Info.plist file includes appropriate entries referencing the file. See https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleicons Is this something we should be worried about? Cheers, Walter
1
0
732
Aug ’23
Disappearing empty Smart App Banner
My team recently released an app to the iOS app store. We are trying to add the Smart App Banner to our website to promote the app, but the banner is not shown. When the page loads, there is a flash of an empty Smart App Banner before it is automatically dismissed. This happens on every page load. If I put use an app ID of other apps the banner appears. I've triple checked that I'm using the correct app ID. So it seems like it is an issue with my app. I can see my app in the App Store, so I know it's available. I've tested on multiple phones.
29
4
6.7k
Sep ’23
Localization settings hidden if only 1 preffered language in iOS
I have added additional localizations into my iOS app. iOS is not available in those languages. So I did as it is suggested that you redirect customers to app settings view UIApplication.openSettingsURLString and there they can select another app language. Unfortunately they do not see language selection if they do not have set at least 2 Preferred languages in General -> Languages & Region. Also it does not matter what languages they have there. If my app does not support those then it still shows all localizations available. Is there somehow to force it? So it would be visible always? Since most people in my country have iPhones only in English but would like to use Apps in their native language.. Since they do not have 2 preferred languages they cant see the selection :(
6
6
2.8k
Mar ’24
XCODE 14.1 stuck on "launching application" Mac M1
After updating my Xcode, my Xcode is always stuck on "launching app" and the simulator is on a black screen every 2nd time I run the code. Steps to duplicate. Close the simulator Build and run code Here, Xcode runs the code perfectly. After I made changes in the code and re-ran the code, Xcode is now stuck on "launching app" and the simulator is on a black screen To rerun the code, I would have to go back to step 1 again to run the app on the simulator. Does anyone have an idea of how I can fix this? I tried removing derived data, and changing simulators, doing sudo xcrun simctl erase all in the terminal but didn't fix the issue.
9
6
2.9k
Dec ’23
compareDistance in Vision not working as expected
Hi, When using VNFeaturePrintObservation and then computing the distance using two images, the values that it returns varies heavily. When two identical images (same image file) is inputted into function (below) that I have used to compare the images, the distance does not return 0 while it is expected to, since they are identical images. Also, what is the upper limit of computeDistance? I am trying to find the percentage similarity between the two images. (Of course, this cannot be done unless the issue above is resolved). Code that I have used is below func featureprintObservationForImage(image: UIImage) -> VNFeaturePrintObservation? {     let requestHandler = VNImageRequestHandler(cgImage: image.cgImage!, options: [:])     let request = VNGenerateImageFeaturePrintRequest()     request.usesCPUOnly = true // Simulator Testing     do {       try requestHandler.perform([request])       return request.results?.first as? VNFeaturePrintObservation     } catch {       print("Vision Error: \(error)")       return nil     }   }   func compare(origImg: UIImage, drawnImg: UIImage) -> Float? {     let oImgObservation = featureprintObservationForImage(image: origImg)     let dImgObservation = featureprintObservationForImage(image: drawnImg)     if let oImgObservation = oImgObservation {       if let dImgObservation = dImgObservation {         var distance: Float = -1         do {           try oImgObservation.computeDistance(&distance, to: dImgObservation)         } catch {           fatalError("Failed to Compute Distance")         }         if distance == -1 {           return nil         } else {           return distance         }       } else {         print("Drawn Image Observation found Nil")       }     } else {       print("Original Image Observation found Nil")     }     return nil   } Thanks for all the help!
4
1
2.0k
Sep ’23
WeatherKit Historical Data Request Limited to 10 Days
Until recently, I was unable to use WeatherKit to obtain historical Daily data. Now, it appears that I can retrieve Daily and Hourly historical data, but the returned data is limited to a ten day period. No matter what start and end dates are included, I get data from start date to 10 days later (assuming the end date was more than 10 days after the start). Is this a permanent restriction? Example: let historicalData = try await weatherService.weather(for: location, including: .daily(startDate: startDate, endDate: endDate))
2
1
1.4k
Nov ’23
Unfinished transactions not being emitted on start of app
I'm using the iOS simulator with a StoreKit configuration file. I can see that there have been transactions while the app has been closed, but my StoreKit 2 listener is never called with those updates to be able to finish them When I open my app from a cold start. I've added a listener on application(_:didFinishLaunching:launchOptions:) like this: func startObservingTransactions() { task = Task(priority: .background) { for await result in Transaction.updates { if case .verified(let transaction) = result { await transaction.finish() } } } } But the Transaction.updates loop never gets called (have added breakpoints to check). It's only ever called when a purchase is made, or subsequent transaction renewals when the app is open. Only then it will get the previously unfinished transactions. Steps to reproduce: Create an app with a StoreKit config file (with sped up transactions) to purchase an item Make a purchase then quit the app Wait for a bit for more transactions to be made while the app is closed. Open the app from a cold start and none of the transactions will be finished by the listener in your app. Cancel the subscription via the transaction manager. Close and open the app from a cold start. The first transaction will be finished by the listener but none of the others will be. In Apple's docs it says If your app has unfinished transactions, the listener receives them immediately after the app launches Why is this not the case?
14
2
3.4k
3w