Debugging

RSS for tag

Discover and resolve issues with your app.

Posts under Debugging tag

200 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Posting a Crash Report
If you need help investigating a crash, please include a crash report in your post. To smooth things along, follow these guidelines: For information on how to get a crash report, see Acquiring crash reports and diagnostic logs. Include the whole crash report as a text attachment (click the paperclip icon and then choose Add File). This avoids clogging up the timeline while also preserving the wealth of information in the crash report. If you’re not able to post your crash report as an attachment, see Can’t Post Crash Report as Attachment below. If you want to highlight a section of the report, include it in the main body of your post. Put the snippet in a code block so that it renders nicely. To create a code block, add a delimiter line containing triple backquotes before and after the block, or just click the Code Block button. If possible, post an Apple crash report. Third-party crash reporters are often missing critical information and have general reliability problems (for an explanation as to why, see Implementing Your Own Crash Reporter). Symbolicate your crash report before posting it. For information on how to do this, see Adding identifiable symbol names to a crash report. If you need to redact the crash report, do so consistently. Imagine you’re building the WaffleVarnish app whose bundle ID is com.example.wafflevarnish but you want to keep your new waffle varnishing technology secret. Replace WaffleVarnish with WwwwwwVvvvvvv and com.example.wafflevarnish with com.eeeeeee.wwwwwwvvvvvvv. This keeps the text in the crash report aligned while making it possible to distinguish the human-readible name of the app (WaffleVarnish) from the bundle ID (com.example.wafflevarnish). Finally, for information on how to use a crash report to debug your own problems, see Diagnosing issues using crash reports and device logs. Can’t Post Crash Report as Attachment Crash reports have two common extensions: .crash and .ips. DevForums lets you attach the first but not the second (r. 117468172). To work around this, change the extension to .txt. If DevForums complains that your crash report “contains sensitive language”, leave it out of your initial post and attach it to a reply. That often avoids this roadblock. If you still can’t post your crash report, upload it to a file sharing service and include the URL in your post. Post the URL in the clear, per tip 14 in Quinn’s Top Ten DevForums Tips. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = "eskimo" + "1" + "@" + "apple.com" Revision History: 2024-05-21 Added some advice regarding the “contains sensitive language” message. 2023-10-25 Added the Can’t Post Crash Report as Attachment section. Made other minor editorial changes. 2021-08-26 First posted.
0
0
5.6k
1w
Debugging Resources
General: DevForums tags: Debugging, LLDB, Graphical Debugger Xcode > Debugging documentation Diagnosing memory, thread, and crash issues early documentation Diagnosing issues using crash reports and device logs documentation Choosing a Network Debugging Tool documentation Testing a release build documentation Isolating Code Signing Problems from Build Problems DevForums post What is an exception? DevForums post Language Exception from RCTFatal DevForums post Standard Memory Debugging Tools DevForums post Using a Sysdiagnose Log to Debug a Hard-to-Reproduce Problem DevForums post Posting a Crash Report DevForums post Implementing Your Own Crash Reporter DevForums post Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = "eskimo" + "1" + "@" + "apple.com"
0
0
2.2k
Oct ’23
Creating a test project
A highly-effective debugging technique is to create a test project focused on your issue, and iterate on solutions using only the test project. We often ask developers to provide us with a small Xcode test project because it helps focus a discussion on the relevant Apple APIs. An ideal test project: Focuses only on specific Apple APIs Uses the minimum amount of code possible (usually just a few files) Reliably demonstrates the problem for anyone who builds the project Contains no third-party libraries Builds with no warnings using Xcode's default build settings Does not require any third-party build tools There are two approaches to creating a focused Xcode project: Create a new project starting from one of Xcode's built-in templates, and add code to demonstrate the issue. Start with a copy of your existing project, and remove code not essential to the issue. Remove code iteratively, re-testing after every removal. If you find that you can no longer demonstrate the issue after removing a particular piece of code, it’s likely that the issue is within the last-removed code. After restoring this code to the project, keep reducing the surrounding code until everything remaining is essential to the issue. The first method is often faster if you can quickly find the right functionality to add. If that doesn't work out, the second method is usually a reliable approach. In many cases, creating the test project will help you locate and solve the issue by yourself. Even if it doesn't, the test project still has value! It provides a smaller starting point for others to look into your issue. And if the test project helps identify a bug, then you can attach it to a bug report; the engineer looking at your report will appreciate the effort. Sharing a link to a test project We're always willing to take a look at your test project when it satisfies the characteristics listed above. Just share a link to where we can find it as part of your post. The forums have a list of websites you can link to. If you find that your link isn't visible in the preview of your post, just include the URL without using Markdown link syntax. For example, this link with Markdown won't appear: Apple is based in [Cupertino](https://www.cupertino.org). but this version will: Apple is based in Cupertino. https://www.cupertino.org Revision History 2024-05-30 Initial version.
0
0
32
14h
Disk Write Exception
My test flight application crashed while doing a disk writing operation. I saw the following error in crash log 1073.76 MB of file backed memory dirtied over 705 seconds (1522.14 KB per second average), exceeding limit of 12.43 KB per second over 86400 seconds\ After a little bit of research I found from Apple documentation that System will throw an exception if disk writes from the app exceeds a certain limit in 24 hours window [https://developer.apple.com/documentation/xcode/reducing-disk-writes) But the threshold is not documented. But looking at the crash log we can reverse calculate this threshold as 12.43KB * 86400 ~ 1 GB Does this means that iOS application won't be able to write data more than this limit (1 GB) per day?
6
1
4.2k
18h
Unable to Debug macOS Action Extension: "Attach failed" Error
Hello everyone, I'm encountering an issue while trying to debug a macOS Action Extension. I created a completely fresh project with an Action Extension target. When I select the Action Extension scheme and run it, choosing Finder as the host app (app to launch it in), I receive the following error: Attach failed: Could not attach to pid : “647”. (Not allowed to attach to process. Look in the console messages (Console.app), near the debugserver entries, when the attach failed. The subsystem that denied the attach permission will likely have logged an informative message about why it was denied.) This is in Console.app: macOSTaskPolicy: (com.apple.debugserver) may not get the task control port of (Finder) (pid: 647): (Finder) is hardened, (Finder) doesn't have get-task-allow, (com.apple.debugserver) is a declared debugger(com.apple.debugserver) is not a declared read-only debugger. I am pretty sure it worked before on my project that I am developing. It stopped working and now it doesn't even work on a fresh new project. Any ideas? I tried cleaning derived data, restarting my mac, nothing helps. As per the documentation it should work normally using the Build & Run button.
4
0
114
1d
(Swift) TextField border contained in a view remains visible even when the view is fully overlapped by another view.
I have a ZStack that contains a VStack with 2 views (view1 and view2) and a third view (view3). So, is either that view1 and View1 are visible, or view3 is visible. This is the relevant code: ZStack { VStack { view1() View2() } if showView3 View3() } view1 and view2 are 400px in width and 200px in height, while view3 is 400 x 400 px, so that it completely overwrite view1/view2 when visible. The problem I'm trying to solve is that the border of a TextField placed in view1 is visible when showView3 is true, what should not be happening (possible glitch in swift?). To show the problem, I prepared a code sample, which shows that when view3 is active, it completely overwrites view1/view2, but still, the border of the TextField remains visible. (See screenshot below) struct TestZStackView: View { @State private var showView3 = false var body: some View { ZStack { VStack { Toggle("view3", isOn: $showView3) View1() .frame(width: 400, height: 200) .background(Color.red) .zIndex(1) View2() .frame(width: 400, height: 200) .background(Color.green) .zIndex(1) } if showView3 { View3() .frame(width: 400, height: 400) .background(Color.blue) .zIndex(2) } } } } struct View1: View { var body: some View { TextField("Enter text", text: .constant("")) .padding() .cornerRadius(5) .textFieldStyle(RoundedBorderTextFieldStyle()) .zIndex(1) } } struct View2: View { var body: some View { Color.clear } } struct View3: View { var body: some View { Color.black // (Ensure no transparency) } } zIndex() are not required, I just placed them to see if the problem get solved, but it may no difference. BTW, in the code above, the visible border disappears if the view is minimized, but that is not the case in the real app I'm working on. In the screenshots attached, it can be seen how the TextField border remains visible when view3 is active ("https://developer.apple.com/forums/content/attachment/d0e75f25-d36e-4361-af64-54252d1f2a98" "title=Screenshot 2024-05-24 at 10.06.03 PM.png;width=800;height=632")
0
0
146
6d
(Swift) TextField border contained in a view remains visible even when the view is fully overlapped by another view.
I have a ZStack that contains a VStack with 2 views (view1 and view2) and a third view (view3). So, is either that view1 and View1 are visible, or view3 is visible. This is the relevant code: ZStack { VStack { view1() View2() } if showView3 View3() } view1 and view2 are 400px in width and 200px in height, while view3 is 400 x 400 px, so that it completely overwrite view1/view2 when visible. The problem I'm trying to solve is that the border of a TextField placed in view1 is visible when showView3 is true, what should not be happening (possible glitch in swift?). To show the problem, I prepared a code sample, which shows that when view3 is active, it completely overwrites view1/view2, but still, the border of the TextField remains visible. (See screenshot below) struct TestZStackView: View { @State private var showView3 = false var body: some View { ZStack { VStack { Toggle("view3", isOn: $showView3) View1() .frame(width: 400, height: 200) .background(Color.red) .zIndex(1) View2() .frame(width: 400, height: 200) .background(Color.green) .zIndex(1) } if showView3 { View3() .frame(width: 400, height: 400) .background(Color.blue) .zIndex(2) } } } } struct View1: View { var body: some View { TextField("Enter text", text: .constant("")) .padding() .cornerRadius(5) .textFieldStyle(RoundedBorderTextFieldStyle()) .zIndex(1) } } struct View2: View { var body: some View { Color.clear } } struct View3: View { var body: some View { Color.black // (Ensure no transparency) } } zIndex() are not required, I just placed them to see if the problem get solved, but it may no difference. BTW, in the code above, the visible border disappears if the view is minimized, but that is not the case in the real app I'm working on. In the screenshots attached, it can be seen how the TextField border remains visible when view3 is active ("https://developer.apple.com/forums/content/attachment/d0e75f25-d36e-4361-af64-54252d1f2a98" "title=Screenshot 2024-05-24 at 10.06.03 PM.png;width=800;height=632")
0
0
131
6d
Increase in app crashes on iOS 17.4
We have an iOS app built using Capacitor. We are seeing a large increase in app crashes on iOS 17.4 (iPhone). Other OS versions seem to be showing significantly fewer crash numbers. We are unsure what is causing this, as our app did not go through any major releases. I have attached the crash log below. Thanks Exception Type: EXC_CRASH (SIGKILL) Exception Codes: 0x0000000000000000, 0x0000000000000000 Termination Reason: RUNNINGBOARD 0xd00d2bad
5
0
294
6d
FamilyActivityPicker Crash on selecting some items
Both view and modifier versions of the FamilyActivityPicker crash randomly when selecting some items (usually the other option) throwing these in the console: [com.apple.FamilyControls.ActivityPickerExtension(1150.1)] Connection to plugin invalidated while in use AX Lookup problem - errorCode:1100 error:Permission denied portName:'com.apple.iphone.axserver' PID:22091 ( 0 AXRuntime 0x00000001c603b0fc _AXGetPortFromCache + 800 1 AXRuntime 0x00000001c603cce0 AXUIElementPerformFencedActionWithValue + 700 2 UIKit 0x0000000230de3ec8 DDE6E0C5-2AC3-3C73-8CFE-BC88DE35BB5F + 1453768 3 libdispatch.dylib 0x0000000103ef0b98 _dispatch_call_block_and_release + 32 4 libdispatch.dylib 0x0000000103ef27bc _dispatch_client_callout + 20 5 libdispatch.dylib 0x0000000103efa66c _dispatch_lane_serial_drain + 832 6 libdispatch.dylib 0x0000000103efb408 _dispatch_lane_invoke + 408 7 libdispatch.dylib 0x0000000103f08404 _dispatch_root_queue_drain_deferred_wlh + 328 8 libdispatch.dylib 0x0000000103f07a38 _dispatch_workloop_worker_thread + 444 9 libsystem_pthread.dylib 0x00000001f0824f20 _pthread_wqthread + 288 10 libsystem_pthread.dylib 0x00000001f0824fc0 start_wqthread + 8 ) This also happens in production apps like the Opal. The questions are: At least how to detect it to be able to manually reload the sheet (like what Opal does and shows an alert when this happens) How to prevent it in the first place? I really appreciate any help you can provide.
1
1
266
1w
Crash in [UIViewController _presentViewController:withAnimationController:completion:]
Our app has a Crash, here is the Crash report. How should I investigate this error? Fatal Exception: NSInvalidArgumentException 0 CoreFoundation 0x9e48 __exceptionPreprocess 1 libobjc.A.dylib 0x178d8 objc_exception_throw 2 UIKitCore 0x326cbc -[UIViewController _presentViewController:withAnimationController:completion:] 3 UIKitCore 0x325c10 __63-[UIViewController _presentViewController:animated:completion:]_block_invoke 4 UIKitCore 0x349598 -[_UIViewControllerTransitionCoordinator _applyBlocks:releaseBlocks:] 5 UIKitCore 0x2b7a48 -[_UIViewControllerTransitionContext _runAlongsideCompletions] 6 UIKitCore 0x2b6ad8 -[_UIViewControllerTransitionContext completeTransition:] 7 UIKitCore 0x2b7c38 -[UITransitionView notifyDidCompleteTransition:] 8 UIKitCore 0x2b7838 -[UITransitionView _didCompleteTransition:] 9 UIKit 0xa7e58 -[UITransitionViewAccessibility _didCompleteTransition:] 10 UIKitCore 0x103d464 __UIVIEW_IS_EXECUTING_ANIMATION_COMPLETION_BLOCK__ 11 UIKitCore 0xd14ac -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] 12 UIKitCore 0xd0408 -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] 13 UIKitCore 0xcfb28 -[UIViewAnimationState animationDidStop:finished:] 14 UIKit 0xb0f50 -[UIViewAnimationStateAccessibility animationDidStop:finished:] 15 UIKitCore 0xcfc3c -[UIViewAnimationState animationDidStop:finished:] 16 UIKit 0xb0f50 -[UIViewAnimationStateAccessibility animationDidStop:finished:] 17 QuartzCore 0x1310c CA::Layer::run_animation_callbacks(void*) 18 libdispatch.dylib 0x3fdc _dispatch_client_callout 19 libdispatch.dylib 0x127f4 _dispatch_main_queue_drain 20 libdispatch.dylib 0x12444 _dispatch_main_queue_callback_4CF 21 CoreFoundation 0x9a6d8 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ 22 CoreFoundation 0x7c03c __CFRunLoopRun 23 CoreFoundation 0x80ec0 CFRunLoopRunSpecific 24 GraphicsServices 0x1368 GSEventRunModal 25 UIKitCore 0x3a186c -[UIApplication _run] 26 UIKitCore 0x3a14d0 UIApplicationMain 27 Authenticator 0x9334 main + 26 (AppDelegate.swift:26) 28 ??? 0x1b65de960 (シンボルが不足しています)
4
2
862
1w
Login with iPad Air works in Simulator but Apple says it doesn't
Device type: iPad Air (5th generation) OS version: iOS 17.5 I don't know what to do.. I am using Firebase for auth and it work on every device. Except for the iPad Air. Does somebody have a similar issue? try { String email = _emailController.text; String password = _passwordController.text; if (EmailValidator.validate(email)) { await _auth.signInWithEmailAndPassword( email: email, password: password); } else { print("Ungültige E-Mail-Adresse"); } } catch (e) { print("Anmeldefehler: $e"); } } }
0
0
82
1w
JavaScriptCore Crash in iOS17.4.1
Our app collected some JavaScriptCore crash information on iOS17 and above systems, but the cause of the error cannot be located. The crash stack is as follows: #27 Heap Helper Thread SIGSEGV 0 JavaScriptCore JSC::MarkedBlock::aboutToMarkSlow(unsigned int) 1 JavaScriptCore JSC::JSFinalObject::visitChildren(JSC::JSCell*, JSC::SlotVisitor&) 2 JavaScriptCore JSC::JSFinalObject::visitChildren(JSC::JSCell*, JSC::SlotVisitor&) 3 JavaScriptCore JSC::SlotVisitor::drain(***::MonotonicTime) 4 JavaScriptCore JSC::SlotVisitor::drainFromShared(JSC::SlotVisitor::SharedDrainMode, ***::MonotonicTime) 5 JavaScriptCore ***::SharedTaskFunctor<void (), JSC::Heap::runBeginPhase(JSC::GCConductor)::$_15>::run() 6 JavaScriptCore ***::ParallelHelperClient::runTask(***::RefPtr<***::SharedTask<void ()>, ***::RawPtrTraits<***::SharedTask<void ()> >, ***::DefaultRefDerefTraits<***::SharedTask <void ()> > > const&) 7 JavaScriptCore ***::ParallelHelperPool::Thread::work() 8 JavaScriptCore ***::Detail::CallableWrapper<***::AutomaticThread::start(***::AbstractLocker const&)::$_0, void>::call() 9 JavaScriptCore ***::Thread::entryPoint(***::Thread::NewThreadContext*) 10 JavaScriptCore ***::wtfThreadEntryPoint(void*) 11 libsystem_pthread.dylib __pthread_start #1 Queue: com.apple.main-thread SIGSEGV 0 libobjc.A.dylib _objc_msgSend 1 UIKitCore -[UIView(Geometry) convertPoint:toView:] #24 JSC Heap Collector Thread SIGSEGV 0 libsystem_kernel.dylib ___psynch_cvwait 1 libsystem_pthread.dylib __pthread_cond_wait 2 JavaScriptCore ***::ThreadCondition::timedWait(***::Mutex&, ***::WallTime) 3 JavaScriptCore ***::ParkingLot::parkConditionallyImpl(void const*, ***::ScopedLambda<bool ()> const&, ***::ScopedLambda<void ()> const&, ***::TimeWithDynamicClockType const&) 4 JavaScriptCore bool ***::Condition::waitUntilUncheckedWTF::Lock(***::Lock&, ***::TimeWithDynamicClockType const&) 5 JavaScriptCore JSC::SlotVisitor::drainFromShared(JSC::SlotVisitor::SharedDrainMode, ***::MonotonicTime) 6 JavaScriptCore JSC::Heap::runConcurrentPhase(JSC::GCConductor) 7 JavaScriptCore JSC::Heap::runCurrentPhase(JSC::GCConductor, JSC::CurrentThreadState*) 8 JavaScriptCore JSC::Heap::HeapThread::work() 9 JavaScriptCore ***::Detail::CallableWrapper<***::AutomaticThread::start(***::AbstractLocker const&)::$_0, void>::call() 10 JavaScriptCore ***::Thread::entryPoint(***::Thread::NewThreadContext*) 11 JavaScriptCore ***::wtfThreadEntryPoint(void*) 12 libsystem_pthread.dylib __pthread_start #25 Heap Helper Thread SIGSEGV 0 libsystem_kernel.dylib ___psynch_cvwait 1 libsystem_pthread.dylib __pthread_cond_wait 2 JavaScriptCore ***::ThreadCondition::timedWait(***::Mutex&, ***::WallTime) 3 JavaScriptCore ***::ParkingLot::parkConditionallyImpl(void const*, ***::ScopedLambda<bool ()> const&, ***::ScopedLambda<void ()> const&, ***::TimeWithDynamicClockType const&) 4 JavaScriptCore bool ***::Condition::waitUntilUncheckedWTF::Lock(***::Lock&, ***::TimeWithDynamicClockType const&) 5 JavaScriptCore JSC::SlotVisitor::drainFromShared(JSC::SlotVisitor::SharedDrainMode, ***::MonotonicTime) 6 JavaScriptCore ***::SharedTaskFunctor<void (), JSC::Heap::runBeginPhase(JSC::GCConductor)::$_15>::run() 7 JavaScriptCore ***::ParallelHelperClient::runTask(***::RefPtr<***::SharedTask<void ()>, ***::RawPtrTraits<***::SharedTask<void ()> >, ***::DefaultRefDerefTraits<***::SharedTask<void ()> > > const&) 8 JavaScriptCore ***::ParallelHelperPool::Thread::work() 9 JavaScriptCore ***::Detail::CallableWrapper<***::AutomaticThread::start(***::AbstractLocker const&)::$_0, void>::call() 10 JavaScriptCore ***::Thread::entryPoint(***::Thread::NewThreadContext*) 11 JavaScriptCore ***::wtfThreadEntryPoint(void*) 12 libsystem_pthread.dylib __pthread_start #27 Heap Helper Thread SIGSEGV 0 libsystem_kernel.dylib ___psynch_cvwait 1 libsystem_pthread.dylib __pthread_cond_wait 2 JavaScriptCore ***::ThreadCondition::timedWait(***::Mutex&, ***::WallTime) 3 JavaScriptCore ***::ParkingLot::parkConditionallyImpl(void const*, ***::ScopedLambda<bool ()> const&, ***::ScopedLambda<void ()> const&, ***::TimeWithDynamicClockType const&) 4 JavaScriptCore bool ***::Condition::waitUntilUncheckedWTF::Lock(***::Lock&, ***::TimeWithDynamicClockType const&) 5 JavaScriptCore JSC::SlotVisitor::drainFromShared(JSC::SlotVisitor::SharedDrainMode, ***::MonotonicTime) 6 JavaScriptCore ***::SharedTaskFunctor<void (), JSC::Heap::runBeginPhase(JSC::GCConductor)::$_15>::run() 7 JavaScriptCore ***::ParallelHelperClient::runTask(***::RefPtr<***::SharedTask<void ()>, ***::RawPtrTraits<***::SharedTask<void ()> >, ***::DefaultRefDerefTraits<***::SharedTask<void ()> > > const&) 8 JavaScriptCore ***::ParallelHelperPool::Thread::work() 9 JavaScriptCore ***::Detail::CallableWrapper<***::AutomaticThread::start(***::AbstractLocker const&)::$_0, void>::call() 10 JavaScriptCore ***::Thread::entryPoint(***::Thread::NewThreadContext*) 11 JavaScriptCore ***::wtfThreadEntryPoint(void*) 12 libsystem_pthread.dylib __pthread_start Please help analyze and locate the cause. Has anyone else encountered this problem?
5
0
328
1w
What does EXC_CRASH (SIGILL) mean?
We started to see some crashes in our iOS app a few seconds after launch with the following reason: Exception Type: EXC_CRASH (SIGILL) Exception Codes: 0x0000000000000000, 0x0000000000000000 Termination Reason: SIGNAL 4 Illegal instruction: 4 when calling [NSPersistentContainer loadPersistentStoresWithCompletionHandler:]. I've looked through Understanding the exception types in a crash report page, but couldn't find this type there. Any ideas what could it be?
5
0
218
1w
Swiftdata Rollingback not triggering view update
I have a view which is a form allowing me to edit details of a category item. In the toolbar, there is a button called "Cancel," whose sole function is to call the rollback function in the ModelContext class. This function should allow you to revert any changes made to the context. However, it appears that this rollback function is neither triggering the view update nor working properly, as I need to restart the app to see the changes reverted which just work when the property "isAutosaveEnabled" is set to false. Container configuration goes below import SwiftUI @main struct Index: App { var body: some Scene { WindowGroup { Window() } .modelContainer( for: [ Bill.self, Category.self ], isAutosaveEnabled: false, isUndoEnabled: true ) } } Rollback usage that don't work import SwiftUI import SwiftData import Foundation struct CategoryForm: View { @Environment(\.presentationMode) private var presentationMode @Environment(\.modelContext) private var modelContext @Bindable var category: Category var body: some View { NavigationStack { Form { Section( header: Text("Basic Information"), content: { TextField("Title", text: $category.name) } ) } .navigationTitle("New Category") .navigationBarTitleDisplayMode(.inline) .toolbar { // Cancel Button ToolbarItem( placement: .topBarLeading, content: { Button( action: onCancel, label: { Text("Cancel") } ) } ) // Done Button ToolbarItem( placement: .topBarTrailing, content: { Button( action: onDone, label: { Text("Done") } ) .disabled(category.name.isEmpty) } ) } } } func onCancel() { modelContext.rollback() presentationMode.wrappedValue.dismiss() } func onDone() { modelContext.insert(category) do { try modelContext.save() } catch { fatalError("Failed to save category") } presentationMode.wrappedValue.dismiss() } }
0
0
96
1w
Location tracking on suspended app
I’m trying to track the location of the user on every 10-20 meters of the location change, I’ve managed to obtain the location updates while the application is in foreground or background using Backround modes. my issue is that I cannot get any updates after the application is terminated either by the user or by the system, I’ve tried using startMonitoringSignificantLocationChanges() but this does not fit my purpose since you get updates every 500m. Is it possible to achieve getting updates every 10 meters using “Region Monitoring”? Or is mobile device management (MDM) the only way to achieve this on an iOS device?
1
0
135
1w
Xcode15 crash reloadItems - Invalid update: invalid number of items in section
Xcode15 crash reloadItems - Invalid update: invalid number of items in section When building with xcode14, there was no crash when calling collectionView reloadItems. If you build with xcode15 A crash pops up saying Invalid update: invalid number of items in section. The current issue has been resolved, but I would like to know the exact cause of the crash in xcode 15. Does anyone know?
3
0
177
1w
Suppressing "Known Hang" warnings with PERFC_SUPPRESSION_FILE
Recently we have started refactoring some code to use Swift concurrency in Xcode 15.3. As we have added some new async methods and Tasks, new runtime warnings have emerged titled "Known Hang" and several are listed. None of the stack traces listed with these warnings are in areas directly modified but some of the same types/methods called are also called from the modified areas. So I can sort of understand why they are coming up...but they had to have been there before we added the Swift concurrency. Example of a tooltip with the warnings: My first query is: Are these warnings only issued when Swift concurrency is added/applied (as they were not there when using closures and mostly just off the main thread to network calls)? The documentation indicates these can all be suppressed by turning off the Thread Performance Checker BUT I would rather just suppress the few places as we refactor our codebase (as it is quite large). In that way, any new ones may be documented and we can decide to fix them now or later. I have tried to follow the instructions and added an environment variable PERFC_SUPPRESSION_FILE (in the Scheme) with a full path to a file formatted similarly to the example in the documentation. class:NSManagedObjectContext method:-[NSManagedObjectContext save:] My second query is: I have verified that the variable is set by reading it from the ProcessInfo. However, regardless of my settings, the runtime warnings are still presented. I could not find any examples or even any mention of others using this environment variable. I am reaching out with any advice or ideas to try. Has anyone successfully tried this or found an issue/alternative? Help me Mr. Wizard!
3
0
216
1w
App crashing randomly on start-up
I've been encountering a strange crash that occurs randomly on my app's startup. The app compiles and (usually) runs just fine but every so often will close out immediately within a second or two of launching. I have found no methods to consistently reproduce this crash. Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Termination Reason: SIGNAL 6 Abort trap: 6 Last Exception Backtrace: 0 CoreFoundation 0x1a5498870 __exceptionPreprocess + 164 1 libobjc.A.dylib 0x19d7fbc00 objc_exception_throw + 60 2 CoreFoundation 0x1a551d4f8 -[NSException init] + 0 3 Foundation 0x1a439877c -[NSObject(NSKeyValueCoding) setValue:forKey:] + 284 4 UIKitCore 0x1a796b188 -[UIViewController setValue:forKey:] + 80 5 UIKitCore 0x1a796b10c -[UIRuntimeOutletConnection connect] + 84 I would include the full crash report but for the URL needed for file attachments contains sensitive language somehow?? Any help resolving this issue would be greatly appreciated.
4
0
242
1w
Developer Strap and Xcode Instruments
I have the Vision Pro developer strap, do I need to do anything to make Instruments transfer the data over it rather than wifi? Or will it do that automatically? It seems incredibly slow for transferring and then analysing data. I can see the Vision Pro recognised in Configurator, so assume it's working. Otherwise.. Any tips for speeding up Instruments? Capturing 5 mins of gameplay (high-freq) then takes 30-40+ mins to appear in Instruments on an M2 Max 32gb. Thanks!
2
0
189
2w
iOS app crash with UIKitcore - UIAlertController
I have recently submitted a new app version to the Appstore with Xcode 15.0. Unfortunately, I have started to see the below crash in the Xcode organiser > Crashes section occurring for more number of times. UIKitCore: +[UIAlertController _alertControllerContainedInViewController:] + 160 The exception trace is not leading to main() function but not pointing to any of the code line. I had used UIAlertController in the past versions to show the alerts but there is no code written in the current version code related to UIAlertController. Only from the latest version, this kind of crash started to surface. In the latest release, We have added a third party SDK and while implementing the SDK, we had added the Location and Bluetooth Permissions in Info.plist file. But as we don't want to use/track the Location and Bluetooth details from the app, the SDK team has disabled the Location and Bluetooth settings to not reflect in the tracked data. Is this behaviour creating any conflict with the UIAlertController and logging the crash? Because by default the OS tries to show the alert when the permissions exist in the plist file, but the alert will not come as the service is disabled on the SDK server settings. Is this creating any conflict and logging the crash. Please extend your help.
1
0
195
2w