Debugging

RSS for tag

Discover and resolve issues with your app.

Posts under Debugging tag

200 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Breakpoints not resolving on Xcode 14 (Turn to outlines when app is run)
We are running into an issue where breakpoints are not resolving on Xcode 14 (The same break points on Xcode 13.4.1 are working fine). They change to an outline when we run our app I have tried all the usual fixes Cleaned the build Cleaned Derived data Restarted Xcode Restarted the machine Re-cloned the repo to see if starting fresh helps I have also tried Removing all symbol stripping Ensuring the DSYM is getting generated and is loaded in the debugger Removing all optimization options Tried the Xcode 14.1 beta What's really strange is the break points will work occasionally and will work for a few runs and then stop working again. Does anyone have any suggestions?
4
3
3k
Aug ’23
Crash on [AVPlayer _addLayer] in iOS 16 caused by Pegasus
Hi, Our apps currently facing a crash that only happens in iPhone with iOS 16. Unfortunately, we could not reproduce this issue, neither from XCode build or App store build. From third party crash analytics, it happens mostly of background and they highlighted this as the issue. Fatal Exception: NSInvalidArgumentException *** -[__NSArrayM insertObject:atIndex:]: object cannot be nil And the stack trace, it shows: AVFCore __22-[AVPlayer _addLayer:]_block_invoke Pegasus __116-[PGPictureInPictureProxy _endDeactivatingPictureInPictureIfNeededWithAnimationType:stopReason:cleanupHandlerOrNil:]_block_invoke We also attach the full crash log to give full context of the crash. Any idea why this crash happens and is there anything i can do to prevent the crashes from happening again? pegasus.crash
14
6
4k
Dec ’23
iOS16 SwiftUI cannot figure out crash reason
I am getting random crash from time to time while using SwiftUI but i cannot find a way to get more context into the crash how to find the root cause? didn't even get more info while the crash happened while connected to XCode Version 14.1 (14B47b) OS Version: iPhone OS 16.1 (20B82) Release Type: User Report Version: 104 Exception Type: EXC_BREAKPOINT (SIGTRAP) Exception Codes: 0x0000000000000001, 0x000000019a9edeb4 Termination Reason: SIGNAL 5 Trace/BPT trap: 5 Terminating Process: exc handler [45365] Triggered by Thread: 0 Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0 Crashed: 0 SwiftUI 0x19a9edeb4 0x19a9c3000 + 175796 1 SwiftUI 0x19a9ede98 0x19a9c3000 + 175768 2 SwiftUI 0x19aa02da4 0x19a9c3000 + 261540 3 libswiftCore.dylib 0x1910dd138 Slice.index(after:) + 48 4 SwiftUI 0x19abd4d48 0x19a9c3000 + 2170184 5 SwiftUI 0x19ac16594 0x19a9c3000 + 2438548 6 libswiftCore.dylib 0x190f29678 BidirectionalCollection.index(_:offsetBy:) + 292 7 SwiftUI 0x19a9edd00 0x19a9c3000 + 175360 8 SwiftUI 0x19be30904 0x19a9c3000 + 21420292 9 SwiftUI 0x19bc2ffa8 0x19a9c3000 + 19320744 10 SwiftUI 0x19b7b1034 0x19a9c3000 + 14606388 11 SwiftUI 0x19b7afc20 0x19a9c3000 + 14601248 12 SwiftUI 0x19b7b21e4 0x19a9c3000 + 14610916 13 UIKitCore 0x1994e57d4 -[UICollectionView _selectItemAtIndexPath:animated:scrollPosition:notifyDelegate:deselectPrevious:performCustomSelectionAction:] + 1060 14 UIKitCore 0x1997314d4 -[UICollectionView touchesEnded:withEvent:] + 480 15 UIKitCore 0x1993e7514 forwardTouchMethod + 284 16 UIKitCore 0x1993e7514 forwardTouchMethod + 284 17 UIKitCore 0x1993e7514 forwardTouchMethod + 284 18 UIKitCore 0x1993e7514 forwardTouchMethod + 284 19 UIKitCore 0x1993185e0 _UIGestureEnvironmentUpdate + 5772 20 UIKitCore 0x199b9ce14 -[UIGestureEnvironment _deliverEvent:toGestureRecognizers:usingBlock:] + 288 21 UIKitCore 0x1992dc31c -[UIGestureEnvironment _updateForEvent:window:] + 188 22 UIKitCore 0x1992e0c74 -[UIWindow sendEvent:] + 3268 23 UIKitCore 0x1992dff44 -[UIApplication sendEvent:] + 672 24 UIKitCore 0x1992df600 __dispatchPreprocessedEventFromEventQueue + 7084 25 UIKitCore 0x1993273e4 __processEventQueue + 5632 26 UIKitCore 0x199f790a4 updateCycleEntry + 168 27 UIKitCore 0x199837740 _UIUpdateSequenceRun + 84 28 UIKitCore 0x199e7efd0 schedulerStepScheduledMainSection + 172 29 UIKitCore 0x199e7e19c runloopSourceCallback + 92 30 CoreFoundation 0x1970fdf54 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 31 CoreFoundation 0x19710a32c __CFRunLoopDoSource0 + 176 32 CoreFoundation 0x19708e210 __CFRunLoopDoSources0 + 244 33 CoreFoundation 0x1970a3ba8 __CFRunLoopRun + 836 34 CoreFoundation 0x1970a8ed4 CFRunLoopRunSpecific + 612 35 GraphicsServices 0x1cfb05368 GSEventRunModal + 164 36 UIKitCore 0x1995873d0 -[UIApplication _run] + 888 37 UIKitCore 0x199587034 UIApplicationMain + 340 38 libswiftUIKit.dylib 0x19fb73308 UIApplicationMain(_:_:_:_:) + 104 39 Fyzio Klinik Doctor 0x10445b2d8 static UIApplicationDelegate.main() + 104 40 Fyzio Klinik Doctor 0x10445b260 static AppDelegate.$main() + 44 41 Fyzio Klinik Doctor 0x10445b450 main + 28 42 dyld 0x1b5700960 start + 2528 Thread 1: 0 libsystem_pthread.dylib 0x1e370eb90 start_wqthread + 0
1
1
723
Oct ’23
react-native ios app crashes immediately on simulators and TestFlight installs
I  am completely at a loss here - I have a react native app created within expo. It runs perfectly well with expo go. I then built it using eas on my Mac (latest Ventura OS installed) and posted it to app store connect and installed it through TestFlight - it crashed immediately. I'm VERY new to this so it took me a long time to figure out how to troubleshoot this but I ended up finding this in the crash logs: Thread 2 name: Dispatch queue: com.facebook.react.ExceptionsManagerQueue Thread 2 Crashed: 0 libsystem_kernel.dylib 0x2076d8200 __pthread_kill + 8 1 libsystem_pthread.dylib 0x217b3a1ac pthread_kill + 268 2 libsystem_c.dylib 0x1d2111c8c abort + 180 3 libc++abi.dylib 0x217a7ab8c abort_message + 132 4 libc++abi.dylib 0x217a6aa80 demangling_terminate_handler() + 336 5 libobjc.A.dylib 0x1c3e11d3c _objc_terminate() + 144 6 libc++abi.dylib 0x217a79f28 std::__terminate(void (*)()) + 20 7 libc++abi.dylib 0x217a79ec4 std::terminate() + 56 8 libdispatch.dylib 0x1d20adff0 _dispatch_client_callout + 40 9 libdispatch.dylib 0x1d20b5694 _dispatch_lane_serial_drain + 672 10 libdispatch.dylib 0x1d20b61e0 _dispatch_lane_invoke + 384 11 libdispatch.dylib 0x1d20c0e10 _dispatch_workloop_worker_thread + 652 12 libsystem_pthread.dylib 0x217b33df8 _pthread_wqthread + 288 13 libsystem_pthread.dylib 0x217b33b98 start_wqthread + 8 And: Thread 2 crashed with ARM Thread State (64-bit): x0: 0x0000000000000000 x1: 0x0000000000000000 x2: 0x0000000000000000 x3: 0x0000000000000000 x4: 0x0000000217a7e0f5 x5: 0x000000016b4c6430 x6: 0x000000000000006e x7: 0xffffffff00000600 x8: 0xb1cfaa93a40be1da x9: 0xb1cfaa92cf4791da x10: 0x0000000000000200 x11: 0x000000000000000b x12: 0x000000000000000b x13: 0x00000000001ff800 x14: 0x00000000000007fb x15: 0x000000008c033819 x16: 0x0000000000000148 x17: 0x000000016b4c7000 x18: 0x0000000000000000 x19: 0x0000000000000006 x20: 0x0000000000001603 x21: 0x000000016b4c70e0 x22: 0x0000000000000000 x23: 0x000000016b4c70e0 x24: 0x0000000000000000 x25: 0x0000000280c888e8 x26: 0x0000000000000114 x27: 0x0000000000000000 x28: 0x0000000283787840 fp: 0x000000016b4c63a0 lr: 0x0000000217b3a1ac sp: 0x000000016b4c6380 pc: 0x00000002076d8200 cpsr: 0x40001000 far: 0x000000021e5abf50 esr: 0x56000080 Address size fault I  spent an entire day searching for causes surrounding these errors - there were references to this but nothing related to what I was doing. I then went back to the basics - literally: npx create-expo-app TestApp eas build:configure eas build --platform ios And loaded this into a simulator (downloaded the ipa file, changed it to a .zip file, transferred the app file to the simulator) and it immediately crashed again. I've used various versions of expo, node, eas cli, etc - all giving me the same results. I tried using ErrorUtils to send an error to my node server but that didn't work (I might have set it up wrong). I'm not sure how to proceed in troubleshooting this. It seems like the basic process of creating an expo app and having it installable in a simulator or an iPhone isn't working for me. I haven't used (nor do I know how to) Xcode much outside of using the simulators. Any help would be VERY MUCH appreciated.
9
0
13k
Oct ’23
iOS 16 crash on [UIKeyboardTaskQueue promoteDeferredTaskIfIdle]
Hi, I've recently experienced a weird crash that only happening on iOS 16 device (iOS 16.xx - 16.3). Here is the stack trace 0 libobjc.A.dylib 0x00000001bc11ae5c _objc_retain_x0 (in libobjc.A.dylib) + 16 1 UIKitCore 0x00000001c5c06a5c -[UIKeyboardTaskQueue promoteDeferredTaskIfIdle] (in UIKitCore) + 72 2 UIKitCore 0x00000001c5c069e8 -[UIKeyboardTaskQueue performDeferredTaskIfIdle] (in UIKitCore) + 28 3 UIKitCore 0x00000001c54039c8 -[UIKeyboardTaskQueue continueExecutionOnMainThread] (in UIKitCore) + 372 4 Foundation 0x00000001bd21484c ___NSThreadPerformPerform (in Foundation) + 260 5 CoreFoundation 0x00000001c2f31f30 ___CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ (in CoreFoundation) + 24 6 CoreFoundation 0x00000001c2f3e308 ___CFRunLoopDoSource0 (in CoreFoundation) + 172 7 CoreFoundation 0x00000001c2ec222c ___CFRunLoopDoSources0 (in CoreFoundation) + 336 8 CoreFoundation 0x00000001c2ed7b88 ___CFRunLoopRun (in CoreFoundation) + 832 9 CoreFoundation 0x00000001c2edcebc _CFRunLoopRunSpecific (in CoreFoundation) + 608 10 GraphicsServices 0x00000001fcf33364 _GSEventRunModal (in GraphicsServices) + 160 11 UIKitCore 0x00000001c53d2868 -[UIApplication _run] (in UIKitCore) + 884 12 UIKitCore 0x00000001c53d24cc _UIApplicationMain (in UIKitCore) + 336 13 News 0x00000001106d5d1c main (in News) (main.m:23) 14 dyld 0x00000001e16fe95c start (in dyld) + 2524
18
7
4.1k
Jul ’23
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
961
May ’24
Unable to install runner: A valid provisioning profile for this executable was not found
Hi there, Currently having some issues debugging on a physical device. I am running a flutter app, and have a provisioning profile provided by our client company that is not expired and has worked up until recently just fine with physical devices. Running the app on a simulator works okay as well. However, all of the sudden the app will not run on a physical device. The build succeeds fine, but then I receive the error "Unable to install runner: A valid provisioning profile for this executable was not found". I have opened devices and simulators and tried to install the provisioning profile on the device, but get the error "Failed to install one or more provisioning profiles on the device: Please ensure the provisioning profile is configured for this device. If not, please try to generate a new profile." I don't know why this error appears, because I have used this exact profile on this device many times before. I'm hesitant to contact the client to receive a new provisioning profile because it is not easy to do, and again this one has worked fine until now. Does anyone have any ideas? Thanks!
2
0
3k
Oct ’23
_dispatch_client_callout crash
I received the attached crash report. The problem is that the crash report does not contain the abort reason - it appears to be thrown in the GCD library with no additional information. Is it a possible deadlock? 2023-02-15_02-40-23.0077_+0100-94015bd052c4005658221a5e6279f28a75b9e92c.crash Any ideas?
3
0
1.5k
Dec ’23
WeatherKit: Couldn't lookup symbols
I'm not able to inspect WeatherKit objects like HourWeather and CurrentWeather using the Xcode debugger and breakpoints. When I pause on a breakpoint and try something like po hours where hours is a [HourWeather] I get a debugger error like Couldn't lookup symbols: type metadata accessor for WeatherKit.HourWeather. Is there something about WeatherKit that prevents the debugger from printing out its objects?
1
1
663
Nov ’23
iOS 16.x - Keyboard and speech crash
Crash - 1: Fatal Exception: NSRangeException 0 CoreFoundation 0x9e38 __exceptionPreprocess 1 libobjc.A.dylib 0x178d8 objc_exception_throw 2 CoreFoundation 0x1af078 -[__NSCFString characterAtIndex:].cold.1 3 CoreFoundation 0x1a44c -[CFPrefsPlistSource synchronize] 4 UIKitCore 0x1075f68 -[UIPredictionViewController predictionView:didSelectCandidate:] 5 TextInputUI 0x2461c -[TUIPredictionView _didRecognizeTapGesture:] 6 UIKitCore 0xbe180 -[UIGestureRecognizerTarget _sendActionWithGestureRecognizer:] 7 UIKitCore 0x42c050 _UIGestureRecognizerSendTargetActions 8 UIKitCore 0x1a5a18 _UIGestureRecognizerSendActions 9 UIKitCore 0x86274 -[UIGestureRecognizer _updateGestureForActiveEvents] 10 UIKitCore 0x132348 _UIGestureEnvironmentUpdate 11 UIKitCore 0x9ba418 -[UIGestureEnvironment _deliverEvent:toGestureRecognizers:usingBlock:] 12 UIKitCore 0xf6df4 -[UIGestureEnvironment _updateForEvent:window:] 13 UIKitCore 0xfb760 -[UIWindow sendEvent:] 14 UIKitCore 0xfaa20 -[UIApplication sendEvent:] 15 UIKitCore 0xfa0d8 __dispatchPreprocessedEventFromEventQueue 16 UIKitCore 0x141e00 __processEventQueue 17 UIKitCore 0x44a4f0 __eventFetcherSourceCallback 18 CoreFoundation 0xd5f24 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION 19 CoreFoundation 0xe22fc __CFRunLoopDoSource0 20 CoreFoundation 0x661c0 __CFRunLoopDoSources0 21 CoreFoundation 0x7bb7c __CFRunLoopRun 22 CoreFoundation 0x80eb0 CFRunLoopRunSpecific 23 GraphicsServices 0x1368 GSEventRunModal 24 UIKitCore 0x3a1668 -[UIApplication _run] 25 UIKitCore 0x3a12cc UIApplicationMain ============================================================ Crash - 2: Crashed: com.apple.root.background-qos 0 libobjc.A.dylib 0x1c20 objc_msgSend + 32 1 UIKitCore 0xb0e0d8 __37-[UIDictationConnection cancelSpeech]_block_invoke + 152 2 libdispatch.dylib 0x24b4 _dispatch_call_block_and_release + 32 3 libdispatch.dylib 0x3fdc _dispatch_client_callout + 20 4 libdispatch.dylib 0x15b8c _dispatch_root_queue_drain + 684 5 libdispatch.dylib 0x16284 _dispatch_worker_thread2 + 164 6 libsystem_pthread.dylib 0xdbc _pthread_wqthread + 228 7 libsystem_pthread.dylib 0xb98 start_wqthread + 8 ============================================================ I encountered the two keyboard-related crashes in iOS 16.x, but I cannot reproduce them. Can anyone tell me what is going on and how to fix them? Please let me know.
2
2
1.9k
Aug ’23
App Crash at launch -> NO_CRASH_STACK (crash log attached)
App crashes at launch for some of our live users (NOT TESTFLIGHT). I have managed to extract the error log: Incident Identifier: B1F06CCD-4AAB-402F-9909-11FA7E1C54F3 Hardware Model: iPhone14,3 Process: *** [549] Path: /private/var/containers/Bundle/Application/DAE1AAC4-2150-46EF-B7B9-29553EA7346E/***.app/*** Identifier: com.XX.XX Version: 9.0 (70) AppStoreTools: 14E221 AppVariant: 1:iPhone14,3:15 Code Type: ARM-64 (Native) Role: Foreground Parent Process: launchd [1] Coalition: com.XX [580] Date/Time: 2023-06-12 15:59:45.2595 +1000 Launch Time: 2023-06-12 15:59:45.2060 +1000 OS Version: iPhone OS 15.6.1 (19G82) Release Type: User Baseband Version: 1.70.01 Report Version: 104 Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Termination Reason: DYLD 4 Symbol missing Symbol not found: (_objc_claimAutoreleasedReturnValue) Referenced from: '/Volumes/VOLUME/*/***.app/Frameworks/GoogleUtilities.framework/GoogleUtilities' Expected in: '/usr/lib/libobjc.A.dylib' (terminated at launch; ignore backtrace) Triggered by Thread: 0 Thread 0 Crashed: 0 dyld 0x00000001034bcb14 __abort_with_payload + 8 1 dyld 0x00000001034c26cc abort_with_payload_wrapper_internal + 104 (terminate_with_reason.c:102) 2 dyld 0x00000001034c2700 abort_with_payload + 16 (terminate_with_reason.c:124) 3 dyld 0x0000000103492a00 dyld4::halt(char const*) + 580 (DyldProcessConfig.cpp:2102) 4 dyld 0x000000010348fa20 dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 3560 (dyldMain.cpp:0) 5 dyld 0x000000010348dd84 start + 488 (dyldMain.cpp:864) Thread 0 crashed with ARM Thread State (64-bit): x0: 0x0000000000000006 x1: 0x0000000000000004 x2: 0x000000016ddc56c8 x3: 0x00000000000000e4 x4: 0x000000016ddc52c8 x5: 0x0000000000000000 x6: 0x0000000000000000 x7: 0x000000016ddc4d40 x8: 0x0000000000000020 x9: 0x0000000000000009 x10: 0x000000016ddc53b8 x11: 0x0000000000000108 x12: 0x0000000000000000 x13: 0x0000000000000035 x14: 0x0000000248f2d99d x15: 0x000000016ddc47e8 x16: 0x0000000000000209 x17: 0x00000001034b71c8 x18: 0x0000000000000000 x19: 0x0000000000000000 x20: 0x000000016ddc52c8 x21: 0x00000000000000e4 x22: 0x000000016ddc56c8 x23: 0x0000000000000004 x24: 0x0000000000000006 x25: 0x000000016ddc52c8 x26: 0x0000000000000400 x27: 0x0000000000000400 x28: 0x00000000000000f0 fp: 0x000000016ddc5290 lr: 0x00000001034c26cc sp: 0x000000016ddc5250 pc: 0x00000001034bcb14 cpsr: 0x1000 esr: 0x56000080 Address size fault Binary Images: 0x103474000 - 0x1034cbfff dyld arm64e <66e1fb2668f8379ba052eb8b8291b5e1> /usr/lib/dyld EOF Any help in fixing this issue with GoogleUtilities.framework/GoogleUtilities will be highly appreciated.
5
1
1.3k
Aug ’23
Logs are still private even after installing Wallet Logging Profile
Hi, I'm currently developing Apple Pay In-App Provisioning and have encountered an issue with viewing logs necessary for debugging. I've followed the instructions listed in https://download.developer.apple.com/iOS/iOS_Logs/Wallet_Logging_Instructions.pdf and have installed the relevant wallet profile. After repeating the issue, and opening up the sysdiagnose file on my mac, the logs that i'm interested in is still hidden with private tags. The device I'm using to develop on is an iPhone 11, runnning on iOS 16.5. The version of Xcode is 14.3. I am also using a sandbox account on the device if that is relevant to the issue. Below are screenshots of the logs I'm interested in. Any help in solving this issue will be greatly appreciated.
3
1
1.1k
Aug ’23
Firebase and Compiling errors with Xcode 15.0 beta 2
I am getting the following errors when I attempt to build my project since I updated Xcode to Version 15.0 beta 2 (15A5161b). I am wondering if anyone could help me figure it out as I have already cleared the cache and the build folder as well as reinstalling the firebase package entirely. Here are the two errors I have been receiving: "failed to verify module interface of 'Project_Name' due to the errors above; the textual interface may be broken by project issues or a compiler bug" (The code on the line this error is on is on a autogenerated file titled "Project_Title.private" and cannot be edited, "// swift-interface-format-version: 1.0") The other error I assume also has to do with the above issue, "no such module as 'firebase'" ( the code on line of question is "import Firebase".) I would appreciate ay help I could get because I cannot find any documentation or similar problems. I have attached screenshots below for your convenience. Thank you for your help!
5
2
1.5k
Oct ’23
On/Off Button Title in updateUI()
I am working through the Getting Started with App Development and on Page 142 it has you write in the updateUI() function if else statement lightButton.setTitle("Off", for: .normal) and lightButton.setTitle("On", for: .normal). My app crashes every time after building it and running it. Image reference below. The app works perfectly fine before adding these two statements. import UIKit class ViewController: UIViewController { @IBOutlet var lightButton: UIButton! var lightOn = true fileprivate func updateUI() { if lightOn { view.backgroundColor = .white lightButton.setTitle("Off", for: .normal) } else { view.backgroundColor = .black lightButton.setTitle("On", for: .normal) } } @IBAction func buttonPressed(_ sender: Any) { lightOn.toggle() updateUI() } override func viewDidLoad() { super.viewDidLoad() updateUI() // Do any additional setup after loading the view. } } Getting this error at the end. libc++abi: terminating due to uncaught exception of type NSException (lldb)
5
0
409
Oct ’23
FirstTimeDebugging - compile warning
Dear community, I'm reading "Develop in Swift Fundamentals", and on page 89 it asks us to open a file from the downloaded file (page 9 - Download Student Materials link). I was running the last part of the exercise of page 89 and it seems I got stuck when trying to remove the last compile warning message: "1. Condition always evaluates to false" "Will never be executed" Please take a look at the screenshot, where you can see the whole code and context. I have tried to add a few breakpoints (rows 10 to 12) in order to see if they would get ignored but it looks like it's still there. Any idea how to remove / get rid of this compile warning message? Thanks, Rodrigo
4
0
738
Jul ’23
Issue with React Native Fetch API: Handling Arrays of Objects on iOS 15.7.7 and Simulated iPhone 7 (iOS 14.5)
Hey fellow developers! I'm encountering a perplexing issue with my React Native app, specifically related to handling arrays of objects when using the Fetch API on iOS 15.7.7 and even on a simulated iPhone 7 running iOS 14.5. I'm reaching out for some collective wisdom to help shed some light on this situation. Here's a brief overview of the problem: Affected Platforms: The issue is observed on physical devices running iOS 15.7.7, as well as simulated iPhone 7 with iOS 14.5. However, it's important to note that the app works flawlessly on iPad devices with iOS 15.7.7 and various other simulators. The Fetch Request: In my React Native app, I'm making a simple fetch request to retrieve an array of objects from my backend API. The server returns a valid JSON response with the expected data. async function fetchSomething(id: string): Promise<SomeResponse> { const response = await fetch(`https://www.website.com/api/${id}`); return await response.json(); } Inconsistent Behavior: The strange part is that while the fetch request works perfectly fine on iPad devices and other simulators, it fails to handle the array of objects correctly on the affected platforms. Direct JSON File Fetch: To eliminate any issues with the backend API, I experimented by fetching a JSON file directly from the server with the same data that the API should provide. Surprisingly, the direct JSON file fetch works perfectly on all platforms, including the affected iOS devices. Accessing the Desired Array of Objects: Upon further investigation, I noticed that when attempting to access the desired array of objects in the response data: Working Example (iPad and Simulators): someArrayWithObjects [{"bodytext": "...", "ctype": "...", "header": "...", "headerLayout": "...", "pid": 0, "uid": 0}] Non-Working Example (iOS 15.7.7 and Simulated iPhone 7): someArrayWithObjects [{"ctype": null, "headerLayout": null}] The someArrayWithObjects in the non-working example lacks essential data compared to the working example, which might be causing the issue. By the way, the error occurs with any other array of objects of the same data response. Differences in Request Header Content-Length: Additionally, as mentioned in the original post, the "content-length" in the request header for the non-working example (iOS 15.7.7 and simulated iPhone 7) differs from the working example (iPad and other simulators). I'm puzzled as to why the "content-length" differs and how it might be impacting the processing of the response data on these specific iOS platforms. Perhaps the length differs because of the missing data in the response. Has anyone encountered a similar issue with React Native fetch requests on iOS 15.7.7 or older versions? Any ideas or insights into why this discrepancy in "content-length" might be causing the problem? Or any thoughts on why the "contentArray" is lacking data in the non-working example? I appreciate any help or suggestions to resolve this issue, as it's been quite challenging to pinpoint the root cause. Thank you in advance for your support and expertise. 🙏 Happy coding! 5steve
1
0
1.1k
Jul ’23
Keeping track of thread creation in a process
In some cases, one of our daemons will end up with thousands of threads. Clearly a bug somewhere, but I can't see it in the code. (Admittedly, it's C++ which is a bit alien to me still. Anyway.) If I wanted to just be notified each time a thread was created in the process, what are some ways to do that? I assume dtrace and lldb have ways to od it, but I'm not quite sure what.
6
0
694
Jul ’23
SwiftData Fatal error: failed to find a currently active container
I'm new to Apple development and decided to learn using SwiftData and Xcode 15 beta 4 (though I'm starting to think I don't need that extra challenge). I've worked through many issues--with you all's help--but this is one I can't figure out and hasn't shown up in my searches. I'm working on the traditional task list app (with a Task model). I've tried several approaches to app structure, but each time I eventually hit this same error. It doesn't happen when I set up the new Xcode project, but eventually it does. I've cleaned the build folder, restarted the Simulator, and even rebooted the Macbook I'm working on. Here's what happens when I click Product > Run: the app builds successfully the Simulator displays a white screen as expected then the error appears. Here are the error messages: In the debug area it says: SwiftData/ModelContainer.swift:159: Fatal error: failed to find a currently active container for Task Failed to find any currently loaded container for Task) and in the warning in the editor says Thread 1: Fatal error: failed to find a currently active container for Task The debugger is highlighting this line in the call stack (not sure if that's useful as a newbie): #7 0x0000000100bb6d90 in Task.init(id:title:priority:) at /var/folders/3v/q8g4z9bx4lb9z6t7mhgwgghw0000gn/T/swift-generated-sources/@__swiftmacro_10BadgerTool4Task5ModelfMm_.swift:2 Here's the code: The Task model isn't complex: // Task.swift import Foundation import SwiftData @Model class Task { @Attribute(.unique) var id: UUID var title: String var priority: String init(id: UUID = UUID(), title: String, priority: String = "None") { self.id = id self.title = title self.priority = priority } } I have the model container set in the context of the highest view: // BadgerToolApp.swift import SwiftUI import SwiftData @main struct BadgerToolApp: App { var body: some Scene { WindowGroup { NavView() .modelContainer(for: Task.self) } } } I tried moving all other views one layer down (which is why the unnecessary NavView is there): // NavView.swift import SwiftUI import SwiftData struct NavView: View { @State var selectedCollection: Collection? @State var selectedTask: Task? var body: some View { NavigationSplitView( sidebar: { SideBarView(selectedCollection: $selectedCollection, selectedTask: $selectedTask) }, content: { ContentListView(selectedCollection: $selectedCollection, selectedTask: $selectedTask) }, detail: { TaskDetailView(selectedCollection: $selectedCollection, selectedTask: $selectedTask) } ) } } Trying to isolate my mistake I removed everything else related to SwiftData (except for the imports) and gave my views hard-coded data for the simulator like this: // SideBarView.swift import SwiftUI import SwiftData struct SideBarView: View { @Binding var selectedCollection: Collection? @Binding var selectedTask: Task? let collections = presetCollections //temp data var body: some View { List(collections, id: \.id, selection: $selectedCollection){ collection in NavigationLink(collection.name, value: collection) } List{ Text("All Tasks") Text("Settings") } .navigationTitle("Collections") } } Everything works as expected if I comment out the .modelContainer() modifier on the call to NavView view I change the Task definition from the @Model class to a regular struct like this: // Task.swift // with @Model removed import Foundation struct Task: Hashable { var id: UUID var title: String var priority: String init(id: UUID = UUID(), title: String, priority: String = "None") { self.id = id self.title = title self.priority = priority } } What am I missing? Could it be a bug? Thanks for your help!
11
4
8.2k
Aug ’23
my game is crashed in release mode with log: "name": "IoDispatcher", "description": "(Data Abort) byte write Translation fault"
here is my log: { "triggered": true, "id": 210291, "name": "IoDispatcher", "threadState": { "x": [ { "value": 1 }, { "value": 0 }, { "value": 73896 }, { "value": 6107867720 }, { "value": 14624363642880 }, { "value": 193526931390464 }, { "value": 1 }, { "value": 0 }, { "value": 3 }, { "value": 123 }, { "value": 2 }, { "value": 4294967293 }, { "value": 1099511627776 }, { "value": 0 }, { "value": 0 }, { "value": 0 }, { "value": 0 }, { "value": 2 }, { "value": 0 }, { "value": 4509545232 }, { "value": 0 }, { "value": 0 }, { "value": 4294967295 }, { "value": 16384 }, { "value": 4604246008 }, { "value": 0 }, { "value": 4604245920 }, { "value": 0 }, { "value": 0 } ], "flavor": "ARM_THREAD_STATE64", "lr": { "value": 4428080928 }, "cpsr": { "value": 1610612736 }, "fp": { "value": 6107868496 }, "sp": { "value": 6107867824 }, "esr": { "value": 2449473606, "description": "(Data Abort) byte write Translation fault" }, "pc": { "value": 4428080988, "matchesCrashFrame": 1 }, "far": { "value": 3 } }, "frames": [ { "imageOffset": 52602716, "imageIndex": 0 }, { "imageOffset": 51998460, "imageIndex": 0 }, { "imageOffset": 52467176, "imageIndex": 0 }, { "imageOffset": 83388868, "imageIndex": 0 }, { "imageOffset": 52491332, "imageIndex": 0 }, { "imageOffset": 52489360, "imageIndex": 0 }, { "imageOffset": 52025832, "imageIndex": 0 }, { "imageOffset": 51930384, "imageIndex": 0 }, { "imageOffset": 5816, "symbol": "_pthread_start", "symbolLocation": 148, "imageIndex": 8 }, { "imageOffset": 2952, "symbol": "thread_start", "symbolLocation": 8, "imageIndex": 8 } ] `},`
1
0
383
Jul ’23