Post

Replies

Boosts

Views

Activity

Crash: IndexPath.section.getter + 168
Hello everyone! My app is getting a crash in the tableView(_:trailingSwipeActionsConfigurationForRowAt:) function. Apparently, the app is crashing when trying to get the indexPath.section value. I am attaching the crash log. This is not reproducible for me. I have the hunch that this might be related to some accessibility feature, but I have not been able to corroborate it yet. I am not sure how to solve this issue or how to move forward since I still don't know what is causing the app. Any advice or guidance is really appreciated. Thank you! Crashed: com.apple.main-thread EXC_BREAKPOINT 0x00000001bd99e0c8 Crashed: com.apple.main-thread 0&#9;libswiftUIKit.dylib&#9;&#9;&#9;&#9;&#9;&#9;0x1bd99e0c8 IndexPath.section.getter + 168 1&#9;MyApp&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;0x1033697a4 TableDelegate.tableView(_:trailingSwipeActionsConfigurationForRowAt:) + 337 (TableDelegate.swift:337) 2&#9;MyApp&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;0x103369e58 @objc TableDelegate.tableView(_:trailingSwipeActionsConfigurationForRowAt:) + 4316896856 (<compiler-generated>:4316896856) 3&#9;UIKitCore&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;0x1ad80b9cc -[UITableView _trailingSwipeConfigurationAtIndexPath:fromRemoveButton:] + 1892 4&#9;UIKit&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;0x1f0935c34 -[UITableViewCellAccessibility _privateAccessibilityCustomActions] + 540 5&#9;UIAccessibility&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;0x1bd9d8854 -[NSObject(AXPrivCategory) _retrieveCustomActionsForElement:] + 68 6&#9;UIAccessibility&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;0x1bd9d8b0c -[NSObject(AXPrivCategory) _accessibilityCustomActions] + 220 7&#9;UIAccessibility&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;0x1bd9f990c -[NSObjectAccessibility accessibilityRespondsToUserInteraction] + 424 8&#9;UIKit&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;0x1f0952f6c -[UIViewAccessibility accessibilityRespondsToUserInteraction] + 124 9&#9;UIKit&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;0x1f08f3440 -[UILabelAccessibility accessibilityRespondsToUserInteraction] + 120 10 UIKit&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;0x1f0959678 -[UIViewAccessibility _isEligibleForFocusInteraction] + 124 11 UIKitCore&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;0x1ad07f4e4 _UIFocusEnvironmentIsEligibleForFocusInteraction + 64 12 UIKitCore&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;0x1ad0acb44 __UIFocusMapRecurseSearchForFocusSystemInEligibleContainer + 148 13 UIKitCore&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;0x1ad0c30f8 -[_UIFocusMapSnapshot addRegionsInContainer:] + 64 14 UIKitCore&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;0x1ad0c32fc -[_UIFocusMapSnapshot addRegionsInContainers:] + 196 15 UIKitCore&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;0x1adad78cc -[UIView _searchForFocusRegionsInContext:] + 924 16 UIKitCore&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;0x1ad0c3178 -[_UIFocusMapSnapshot addRegionsInContainer:] + 192 17 UIKitCore&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;0x1ad0c32fc -[_UIFocusMapSnapshot addRegionsInContainers:] + 196 50 UIKitCore&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;0x1ada9595c -[_UIAfterCACommitBlock run] + 64 51 UIKitCore&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;0x1ad5ff79c _runAfterCACommitDeferredBlocks + 296 52 UIKitCore&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;0x1ad5eeb4c _cleanUpAfterCAFlushAndRunDeferredBlocks + 200 53 UIKitCore&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;0x1ad620260 _afterCACommitHandler + 76 54 CoreFoundation&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9; 0x1aad2fecc CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 32 55 CoreFoundation&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9; 0x1aad2a5b0 __CFRunLoopDoObservers + 604 56 CoreFoundation&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9; 0x1aad2aaf8 __CFRunLoopRun + 960 57 CoreFoundation&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9; 0x1aad2a200 CFRunLoopRunSpecific + 572 58 GraphicsServices&#9;&#9;&#9;&#9;&#9;&#9;&#9; 0x1c0e25598 GSEventRunModal + 160 59 UIKitCore&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;0x1ad5f0004 -[UIApplication _run] + 1052 60 UIKitCore&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;0x1ad5f55d8 UIApplicationMain + 164 61 MyApp&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;0x102d7d654 main + 16 (AppDelegate.swift:16) 62 libdyld.dylib&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;0x1aaa09598 start + 4 Full crash log - https://developer.apple.com/forums/content/attachment/4049d9cc-89db-4d2c-a4d9-d71127396799
10
1
3.9k
Oct ’20
How to detect if an iPad has GPS
Hi everyone! Because of a business requirement, we need to know if the current device has GPS or not so, I have been researching this without any success. We could say that all of the iPhones have a built-in GPS, so this all comes down to the iPads. I wanted to try to confirm here: Do you know if there is any public API that says if an iOS device has GPS or not? On the other hand, only the Wifi + Cellular iPads have GPS, the WiFi-Only iPads don't have this. Therefore, we could say something like "If the device has cellular technology, then it has a GPS". I found this answer in SO which shows how to accomplish the cellular detection: https://stackoverflow.com/questions/7101206/know-if-ios-device-has-cellular-data-capabilities/14507324#14507324 We have been able to test this out on 3 iPads: two WiFi + Cellular models, and the other one a WiFi-Only iPad. The result looks good. I wanted to ask: Is this the right way to detect cellular technology? (I do not seem to find detailed information about the "pdp_ip0" interface) is this a safe way to detect if an iPad has GPS or not? Thanks in advance!
4
0
6.3k
May ’21
Crash: [NSTaggedPointerString count]: unrecognized selector sent to instance 0x8000000000000000
Hello guys, I am trying to debug the following crash: [NSTaggedPointerString count]: unrecognized selector sent to instance 0x8000000000000000 Fatal Exception: NSInvalidArgumentException 0 CoreFoundation 0x19af619d8 __exceptionPreprocess 1 libobjc.A.dylib 0x1af2e7b54 objc_exception_throw 2 CoreFoundation 0x19ae71bbc -[NSOrderedSet initWithSet:copyItems:] 3 CoreFoundation 0x19af6401c ___forwarding___ 4 CoreFoundation 0x19af65f8c _CF_forwarding_prep_0 5 libswiftCore.dylib 0x19e9e4d70 Dictionary._Variant.updateValue(_:forKey:) ... More lines... 24 MyApplication 0x10424c23c main + 15 (AppDelegate.swift:15) 25 libdyld.dylib 0x19abb9568 start The thing is that the stack trace and the crash reason changes in each report, some of the crash reason I have seen are: [NSTaggedPointerString count]: unrecognized selector sent to instance 0x8000000000000000 -[__NSCFNumber count]: unrecognized selector sent to instance 0x8000000000000000 EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000010 This seems to be related to some thread safety issues based on some other threads: https://developer.apple.com/forums/thread/116028 I am attaching an implementation sample of what the code is doing right now Implementation Sample Basically, the code where this crash is happening is using a DispatchGroup object, before calling the .leave() method, this is updating a dictionary property that was declared before. At that point, the code seems to be running on another thread which is causing the issue. If this is a thread issue, what are my options here? What would be the easiest thing to fix this issue? Thanks in advance!!
3
0
5.8k
Jun ’21
Is it possible to prevent response caching across the app? (Including external libraries)
As part of a security assessment, we discovered that our app is storing sensitive information in the cache. After some research and considering the recommendations, we decide to use .ephemeral configurations for our URLSessions, so far so good. However, taking a look at the content in the cfurl_cache_receiver_data table, we realized that some of those responses are not part of any of our endpoints, meaning that this is probably coming from requests made for third-party libraries that we use and we were able to confirm this by using a tool to inspect network traffic. My understanding is the cache mechanism is attached to a URLSessionConfiguration and, at the same time, this configuration is tied to a URLSession. Since this is not our code and therefore different URLSessions it makes sense that this caches the responses for any request. Please correct me if this is wrong. I am wondering if there is a way to disable the caching across the app (including requests made for third-party libraries?) or if there is a different/better approach to this? I am attaching a screenshot of the cfurl_cache_receiver_data table content. For example: token=[value]. This is not the response of one of our endpoints, but an external one. Thanks in advance! PD: Is there a way to easily map the data in the cache.db with the particular endpoint/request?
1
0
1.1k
Apr ’22