Post

Replies

Boosts

Views

Activity

Does anybody know if its possible to manually do something with raw Crashlytics files directly extracted from a phone?
I've got a crash occurring at app launch time, its crashing too early for Crashlytics to have a chance to send off its stuff to its website. The person on who's phone it is crashing is tech savvy so we've managed to extract the Apple crash report and the Crashlytics directly full of loads of stuff. The Apple crash report is very useful, but I'd like to supplement the information obtained from the with that from Crashltyics (not the actual crash stack, Crashlytics can't improve on what Apple do) but some breadcrumbs that Crashlytics ought to have. I've opened all the files but there's nothing human readable, I asked this question of their customer support but they never replied. Anybody happen to know if the raw Crashlytics files can manually be munged into a human readable form, or manually uploaded to the Crashlytics web site?
0
0
361
Oct ’23
Changes to light/dark mode aren't detectable within a notification service extension unless the phone is restarted
UPDATE: So I discovered that if UIScreen.main.traitCollection.userInterfaceStyle is called in a notification service extension then it doesn't detect any change to the iPhones light/dark mode unless the phone is restarted. (I tried with other extensions, changes are detected immediately in other extensions, however not with a notification service extension nor in a notification content extension). ORIGINAL POSTING: I've got a notification service extension which is populating the notification with images before it's displayed. The images are part of an image set with different images for light and dark modes. What I've discovered is that which image is displayed in the notification depends upon whatever mode the phone was in when the app was installed or when the phone was restarted and it will stay like that for any subsequent posted notifications forever regardless of what the phone's light/dark mode setting is, unless the phone is restarted. Here's an example to illustrate what I mean, here's an image set in the Media.xcassets for the extension, its called "Grunt". And here's some code in the extension: notificationContent!.title = "GRUNT" if let url = URL(forImageResource: "Grunt") { do { let attachment = try UNNotificationAttachment(identifier: "imageAttachment", url: url) notificationContent!.attachments = [attachment] } catch { NSLog("error") } } contentHandler(notificationContent!) When the app is installed, if the phone is set to light mode, then when a notification is posted the 2x Light image is displayed in the notification. If the phone's setting is then changed to dark, then the 2x Light image still continues to displayed in all subsequent notifications that get posted. Conversely, if the phone is set to dark mode when the app is installed then the 2x Dark image is displayed in a notification, similarly if the phone's settings are changed to Light, the Dark image continues to be displayed for any new notifications posted. Until the phone is restarted - then any new notification display in accordance with whatever the phone's dark mode is set to at the time the phone is restarted. In other words, if the phone's light/dark mode setting is changed, new notifications posted don't display the appropriate light/dark image from the image set unless the phone is restarted. (Occurs with both iOS 16 and 17)
3
0
1.2k
Nov ’23
Interactively running app extensions in Xcode 15 is dreadfully unreliable
Xcode has had the ability to debug app extensions for many years. However, several years ago it used to be so bad as to be unusable (extremely slow to load, very slow to run, and just utterly utterly unreliable). I'm glad to say this situation changed and for the past few years its been great, interactively running app extension with Xcode 14.2 or 14.3 is as stable and almost as quick as interacting with the main app. But unfortunately there's been a big step back in reliability in Xcode 15. Many times with Xcode 15 it just stops working, its just not possible to step into the code, stop at a breakpoint for app extensions. It's not like this all the time, sometimes it works just fine, but the problem is quite often it just stops working (by not working I mean breakpoints set in an app extension aren't hit, despite the path of control going through them and the extension being selected as the scheme to execute) The problem is once it stops working there's no way I've found to get it working again, restarting XCOde, rebuilding, restarting the phone, none of this works. Once Xcode has decided to stop working for debugging app extensions there's no apparent way to get it going again. It doesn't matter what type of extension it is - action extension, unwanted communication extension, notification service extension, ..... There's just something fundamentally regressed in XCode 15 that didn't exist with Xcode 14. Apple please can you investigate fixing this, it makes developing and debugging app extension impossible. At least are there any tips to try to attempt to reset Xcode to try and get it working again once its stopped interactively running the extensions?
0
0
634
Oct ’23
Xcode not creating readme, documentation, licenses files/folders for Swift Package
Looking at some tutorials on how to create a swift package (for iOS) they all start by creating a package within Xcode and then showing what files Xcode auto-generated. However with Xcode 15.1 there's lots of stuff mentioned in tutorials which isn't getting created, for example the readme file, the licenses file, a documentation directory and contents. Why is it not creating them? How to add them manually then? Because File/New doesn't have the option to create a Readme.md file for example.
1
0
484
Dec ’23
Loads of keychain dialogs that won't dismiss when building
I'm attempting to build and have lots of code sign dialogs pop up. I'm entering the correct password and selecting Always Allow (selecting just Allow doesn't make any different) but they won't dismiss, instead more appear. I've not found a way of getting rid of them - all the buttons are greyed out. Restarting the desktop doesn't get rid of them. I have to restart the Mac to get rid of them. Why won't they go away and how can I force them to go away? (Sonoma 14.2.1 / Xcode 15.2)
0
0
315
Jan ’24
Message filtering extension appears on one phone but not another
I created a message filter extension, then edited only a few lines from the template source code (for example to return something in the capabilities query). However no matter what I do, I just cannot get the app to appear in the Settings app - when I turn on "Filter Unknown Senders" there's nothing that appears to select my app. I've tried rebuilding, deleting/reinstalling the app, restarting the phone, it just won't appear. But then I switched to another phone, and with this phone, when I turn on "Filter Unknown Senders" my app does appear and can be selected and enabled. But I still cannot get this to happen on the first phone. Why does the exact same app, exact same build of the app to be precise, appear on one phone but not the other? The phone it works on has iOS 17.2.1 and the phone it doesn't work on has iOS 17.1.1
1
0
723
Jan ’24
Massive difference in time taken to scan contacts/perform action in Xcode versus TestFlight
I'm looking at some inefficient code that somebody wrote that repeatedly searches contacts within a loop, and that loop can execute hundreds or thousands of times. If I run the app via Xcode then its taking 20-30 seconds to execute, but if the app is downloaded from Testflight and run, the same code runs in less than a second. I'm presuming this difference is due to the scheme being debug for Xcode run but release for the archive scheme? Can the debug scheme really have such an enormous impact?
2
0
568
Feb ’24
Where's this contacts logging coming from?
When I run my app there's lots of logging in the console appearing, with it appearing with my app's name as the process. My app is accessing contacts, however I'm not logging this, so is the OS? The thing is, I'm testing performance with contacts databases which have thousands of entries in them, not only is this logging cluttering up the console making it difficult to examine, but I think the logging of so many thousands of line is affecting performance. Where is it coming from? Can it be turned off?
0
0
652
Feb ’24
iOS app/OS behavior with heavy background processing and differences between Xcode/Testflight/App Store
I'm analyzing an app which is doing some processing with contacts, and stress testing it with tens and tens of thousands of contacts which are being processed. The code is being processed within DispatchQueue.global(qos: .background).async {) When the app moves to the foreground the processing starts and continues after the app moves to the background. What I've noticed is that if the app is downloaded from TestFlight, then ~20 seconds after moving to the background, a dialog is displayed saying the App Crashed. Though it hasn't actually "crashed" in the usual sense of crash - there's no crash log present on the device nor in TestFlight if the crash is reported nor is there anything reported to Crashlytics. In addition the is still displayed in the iPhone task manager, also ApplicationWillTerminate() isn't called so it wasn't killed by the OS. This doesn't happen if the app is installed via Xcode and then run (not run via Xcode, installed via Xcode, then run independently from Xcode). When running via TestFlight installation I can see the OS logging" ReportCrash recordCrashEvent; isBeta 1 app stored Received a beta app crash notification. What's going on here, why is TestFlight reporting this? Is it erroneously reporting the background processing after 20 seconds as a crash? Is there anything the app should be doing in this situation that it isn't? Otherwise why is TF popping up that dialog?
0
0
623
Feb ’24
Interpreting a hang log
I have a hang log, too large to copy past all of it here. It showing [NSNotificationCenter postNotificationName:object:userInfo:] in the stack. Does that mean there was a hang attempting to post a notification? How could that cause a hang, once the app posts a notification its out of its hands and in the hands of the OS. Or is that a red herring? How do I attach the full .ips file? When trying to add it via the Add File option, its grey and not selectable, if I change the extension .txt it says its too large to attach. Also how to format this? Copy/pasting it looks fine, but after hitting the save button all the formatting is lost. Formatting it as quote or code block also looses it all. Event: Timed Out Runloop Hang Duration: 9.99s Duration Sampled: 3.57s Steps: 344 (10ms sampling interval) Report threshold: 2s `Heaviest stack for the main thread of the target process: 344 start + 2240 (dyld + 24012) [0x1d8996dcc] 344 ??? (CallFilter + 69812) [0x10006d0b4] 344 UIApplicationMain + 340 (UIKitCore + 2276456) [0x1b8080c68] 344 -[UIApplication _run] + 888 (UIKitCore + 2278956) [0x1b808162c] 344 GSEventRunModal + 164 (GraphicsServices + 13560) [0x1f91de4f8] 344 CFRunLoopRunSpecific + 608 (CoreFoundation + 210040) [0x1b5c5d478] 344 __CFRunLoopRun + 828 (CoreFoundation + 211096) [0x1b5c5d898] 344 __CFRunLoopDoSources0 + 340 (CoreFoundation + 215996) [0x1b5c5ebbc] 344 __CFRunLoopDoSource0 + 176 (CoreFoundation + 222120) [0x1b5c603a8] 344 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 28 (CoreFoundation + 225580) [0x1b5c6112c] 344 -[FBSMainRunLoopSerialQueue _performNextFromRunLoopSource] + 28 (FrontBoardServices + 41848) [0x1ce0c4378] 344 -[FBSMainRunLoopSerialQueue _targetQueue_performNextIfPossible] + 240 (FrontBoardServices + 42144) [0x1ce0c44a0] 344 FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK + 52 (FrontBoardServices + 42272) [0x1ce0c4520] 344 _dispatch_block_invoke_direct + 284 (libdispatch.dylib + 32072) [0x1bdc24d48] 344 _dispatch_client_callout + 20 (libdispatch.dylib + 17152) [0x1bdc21300] 344 __92-[FBSWorkspaceScenesClient createSceneWithIdentity:parameters:transitionContext:completion:]_block_invoke + 352 (FrontBoardServices + 106380) [0x1ce0d3f8c] 344 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 168 (FrontBoardServices + 57756) [0x1ce0c819c] 344 __92-[FBSWorkspaceScenesClient createSceneWithIdentity:parameters:transitionContext:completion:]_block_invoke.108 + 280 (FrontBoardServices + 62832) [0x1ce0c9570] 344 -[FBSScene _callOutQueue_didCreateWithTransitionContext:completion:] + 324 (FrontBoardServices + 63188) [0x1ce0c96d4] 344 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 288 (UIKitCore + 2422752) [0x1b80a47e0] 344 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 508 (UIKitCore + 2423368) [0x1b80a4a48] 344 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 244 (UIKitCore + 1274564) [0x1b7f8c2c4] 344 -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 216 (UIKitCore + 1274964) [0x1b7f8c454] 344 __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke.225 + 612 (UIKitCore + 4964520) [0x1b83110a8] 344 -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 316 (UIKitCore + 1278672) [0x1b7f8d2d0] 344 _UISceneSettingsDiffActionPerformChangesWithTransitionContextAndCompletion + 224 (UIKitCore + 1279520) [0x1b7f8d620] 344 +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:fromCurrentState:actions:completion:] + 736 (UIKitCore + 1281432) [0x1b7f8dd98] 344 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke + 148 (UIKitCore + 1281680) [0x1b7f8de90] 344 -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 248 (UIKitCore + 1281984) [0x1b7f8dfc0] 344 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 608 (UIKitCore + 1283672) [0x1b7f8e658] 344 -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 332 (UIKitCore + 1289296) [0x1b7f8fc50] 344 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 216 (UIKitCore + 2175308) [0x1b806814c] 344 _UIScenePerformActionsWithLifecycleActionMask + 112 (UIKitCore + 1621112) [0x1b7fe0c78] 344 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke_2 + 108 (UIKitCore + 1621280) [0x1b7fe0d20] 344 -[UIApplication _stopDeactivatingForReason:] + 1240 (UIKitCore + 1623808) [0x1b7fe1700] 344 -[NSNotificationCenter postNotificationName:object:userInfo:] + 92 (Foundation + 173988) [0x1b4bee7a4] 344 _CFXNotificationPost + 724 (CoreFoundation + 188728) [0x1b5c58138] 344 _CFXRegistrationPost + 440 (CoreFoundation + 191464) [0x1b5c58be8] 344 ___CFXRegistrationPost_block_invoke + 88 (CoreFoundation + 191648) [0x1b5c58ca0] 344 CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER + 148 (CoreFoundation + 193240) [0x1b5c592d8] Thread 0x403e DispatchQueue "com.apple.main-thread"(1) 344 samples (1-344) priority 47 (base 47) 344 start + 2240 (dyld + 24012) [0x1d8996dcc] 344 ??? (CallFilter + 69812) [0x10006d0b4] 344 UIApplicationMain + 340 (UIKitCore + 2276456) [0x1b8080c68] 344 -[UIApplication _run] + 888 (UIKitCore + 2278956) [0x1b808162c] 344 GSEventRunModal + 164 (GraphicsServices + 13560) [0x1f91de4f8] 344 CFRunLoopRunSpecific + 608 (CoreFoundation + 210040) [0x1b5c5d478] 344 __CFRunLoopRun + 828 (CoreFoundation + 211096) [0x1b5c5d898] 344 __CFRunLoopDoSources0 + 340 (CoreFoundation + 215996) [0x1b5c5ebbc] 344 __CFRunLoopDoSource0 + 176 (CoreFoundation + 222120) [0x1b5c603a8] 344 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 28 (CoreFoundation + 225580) [0x1b5c6112c] 344 -[FBSMainRunLoopSerialQueue _performNextFromRunLoopSource] + 28 (FrontBoardServices + 41848) [0x1ce0c4378] 344 -[FBSMainRunLoopSerialQueue _targetQueue_performNextIfPossible] + 240 (FrontBoardServices + 42144) [0x1ce0c44a0] 344 FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK + 52 (FrontBoardServices + 42272) [0x1ce0c4520] 344 _dispatch_block_invoke_direct + 284 (libdispatch.dylib + 32072) [0x1bdc24d48]
1
0
591
Feb ’24
App hang - .ips files differ but all mention logging?
My app has occasionally randomly started hanging. I have extensive logging in it, so you'd think it'd be easy to find out where its hanging (look at the last line logged etc.) However its hanging at different places each time it runs, so its impossible to debug. I've got several .ips files from off the handset, and they're all different. But a few of them have the same pattern at the top which is: 0 __unlock_wait2 NSLog If I open some in Xcode, it doesn't display any useful info or jump to a line of my code, it shows "deferred_logger". What do these mean? The common theme of mentioning logging can't be a co-incidence? Is there something wrong with the logging, is it being overloaded or something? If I turn off verbose logging to reduce the amount, the issues still persist, implying its not an overloaded logging situation. What could be going on?
0
0
433
Feb ’24
UNUserNotificationCenter.current().removeDeliveredNotifications() is hanging
An app is hanging randomly on app launch, after looking into it, it appears it's hanging on a call to UNUserNotificationCenter.current() calls. I say this because there's logging and the sometimes the last line logged is prior to a call to UNUserNotificationCenter() I have a hang log (.ips file) rom the iPhone and at the bottom it says this. I presume blockingThreadInfo is talking about the thread being blocked, and it identifies the topBlockingProcess as user notifications. "blockingThreadInfo" : { "topBlockingProcess" : "usernotificationsd", The following is the code, why would this code cause a hang? The problem occurs when there's lots of notifications that have been posted i.e. something like 100. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(appBecameActive) name: UIApplicationDidBecomeActiveNotification object:nil]; @objc func appBecameActive() { method1() method2() } @objc func method1() { UNUserNotificationCenter.current().getDeliveredNotifications { notifications in if SettingsManager.isProductionFinalBuild() == false { // Log notification center contents for notification in notifications { let title = notification.request.content.title let targetId = notification.request.content.targetContentIdentifier let threadId = notification.request.content.threadIdentifier let categoryIdentifer = notification.request.content.categoryIdentifier let identifier = notification.request.identifier let info = notification.request.content.userInfo Logger.trace("Previously delivered notification: title: \(title) identifier: \(identifier) threadId: \(threadId) category: \(categoryIdentifer) target id: \(String(describing: targetId)) userInfo: \(info)") } let matchchingNotifications = notifications.filter({ $0.request.identifier == kMdnAccountNotFoundNotificationIdentifier }) UNUserNotificationCenter.current().removeDeliveredNotifications(withIdentifiers: [kMdnAccountNotFoundNotificationIdentifier]) } } func method2() { UNUserNotificationCenter.current().removePendingNotificationRequests(withIdentifiers: [Constants.kWhatsNewNotificationIdentifier]) UNUserNotificationCenter.current().removeDeliveredNotifications(withIdentifiers: [Constants.kWhatsNewNotificationIdentifier]) }
1
0
922
Feb ’24
Developer cert says revoked on one Mac but not on another
I've installed the same developer certificate onto three different Macs. When viewed in the keychain (or in Xcode) on one Mac it says its revoked, on another it says its not trusted, but on a third there's no issue reported. How could there be a difference between the three Macs? (Both Macs have the date/time set to be the same). Can 3rd party software, VPNs etc. interfere in this at all?
1
0
719
Feb ’24
Frameworks, Libraries, and Embedded content versus Link Binary With Library
I'm experimenting with creating a Framework and have noticed a difference when dragging and dropping/or adding it into a project. If I create a brand new app and add the Framework then Xcode automatically creates a "Frameworks, Libraries, and Embedded" section within the app settings general section. The framework gets added with a default embed setting of Do Not Embed, which can be changed to Embed & Sign or Embed without Signing. However, I have an existing app which doesn't already contain a "Frameworks, Libraries, and Embedded section" section, if I add the framework to that app then Xcode is NOT creating a "Frameworks, Libraries, and Embedded section", instead it is adding the framework to the existing "Link Libraries with Binary" section. However this section does not have the embed box that a "Frameworks, Libraries, and Embedded" section has. Why is there this difference? And how can you choose whether to sign or not the framework if its been added by Xcode to the "Link Binary With Libraries" section rather than the "Frameworks, Libraries, and Embedded" section. I am finding that when Xcode adds the framework to the "Link Binary With Libraries" section and the app is run then there are run time errors about the framework not being able to be found, this does not occur when it gets added to the "Frameworks, Libraries, and Embedded" section. Is it possible to there explicitly create a "Frameworks, Libraries, and Embedded" section? I can't find one, nor can I get Xcode to create one, it keeps insisting on adding the Framework to "Link Binary With Libraries", which results in the app not running.
0
0
729
May ’24