Posts

Post not yet marked as solved
0 Replies
157 Views
I have gotten the following crash now two times in an app that is otherwise used a lot and is running fine: Reason: -[NSNull startAccessingSecurityScopedResource]: unrecognized selector sent to instance 0x1f277c230 Stacktrace: ( 0 CoreFoundation 0x000000019c48087c B37A1273-B0C2-312E-9E0B-7143FB645C69 + 968828 1 libobjc.A.dylib 0x000000019479fc00 objc_exception_throw + 60 2 CoreFoundation 0x000000019c51119c B37A1273-B0C2-312E-9E0B-7143FB645C69 + 1560988 3 CoreFoundation 0x000000019c3c5ff8 B37A1273-B0C2-312E-9E0B-7143FB645C69 + 204792 4 CoreFoundation 0x000000019c506b10 _CF_forwarding_prep_0 + 96 5 UIKitCore 0x000000019edae6a8 F1A8BD61-9CF2-3054-B622-CB63D6CEB4CB + 8349352 6 QuickLook 0x000000020ea213b4 D43C66FB-A39B-304E-A81B-8ADBFAAE2882 + 308148 7 QuickLook 0x000000020ea415bc D43C66FB-A39B-304E-A81B-8ADBFAAE2882 + 439740 8 QuickLook 0x000000020ea3ff38 D43C66FB-A39B-304E-A81B-8ADBFAAE2882 + 433976 9 QuickLook 0x000000020ea40378 D43C66FB-A39B-304E-A81B-8ADBFAAE2882 + 435064 10 libdispatch.dylib 0x00000001a434f6a8 89420547-98A3-352A-AD2B-BBCB6006FB29 + 9896 11 libdispatch.dylib 0x00000001a4351300 89420547-98A3-352A-AD2B-BBCB6006FB29 + 17152 12 libdispatch.dylib 0x00000001a435f998 89420547-98A3-352A-AD2B-BBCB6006FB29 + 76184 13 libdispatch.dylib 0x00000001a435f5b0 _dispatch_main_queue_callback_4CF + 44 14 CoreFoundation 0x000000019c3cb20c B37A1273-B0C2-312E-9E0B-7143FB645C69 + 225804 15 CoreFoundation 0x000000019c3c7f18 B37A1273-B0C2-312E-9E0B-7143FB645C69 + 212760 16 CoreFoundation 0x000000019c3c7668 CFRunLoopRunSpecific + 608 17 GraphicsServices 0x00000001df7925ec GSEventRunModal + 164 18 UIKitCore 0x000000019e7e42b4 F1A8BD61-9CF2-3054-B622-CB63D6CEB4CB + 2278068 19 UIKitCore 0x000000019e7e38f0 UIApplicationMain + 340 20 MyApp 0x0000000102c06280 MyApp + 483968 21 dyld 0x00000001bee1adcc A795AD37-6266-385E-95E6-C1CA804C926E + 24012 ) The symbol MyApp + 483968 just resolves to the main() function. I'm not using this startAccessingSecurityScopedResource anywhere in my app. What could I do to debug this issue?
Posted
by l00.
Last updated
.
Post not yet marked as solved
1 Replies
162 Views
Up until iOS 16.4 hyperlinks in PDF files that were shown using UIDocumentInteractionController have been working. One could just click on a link to get a "open link?" dialog. In iOS 17 the links cannot be tapped any more. Is this a bug, is this a feature and can it be re-enabled again somehow?
Posted
by l00.
Last updated
.
Post not yet marked as solved
0 Replies
406 Views
Every once in a while I find myself in need of a modal activity indicator that completely blocks the app (except for the activity indicator itself being tappable and therefore acting as a cancel button). I have always implemented my own view for that. The screenshot is showing my current implementation in SwiftUI. My question: why isn't there a standard iOS provided view for that scenario? Is there a best practice to that? Or am I missing something? Isn't it a common scenario having to block the app until an operation is completed like in the registration view of the attached screenshot, where the user has to wait for the network operation to finish?
Posted
by l00.
Last updated
.
Post not yet marked as solved
5 Replies
2.4k Views
I have a UITableView based up. It is running fine on all iOS versions including 15.0. It is also running fine on all iPadOS versions up to 14.x. But only on iPadOS 15.0 it crashes with the following error message: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'unable to dequeue a cell with identifier TextCell - must register a nib or a class for the identifier or connect a prototype cell in a storyboard' Is this a know issue? How can I debug it to figure out where the problem lies? Note that I actually do register the NIB as follows in viewDidLoad: static NSString *reuseIdentifierTextCell = @"TextCell"; [self.tableView registerNib:[UINib nibWithNibName:@"ChatTextCellCondensed" bundle:nil] forCellReuseIdentifier:reuseIdentifierTextCell]; It is crashing at this line in cellForRowAtIndexPath: cell = [tableView dequeueReusableCellWithIdentifier:reuseIdentifierTextCell forIndexPath:indexPath]; Thanks!
Posted
by l00.
Last updated
.
Post marked as solved
2 Replies
615 Views
I'm generating a date for a JSON file like so: NSDateFormatter *dateFormatterIso8601 = [NSDateFormatter new]; [dateFormatterIso8601 setDateFormat:@"yyyy-MM-dd'T'HH:mm:ssZZZZZZ"]; [jsonDict setObject:[dateFormatterIso8601 stringFromDate:startDate] forKey:@"start"]; How is it possible that this is producing a JSON file with a date string of 2022-07-12T4:04:23GMT+02:00? There is a leading 0 missing for the hour. Is this a known bug?
Posted
by l00.
Last updated
.
Post marked as solved
3 Replies
467 Views
In the lastest iOS 15 if found the following to be the case regarding the combination of the global autocapitalization setting in the iOS Settings app and the autocapitalizationType property: | Global setting | autocapitalizationType | Result (does it capitalize? | |----------------|-------------------------|-----------------------------| | on | Sentences | yes | | on | not set | no | | off | Sentences | no | | off | not set | no | What is the logic behind this? On a side note, I also believe that in the second row of the above table, we had a 'yes' in earlier versions of iOS.
Posted
by l00.
Last updated
.
Post marked as solved
12 Replies
2.4k Views
Usually when a crash is happening on iOS when the simulator or device is attached to Xcode I get a crash reason like the following example: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** +[NSJSONSerialization dataWithJSONObject:options:error:]: value parameter is nil' When I look at the crashes of my published app in the Xcode Organizer using "Open in Project..." I see on which line of code the crash did happen. But is it also possible to get a reason for the crash like the above? I'm asking this about Xcode Version 13.0.
Posted
by l00.
Last updated
.
Post not yet marked as solved
0 Replies
571 Views
I'm using the following code in my Info.plist to get my app to appear in the "Open in.." menu via the sharing button for PDF files: <key>CFBundleDocumentTypes</key> <array> <dict> <key>CFBundleTypeName</key> <string>PDF</string> <key>LSHandlerRank</key> <string>Alternate</string> <key>LSItemContentTypes</key> <array> <string>com.adobe.pdf</string> </array> </dict> </array> This is working fine. But I cannot get the same effect for any type of image file. I was trying to add this according to some Stackoverflow posts: <dict> <key>CFBundleTypeName</key> <string>public.jpeg</string> <key>LSHandlerRank</key> <string>Alternate</string> <key>LSItemContentTypes</key> <array> <string>public.jpeg</string> <string>public.jpg</string> </array> </dict> <dict> <key>CFBundleTypeName</key> <string>public.png</string> <key>LSHandlerRank</key> <string>Alternate</string> <key>LSItemContentTypes</key> <array> <string>public.png</string> </array> </dict> However, it is not working for images. Is this supported? Should it work?
Posted
by l00.
Last updated
.
Post not yet marked as solved
1 Replies
468 Views
Back in 2018 I used to get times in the range from 140 to 170 seconds when calling [UIApplication sharedApplication].backgroundTimeRemaining. Today running on the latest iOS 14 Beta I get about 10 to 20 seconds. My questions: Is this documented somewhere? What times can be expected with which version of iOS? Did you experience the same issue? Is there a way to request more time? (I would need about 60 seconds)
Posted
by l00.
Last updated
.
Post not yet marked as solved
3 Replies
2.6k Views
We've used to be able to send content-available=1 silent push messages in a reliable way to an app to trigger functionality while the app was running. Since iOS 13 this has become a big problem becuase of this new statement: "The number of background notifications allowed by the system depends on current conditions, but don’t try to send more than two or three per hour."(https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/pushing_background_updates_to_your_app?language=objc). According to my tests, you simply cannot rely on background messages being delivered to the app (even with apns-priority and apns-push-type all correctly set according to the docs).One very ugly way to work around this is to send apns-push-type=alert type messages with no visible content and with a sound that points to a 0 byte audiofile. Certainly not a sustainable way to solve the problem.Is there any way to send a message to an app in a reliable way other than to implement a permanently open socket by yourself?
Posted
by l00.
Last updated
.
Post not yet marked as solved
0 Replies
481 Views
A lot has been written about it and things have changed between iOS versions many times. I myself have used many workarounds to do it but I would like to ask: As of 2020 what is the current and correct way to receive GPS locations while the app is in the background and submit those periodically to a server? Is that possible at all? Is it supported?
Posted
by l00.
Last updated
.
Post not yet marked as solved
1 Replies
3.6k Views
I would like to empty the trash on my external USB stick only. I've used torm -rf /Volumes/usbstick/.Trashesbut that doesn't work any more with Catalina (operation not permitted). How can I selectively delete the trash on a USB stick in Catalina?
Posted
by l00.
Last updated
.
Post not yet marked as solved
1 Replies
763 Views
Today I found out that in order for background push to be working on iOS 13, I need to set a new header called "apns-push-type". According to the documentation, this header is "Required when delivering notifications to devices running iOS 13 and later [...]".My question is more of a general type: How is a developer supposed to prepare for a new iOS version and become aware of such things?The following questions arise:Is there an official document or guidline along the way of "what needs to be changed for the upcoming iOS version"?Why is something like that not mentioned in the release notes?Are we expected to re-read the whole API documentation?Are we expected to watch all WWDC speeches?Are we expected to catch such changes via trial and error using the developer beta versions?... or did I just miss something?
Posted
by l00.
Last updated
.
Post not yet marked as solved
3 Replies
2.8k Views
I'm using the UIDocumentInteractionController. It's initialized with an absolute URL like so:[UIDocumentInteractionController interactionControllerWithURL:absoluteFileURL];The app is crashing on iOS 13 (it did work fine up and including iOS 12) with the following output in the console:2019-07-19 11:24:18.684359+0200 APP Test[77348:2475747] [default] QLUbiquitousItemFetcher: &lt;QLUbiquitousItemFetcher: 0x600002667c50&gt; could not create sandbox wrapper. Error: Error Domain=NSPOSIXErrorDomain Code=22 "couldn't issue sandbox extension com.apple.quicklook.readonly for '/Users/me/Library/Developer/CoreSimulator/Devices/32E561F2-970D-4065-845E-79F543BA998B/data/Containers/Data/Application/9AEAF606-4407-41CD-8465-D25F25238FD9/Documents/385b424e-1c3a-ff39-aff8-93b5c3492a23/MYFILE.175/MYFILE_501.jpeg': Invalid argument" UserInfo={NSDescription=couldn't issue sandbox extension com.apple.quicklook.readonly for '/Users/me/Library/Developer/CoreSimulator/Devices/32E561F2-970D-4065-845E-79F543BA998B/data/Containers/Data/Application/9AEAF606-4407-41CD-8465-D25F25238FD9/Documents/385b424e-1c3a-ff39-aff8-93b5c3492a23/MYFILE.175/MYFILE_501.jpeg': Invalid argument} #PreviewItem2019-07-19 11:24:18.718760+0200 APP Test[77348:2475747] [default] URL cannot be nil when trying to fetch the contents of QLUbiquitousItemFetcher #PreviewItem2019-07-19 11:24:18.718946+0200 APP Test[77348:2475747] [default] Will show error view because presenter could not successfully fetch content of preview item: &lt;QLItem: 0x60000396b500&gt; - , contents: (null), error: Error Domain=com.apple.quicklook.QLUbiquitousItemFetcher Code=0 "(null)". #PreviewControllerI did confirm that the file does exist at the path /Users/me/Library/Developer/CoreSimulator/Devices/32E561F2-970D-4065-845E-79F543BA998B/data/Containers/Data/Application/9AEAF606-4407-41CD-8465-D25F25238FD9/Documents/385b424e-1c3a-ff39-aff8-93b5c3492a23/MYFILE.175/MYFILE_501.jpeg.What exactly is it that did change in iOS 13 in this area?
Posted
by l00.
Last updated
.