Debugging

RSS for tag

Discover and resolve issues with your app.

Posts under Debugging tag

200 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Help: scorllTo() doesn't works in VStack
I can read the scrollPosition correctly, but scrollTo() doesn't work. iOS 17, Xcode 15.2. Code like this below(can directly copy and paste): import SwiftUI struct PositionTest: View { @State private var weathers = Weather.samples @State private var scrollPosition: Weather.ID? @State private var isTaped: Bool = false var body: some View { VStack { Text("Scroll Position: " + (scrollPosition ?? "Cupertino")) if !isTaped { CollapsedView( weathers: $weathers, scrollPosition: $scrollPosition, isTaped: $isTaped ) } else { ExpandedView( weathers: $weathers, scrollPosition: $scrollPosition, isTaped: $isTaped ) } } .font(.title) .fontWeight(.semibold) .animation(.default, value: isTaped) } } #Preview { PositionTest() } struct CollapsedView: View { @Binding var weathers: [Weather] @Binding var scrollPosition: Weather.ID? @Binding var isTaped: Bool var body: some View { ScrollViewReader { proxy in ScrollView { VStack(spacing: 20) { ForEach(weathers) { weather in Text(weather.name) .frame(width: 350, height: 227) .foregroundStyle(.white) .background(.blue.gradient) .cornerRadius(40) .id(weather.id as Weather.ID?) .onTapGesture { isTaped.toggle() } } } .frame(maxWidth: .infinity) .scrollTargetLayout() } .scrollIndicators(.hidden) .scrollTargetBehavior(.viewAligned) .scrollPosition(id: $scrollPosition, anchor: .center) .onAppear { proxy.scrollTo(scrollPosition, anchor: .center) } } } } struct ExpandedView: View { @Binding var weathers: [Weather] @Binding var scrollPosition: Weather.ID? @Binding var isTaped: Bool var body: some View { ScrollViewReader { proxy in ScrollView { VStack(spacing: 20) { ForEach(weathers) { weather in Text(weather.name) .frame(width: 250, height: 227) .foregroundStyle(.white) .background(.indigo.gradient) .clipShape(.circle) .id(weather.id as Weather.ID?) .onTapGesture { isTaped.toggle() } } } .frame(maxWidth: .infinity) .scrollTargetLayout() } .scrollIndicators(.hidden) .scrollTargetBehavior(.viewAligned) .scrollPosition(id: $scrollPosition, anchor: .center) .onAppear { proxy.scrollTo(scrollPosition, anchor: .center) } } } } struct Weather: Identifiable { var id: String { name } let name: String let temp: Int static let samples = [ Weather(name: "Cupertino", temp: 12), Weather(name: "New York", temp: 13), Weather(name: "ShangHai", temp: 14), Weather(name: "London", temp: 15), Weather(name: "Las Vegas", temp: 16), ] } I found if I simply change the VStack to LazyVStack in both CollapsedView() and ExpandedView(), the scrollTo() method works fine. But in my project, for some reason I don't want to use LazyVStack, just want to use VStack, is there any way to make scorllTo() works in VStack?
0
0
251
Jan ’24
Xcode 15.2 built app crashes during launch on iOS 16 but no issue with iOS 17
I have an iOS app using Flutter that runs fine on iOS 17 but crashes on iOS 16 with the following error. I did not have this issue with older version of Xcode. I have attached the crashlog. This is what I see in the Xcode debug window. dyld[557]: Symbol not found: _$s7Network11NWInterfaceV13InterfaceTypeO13wiredEthernetyA2EmFWC Referenced from: <0E8CEF1B-6257-3DBF-9E33-E80DDE7EAA93> /private/var/containers/Bundle/Application/71D50E27-D60B-474F-B4D1-CB8ACFFD556C/Runner.app/Runner Expected in: <F9D5A7E3-1EFB-3879-B33F-FD16AB5E4AD5> /System/Library/Frameworks/Network.framework/Network My Xcode version is Version Version 15.2 (15C500b)
2
0
1.2k
Jan ’24
Swift loop execution time is 20x slower when adding print statement that is executed once at the end
My Swift app iterates over two Array&lt;String&gt; and compares their elements. Something very strange is going on. I have the impression the compiler is doing some optimizations that I cannot understand: commenting out the print statement in MyInterface.run() improves the runtime from about 10 seconds to below 0.5 seconds, and that print statement is executed only once at the end of the program. Even commenting out the if above it has the same effect. I'm running the app in Xcode Instruments. When debugging it in Xcode, there is no difference when commenting out any of those two lines. Instruments shows that most of the time is spent in protocol witness for Collection.subscript.read in conformance [A], Array.subscript.read and similar, which in turn call different malloc, initialize, free and release methods. What's the problem with this code? import Cocoa @main class AppDelegate: NSObject, NSApplicationDelegate { func applicationDidFinishLaunching(_ aNotification: Notification) { let x = Array(repeating: "adsf", count: 100000) let y = Array(repeating: "adsf", count: 100000) let diff = MyInterface(x: x, y: y) diff.run() } } class MyInterface&lt;List: RandomAccessCollection &amp; MutableCollection&gt; where List.Element: Comparable, List.Index == Int { private let algorithm: Algorithm&lt;List&gt; init(x: List, y: List) { algorithm = AlgorithmSubclass(x: x, y: y) } func run() { algorithm.run() if (0..&lt;1).randomElement() == 0 { print(algorithm.x.count) // commenting out this line, or the if above, makes the program 20x faster } } } class Algorithm&lt;List: RandomAccessCollection&gt; where List.Element: Equatable, List.Index == Int { var x: List var y: List init(x: List, y: List) { self.x = x self.y = y } func run() { } } class AlgorithmSubclass&lt;List: RandomAccessCollection&gt;: Algorithm&lt;List&gt; where List.Element: Equatable, List.Index == Int { override func run() { var count = 0 for _ in 0..&lt;1000 { for i in 0..&lt;min(x.endIndex, y.endIndex) { if x[i] == y[i] { count += 1 } } } let alert = NSAlert() alert.messageText = "\(count)" alert.runModal() } }
0
0
342
Jan ’24
"devicectl device process launch --start-stopped" attach debugger from command line
Topic : Attaching debugger via lldb to remote process on tv device Current status I launch an app on a remote tv device that is paired to a macbook using the command xcrun devicectl device process launch --start-stopped -d XXXX-XXXXXX, com.metasample.SampleApp -j launch.json App is launched in stopped state and waiting for debugger to be attached to continue execution Using the XCode->Debug->Attach to Process, I am able to select the process and connect to the process and execute the app through the debugger. Expectation I would want to replace step 3 and use a command line instead to attach the debugger to the remote process instead of doing it via XCode.(the reason is to automate the execution without any manual intervention) I know the process id of the app on the remote tv device when i inspect the launch.json file that is created when the launch the app. eg pid 312 I also know the ip address of the device eg ip 192.168.178.29 However I do not know how to establish the debug session using lldb from command line. I launch lldb in the command line and execute these commands platform select remote-tvos target create /Users/works/apps/SampleApp-Payload/SampleApp.app/SampleApp gdb-remote 192.168.178.29: "what is the port?" - I do not know what port to connect to? Many Thanks for your suggestions and inputs on how to connect to the remote app via command line lldb.
0
2
1.1k
Jan ’24
iOS 17 Update Causes App to Crash on Some Devices
When a user updates their device to iOS 17 (any version) on a device with MDM, our app crashes but only on some device, not all. The same app runs fine on iOS 16. We cannot recreate the issue in-house and even our customers cannot reliably recreate the crash as it only happens on some devices and not others. The crash we get is: SIGABRT: UICollectionView internal inconsistency: missing final attributes for cell Once the device gets this crash, the only way to fix it is to delete and reinstall the app and then everything works fine. Anyone having a similar issue with iOS 17 and MDM?
2
0
1k
Feb ’24
Approved electron app didn't launch when downloaded from App Store.
Build metadata is Entitlements Naukri Launcher.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libGLESv2.dylib com.apple.security.app-sandbox: true com.apple.security.inherit: true Naukri Launcher.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework com.apple.security.app-sandbox: true com.apple.security.inherit: true Naukri Launcher.app/Contents/MacOS/Naukri Launcher com.apple.application-identifier: XXXXXX.com.naukri.securelogin com.apple.security.cs.allow-jit: true com.apple.developer.team-identifier: XXXXXX com.apple.security.application-groups: ( "XXXXXX.com.naukri.securelogin" ) com.apple.security.cs.allow-unsigned-executable-memory: true com.apple.security.app-sandbox: true com.apple.security.network.client: true com.apple.security.cs.allow-dyld-environment-variables: true Naukri Launcher.app/Contents/Library/LoginItems/Naukri Launcher Login Helper.app/Contents/MacOS/Naukri Launcher Login Helper com.apple.security.app-sandbox: true com.apple.security.inherit: true Naukri Launcher.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libffmpeg.dylib com.apple.security.app-sandbox: true com.apple.security.inherit: true Naukri Launcher.app/Contents/Frameworks/Naukri Launcher Helper.app/Contents/MacOS/Naukri Launcher Helper com.apple.security.app-sandbox: true com.apple.security.inherit: true Naukri Launcher.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libvk_swiftshader.dylib com.apple.security.app-sandbox: true com.apple.security.inherit: true Naukri Launcher.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libEGL.dylib com.apple.security.app-sandbox: true com.apple.security.inherit: true Naukri Launcher.app/Contents/Frameworks/Naukri Launcher Helper (GPU).app/Contents/MacOS/Naukri Launcher Helper (GPU) com.apple.security.app-sandbox: true com.apple.security.inherit: true Naukri Launcher.app/Contents/Frameworks/Naukri Launcher Helper (Renderer).app/Contents/MacOS/Naukri Launcher Helper (Renderer) com.apple.security.app-sandbox: true com.apple.security.inherit: true Naukri Launcher.app/Contents/Frameworks/Naukri Launcher Helper (Plugin).app/Contents/MacOS/Naukri Launcher Helper (Plugin) com.apple.security.app-sandbox: true com.apple.security.inherit: true build package.json are { "name": "naukri-login-app", "version": "1.1.11", "description": "naukri-login-app", "productName": "Naukri Launcher", "main": "app/min/main.js", "author": "Naukri ", "homepage": "recruit.naukri.com", "publisher": "recruit.naukri.com", "email": "", "scripts": { "start": "electron app/src/main.js", "git-cleangen": "git filter-branch -f --index-filter 'git rm -rf --cached --ignore-unmatch gen' -- --all &amp;&amp; npm run remove-all-git-refs", "remove-all-git-refs": "rm -rf .git/refs/original/ &amp;&amp; git reflog expire --expire=now --all &amp;&amp; git gc --prune=now &amp;&amp; git gc --aggressive --prune=now", "electron-build": "node electron-build.js", "build": "npm run minify-js &amp;&amp; electron-builder", "minify-js": "javascript-obfuscator ./app/src --output app/min", "build-win": "node scripts/build.js --env=win", "build-mac": "node scripts/build.js --env=mac", "build-linux": "node scripts/build.js --env=linux", "package-mac": "electron-packager . --overwrite --platform=darwin --arch=x64 --icon=app/src/assets/icons/mac/icon.icns --prune=true --out=release-builds", "package-win": "electron-packager . secure-login --overwrite --asar=true --platform=win32 --arch=ia32 --icon=app/src/assets/icons/win/icon.ico --prune=true --out=release-builds --version-string.CompanyName=Naukri --version-string.FileDescription=CE --version-string.ProductName="Recruiter Login App"", "package-linux": "electron-packager . recruiter-initiator-app --overwrite --asar=true --platform=linux --arch=x64 --icon=app/src/assets/icons/linux/icon.png --prune=true --out=release-builds" }, "build": { "appId": "com.xxxxx.securelogin", "artifactName": "naukri-launcher.${ext}", "directories": { "output": "gen/${platform}/${arch}", "buildResources": "gen/installers/${platform}" }, "files": [ "!gen", "!app/src" ], "protocols": { "name": "naukri-recruiter", "schemes": [ "deeplink" ] }, "publish": [ { "provider": "generic", "url": "https://static.naukimg.com/s/7/111/${platform}/${arch}/" } ], "afterSign": "./build/notarize.js", "mac": { "type": "distribution", "target": ["mas"], "category": "public.app-category.business", "icon": "build/icons/mac/icon.icns", "entitlements": "build/entitlements.mas.plist", "provisioningProfile": "/Users/akhilgoel/Downloads/NL_MAS_distribution.provisionprofile", "extendInfo": { "ElectronTeamID":"XXXXXX", "ITSAppUsesNonExemptEncryption": "NO", "NSMicrophoneUsageDescription": "Allow microphone access to take audio input for login form" } }, "mas": { "entitlements": "build/entitlements.mas.plist", "entitlementsInherit": "build/entitlements.mas.inherit.plist", "entitlementsLoginHelper":"build/entitlements.mas.loginhelper.plist", "provisioningProfile": "/Users/akhilgoel/Downloads/NL_MAS_distribution.provisionprofile" }, "win": { "target": "nsis", "icon": "build/icons/win/icon.ico" }, "nsis": { "oneClick": false }, "linux": { "category": "your.app.office.type", "target": "AppImage", "icon": "build/icons/linux/icon.png", "mimeTypes": [ "x-scheme-handler/naukri-recruiter" ], "desktop": { "MimeType": "x-scheme-handler/naukri-recruiter" } } }, "devDependencies": { "@electron-forge/cli": "^6.0.3", "electron": "^19.0.0", "electron-builder": "^23.6.0", "electron-builder-squirrel-windows": "^24.0.0-alpha.11", "electron-installer-dmg": "^4.0.0", "electron-notarize": "^1.2.2", "electron-rebuild": "^3.2.9", "electron-winstaller": "^5.1.0", "javascript-obfuscator": "^4.0.2" }, "dependencies": { "@electron/asar": "^3.2.2", "axios": "^1.2.0", "electron-squirrel-startup": "^1.0.0", "electron-store": "^8.1.0", "electron-updater": "^5.3.0", "fs": "0.0.1-security", "getmac": "^5.20.0", "jsencrypt": "^3.3.2", "macaddress": "^0.5.3" } } And same is happening for TestFlight.
3
0
572
Jan ’24
App does not show up in other country's search results.
Hi, I don't know if it's okay to mention the app name? We developed an app in the Philippines and we can search and download our app here. However, when we requested our friends to download and test our app in the US, they are unable to search for the app. Our friends currently live in New York, Los Angeles, and New Mexico. The app's availability status is 'Available' for 174 countries (which includes United States). Any ideas on what causes this issue?
1
0
245
Jan ’24
launching a file dialog(choose file dialog window) is crashing in macOS Sonoma 14.2.1
I am unable to select a file where the file dialog window is not coming up to choose file. find the below error from the logs 11:30:00.608 [AWT-EventQueue-0] INFO com.bulloch.scheduler.util.FileChooser - Choose file 2024-01-12 11:30:00.953 java[1716:171065] Suppressing invocation of -[NSApplication runModalForWindow:]. -[NSApplication runModalForWindow:] cannot run inside a transaction begin/commit pair, or inside a transaction commit. Consider switching to an asynchronous equivalent. ( 0 AppKit 0x000000018aeac704 -[NSApplication runModalForWindow:] + 332 1 AppKit 0x000000018b8b45d0 -[NSSavePanel runModal] + 340 2 AppKit 0x000000018b8bcf2c -[NSSavePanel(Deprecated) runModalForDirectory:file:types:] + 200 3 libawt_lwawt.dylib 0x00000001221cd064 -[CFileDialog safeSaveOrLoad] + 340 4 Foundation 0x00000001885c5298 __NSThreadPerformPerform + 264 5 CoreFoundation 0x000000018749fa4c CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 28 6 CoreFoundation 0x000000018749f9e0 __CFRunLoopDoSource0 + 176 7 CoreFoundation 0x000000018749f750 __CFRunLoopDoSources0 + 244 8 CoreFoundation 0x000000018749e340 __CFRunLoopRun + 828 9 CoreFoundation 0x000000018749d9ac CFRunLoopRunSpecific + 608 10 Foundation 0x00000001885a7a38 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212 11 libawt_lwawt.dylib 0x000000012220ef8c Java_sun_lwawt_macosx_LWCToolkit_doAWTRunLoopImpl + 340 12 ??? 0x00000001058e5144 0x0 + 4388180292 13 ??? 0x00000001055bf554 0x0 + 4384879956 14 ??? 0x0000000104e76304 0x0 + 4377240324 15 libjvm.dylib 0x0000000104365f7c _ZN9JavaCalls11call_helperEP9JavaValueP12methodHandleP17JavaCallArgumentsP6Thread + 1892 16 libjvm.dylib 0x000000010439b564 _ZL17jni_invoke_staticP7JNIEnv_P9JavaValueP8_jobject11JNICallTypeP10_jmethodIDP18JNI_ArgumentPusherP6Thread + 644 17 libjvm.dylib 0x000000010439bec8 jni_CallStaticObjectMethod + 432 18 libawt_lwawt.dylib 0x00000001221f1a50 -[CommonComponentAccessibility accessibilityFocusedUIElement] + 636 19 libawt_lwawt.dylib 0x00000001221b1fb0 -[AWTView accessibilityFocusedUIElement] + 156 20 AppKit 0x000000018b7310b0 -[NSWindow(NSWindowAccessibility) accessibilityFocusedUIElement] + 88 21 AppKit 0x000000018ad4c770 NSAccessibilityHandleFocusChangedForce + 136 22 AppKit 0x000000018ad755e0 -[NSWindow _changeKeyAndMainLimitedOK:] + 616 23 AppKit 0x000000018b71f27c -[NSWindow _orderOut:calculatingKeyWithOptions:documentWindow:] + 912 24 AppKit 0x000000018acbc714 NSPerformVisuallyAtomicChange + 108 25 AppKit 0x000000018b720ae0 -[NSWindow _reallyDoOrderWindowOutRelativeTo:] + 448 26 AppKit 0x000000018b720e98 -[NSWindow _reallyDoOrderWindow:] + 80 27 AppKit 0x000000018b7210e8 -[NSWindow _doOrderWindow:] + 264 28 Foundation 0x00000001885c5298 __NSThreadPerformPerform + 264 29 CoreFoundation 0x000000018749fa4c CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 28 30 CoreFoundation 0x000000018749f9e0 __CFRunLoopDoSource0 + 176 31 CoreFoundation 0x000000018749f750 __CFRunLoopDoSources0 + 244 32 CoreFoundation 0x000000018749e340 __CFRunLoopRun + 828 33 CoreFoundation 0x000000018749d9ac CFRunLoopRunSpecific + 608 34 HIToolbox 0x0000000191a4c448 RunCurrentEventLoopInMode + 292 35 HIToolbox 0x0000000191a4c0d8 ReceiveNextEventCommon + 220 36 HIToolbox 0x0000000191a4bfdc _BlockUntilNextEventMatchingListInModeWithFilter + 76 37 AppKit 0x000000018ac7a8a4 _DPSNextEvent + 660 38 AppKit 0x000000018b454980 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 716 39 libosxapp.dylib 0x000000011f78425c -[NSApplicationAWT nextEventMatchingMask:untilDate:inMode:dequeue:] + 144 40 AppKit 0x000000018ac6dd50 -[NSApplication run] + 476 41 libosxapp.dylib 0x000000011f784038 +[NSApplicationAWT runAWTLoopWithApp:] + 184 42 libawt_lwawt.dylib 0x000000012220e30c +[AWTStarter starter:headless:] + 500 43 libosxapp.dylib 0x000000011f785c20 +[ThreadUtilities invokeBlockCopy:] + 28 44 Foundation 0x00000001885c5298 __NSThreadPerformPerform + 264 45 CoreFoundation 0x000000018749fa4c CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 28 46 CoreFoundation 0x000000018749f9e0 __CFRunLoopDoSource0 + 176 47 CoreFoundation 0x000000018749f750 __CFRunLoopDoSources0 + 244 48 CoreFoundation 0x000000018749e340 __CFRunLoopRun + 828 49 CoreFoundation 0x000000018749d9ac CFRunLoopRunSpecific + 608 50 java 0x0000000102f2022c CreateExecutionEnvironment + 824 51 java 0x0000000102f1caf8 JLI_Launch + 1576 52 java 0x0000000102f22a38 main + 76 53 dyld 0x00000001870410e0 start + 2360 ) 11:30:00.958 [AWT-EventQueue-0] WARN com.bulloch.scheduler.sched.ImportFileHelper - No file selected to import
1
0
457
Jan ’24
PhotosPicker won't appear when it embedded in popover
When I embedded a PhotosPickerView() in popover, it won't works: struct PhotoPickerTest: View { @State private var selectedPhotoItem: PhotosPickerItem? @State var isTaped: Bool = false var body: some View { Button("", systemImage: "plus") { isTaped = true } .popover(isPresented: $isTaped) { PhotoPickerView() } } func PhotoPickerView() -&gt; some View { PhotosPicker(selection: $selectedPhotoItem) { Image(systemName: "photo") } } } but if I just replace "popover" to "sheet", it works fine: struct PhotoPickerTest: View { @State private var selectedPhotoItem: PhotosPickerItem? @State var isTaped: Bool = false var body: some View { Button("", systemImage: "plus") { isTaped = true } .sheet(isPresented: $isTaped) { PhotoPickerView() } } func PhotoPickerView() -&gt; some View { PhotosPicker(selection: $selectedPhotoItem) { Image(systemName: "photo") } } } I think it's a bug, and bothered me a lot, hope apple engineers can fix it.
3
0
477
Jan ’24
App Crashes instantly when using TestFlight
I developed an application using React Native and the help of expo. The app is fully functioning using Expo Go, however, when I upload a build and test it through TestFlight the app instantly crashes when opened and I am struggling to be able to read through the crash report. Below is the crash report, any help or direction would be greatly appreciated. Crash Report
2
0
464
Jan ’24
Symbolication is always missing contents of lastExceptionBacktrace
sample.ips.txt Xcode, MacSymbolicator and QuickLook all fail to consider the symbols from the lastExceptionBacktrace of a modern .ips crash report. I have attached a full report as an example (I had to change its extension to txt or I wouldn't be able to upload it - change it back to ips and then use Quicklook to see its contents, which will be missing the backtrace). Here's the excerpt that matters: "lastExceptionBacktrace": [ { "imageOffset": 992564, "symbol": "__exceptionPreprocess", "symbolLocation": 164, "imageIndex": 13 }, { "imageOffset": 106164, "symbol": "objc_exception_throw", "symbolLocation": 60, "imageIndex": 25 }, { "imageOffset": 274836, "symbol": "-[__NSDictionaryM setObject:forKeyedSubscript:]", "symbolLocation": 1176, "imageIndex": 13 }, This trace is missing from a symbolicated report - I only get to see the main threads. Here's the start of that report: ------------------------------------- Translated Report (Full Report Below) ------------------------------------- Process: Find Any File [2616] Path: /Applications/Find Any File.app/Contents/MacOS/Find Any File Identifier: org.tempel.findanyfile Version: 2.4.1 (355) Code Type: ARM-64 (Native) Parent Process: launchd [1] User ID: 0 Date/Time: 2024-01-09 11:31:33.8066 -0600 OS Version: macOS 14.3 (23D5043d) Report Version: 12 Anonymous UUID: E3DD5ECE-F28C-31BA-A2EA-DE39D4284163 Time Awake Since Boot: 990 seconds System Integrity Protection: enabled Crashed Thread: 11 Dispatch queue: Folder size calc (Macintosh HD) (QOS: UNSPECIFIED) Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Termination Reason: Namespace SIGNAL, Code 6 Abort trap: 6 Terminating Process: Find Any File [2616] Application Specific Information: abort() called Thread 0:: Dispatch queue: com.apple.main-thread 0 CoreAutoLayout 0x18cecbdd8 -[NSISEngine hasValue:forEngineVar:] + 284 1 AppKit 0x187f51894 NSViewActuallyUpdateFrameFromLayoutEngine + 128 2 AppKit 0x187f11790 -[NSView layout] + 636 Contrary to this, when I get a similar crash report from an older macOS version where it still uses the older .crash instead of .ips files, I get to see the backtrace and can symbolicate it as expected. This seems to be a major bug in the symbolicator for ips files, and it's been around for years. I'm surprised that this is still not taken care of. Am I the only one who's noticing this?
1
0
421
Jan ’24
Crash on launch, while in review - but no crash in Xcode or TestFlight
Hi all! My new iOS app (first one in Swift and SpriteKit, was using ObjectiveC and Cocos2D before, a few years back) - got rejected with the dreaded "We were unable to review your app as it crashed on launch.", That's especially bad news when it never ever crashed on any on our devices when testing (variety of phones, iPads and all sort of iOS) either in debug or release, before submission. So no luck repro-ing! The crashlog text file apple review team sent back, renamed as .crash, seems to open in Xcode (right click on it) when linked to the right project and seems to point in the leaderboard code fetching the local authenticated user's score. This is some code that I shamelessly copy/pasted from a StackOverflow page a few months ago, and seemed to work right away so moved-on back then, but something must be unsafe in there (sorry, bit of a rookie with Swift optionals etc). Any help would be much appreciated as this code seems to work fine in debug, without warnings or anything, and also works fine in release using TestFlight - so we simply cannot repro the apple QA issue, and we need to fix it blind! This is the function below that is crashing, right on the line that has the "{ player, _, _ in ": func sync_hiscore() { if (GKLocalPlayer.local.isAuthenticated) { if #available(iOS 14.0, *) { GKLeaderboard.loadLeaderboards( IDs: ["HatStacker_LD01"] ) { leaderboards, _ in leaderboards?[0].loadEntries( for: [GKLocalPlayer.local], timeScope: .allTime ) { player, _, _ in // &lt;&lt;&lt;&lt; !!! CRASHES HERE!! if ( player!.score &gt; player_hiscore) { player_hiscore = player!.score } } } } } } I've also attached the full crashlog if that's of any help! Many thanks all, sorry for such a Swift rookie question, but to add to the confusion this is also the first time one of our apps gets rejected for such an obvious bad crash at launch, that no one has seen during our weeks of testing! Any idea why it's only in release and only in the apple HQ/review env that we get that error? Could they have an invalid Game Center account that is confusing the "player" score fetching? Cheers, JBB HatStacker_build4.crash
5
0
1.6k
Jan ’24
XCode 15 can't run on iOS 17 devices. Previous preparation error: An error occurred while communicating with a remote process.. The connection was invalidated.
XCode 15 can't run on iOS 17 devices. Simulator 17.2 is installed. Working perfectly in simulator iOS 16 devices and below works. Devices: Sonoma 14.2 (M1 Pro 16") XCode 15.1 iOS 17.1( iPhone 15 Pro) I've tried many things and nothing works: Restarting XCode Restarting Mac Restarting devices Turning on Developer Mode Re-trust Mac devices multiple times Turning off VPN. I don't even use VPN (https://developer.apple.com/forums/thread/737875) Tried XCode 15.2 beta too. Same issue. Using multiple USB-C cable. Including thunderbolt cable. Force every device to connect to 5GHz network and 2.4GHz network. Turning off WiFi, Bluetooth, Mobile Data on Mac + iOS device. Re-trust the device. this one is a real head scratcher because network is not related to the issue... The issue I experienced: Always the same error: Previous preparation error: An error occurred while communicating with a remote process.. The connection was invalidated. Capacity in Device and Simulator window in XCode is unknown (should've been 64GB, 128GB, etc) Surely I'm not the only one experiencing this? Super annoying and I have lost 9++ hours debugging this without any avail. Error when connected via cable. Waiting to reconnect to Philip's iPhone 15 Pro Domain: com.apple.dt.deviceprep Code: -10 Recovery Suggestion: Previous preparation error: An error occurred while communicating with a remote process.. The connection was invalidated. User Info: { DVTErrorCreationDateKey = "2024-01-05 20:48:35 +0000"; DVTRecoveryBlockKey = "<__NSMallocBlock__: 0x600004c1e850>"; NSLocalizedRecoveryOptions = ( Cancel ); NSRecoveryAttempter = "<_DVTErrorRecoveryHandler: 0x6000059e8ce0>"; } -- Error when connected via WiFi System Information macOS Version 14.2.1 (Build 23C71) Xcode 15.1 (22502) (Build 15C65) Timestamp: 2024-01-06T03:50:50+07:00 An error occurred while communicating with a remote process. Domain: com.apple.dt.CoreDeviceError Code: 3 Failure Reason: The connection was invalidated. User Info: { DVTErrorCreationDateKey = "2024-01-05 20:56:13 +0000"; IDERunOperationFailingWorker = IDEInstallCoreDeviceWorker; "com.apple.dt.DVTCoreDevice.operationName" = enablePersonalizedDDI; } -- The connection was invalidated. Domain: com.apple.Mercury.error Code: 1001 User Info: { XPCConnectionDescription = "<SystemXPCPeerConnection 0x600000fe09c0> { <connection: 0x600003ed8000> { name = com.apple.CoreDevice.CoreDeviceService, listener = false, pid = 0, euid = 4294967295, egid = 4294967295, asid = 4294967295 } }"; } -- Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : { "device_isCoreDevice" = 1; "device_isWireless" = 1; "device_model" = "iPhone16,1"; "device_osBuild" = "17.2.1 (21C66)"; "device_platform" = "com.apple.platform.iphoneos"; "dvt_coredevice_version" = "355.7.6"; "dvt_mobiledevice_version" = "1643.60.2"; "launchSession_schemeCommand" = Run; "launchSession_state" = 1; "launchSession_targetArch" = arm64; "operation_duration_ms" = 34929; "operation_errorCode" = 1001; "operation_errorDomain" = "com.apple.dt.CoreDeviceError.3.com.apple.Mercury.error"; "operation_errorWorker" = IDEInstallCoreDeviceWorker; "operation_name" = IDERunOperationWorkerGroup; "param_debugger_attachToExtensions" = 0; "param_debugger_attachToXPC" = 1; "param_debugger_type" = 3; "param_destination_isProxy" = 0; "param_destination_platform" = "com.apple.platform.iphoneos"; "param_diag_MainThreadChecker_stopOnIssue" = 0; "param_diag_MallocStackLogging_enableDuringAttach" = 0; "param_diag_MallocStackLogging_enableForXPC" = 1; "param_diag_allowLocationSimulation" = 1; "param_diag_checker_tpc_enable" = 1; "param_diag_gpu_frameCapture_enable" = 0; "param_diag_gpu_shaderValidation_enable" = 0; "param_diag_gpu_validation_enable" = 0; "param_diag_memoryGraphOnResourceException" = 0; "param_diag_queueDebugging_enable" = 1; "param_diag_runtimeProfile_generate" = 0; "param_diag_sanitizer_asan_enable" = 0; "param_diag_sanitizer_tsan_enable" = 0; "param_diag_sanitizer_tsan_stopOnIssue" = 0; "param_diag_sanitizer_ubsan_stopOnIssue" = 0; "param_diag_showNonLocalizedStrings" = 0; "param_diag_viewDebugging_enabled" = 1; "param_diag_viewDebugging_insertDylibOnLaunch" = 1; "param_install_style" = 0; "param_launcher_UID" = 2; "param_launcher_allowDeviceSensorReplayData" = 0; "param_launcher_kind" = 0; "param_launcher_style" = 99; "param_launcher_substyle" = 8192; "param_runnable_appExtensionHostRunMode" = 0; "param_runnable_productType" = "com.apple.product-type.application"; "param_structuredConsoleMode" = 1; "param_testing_launchedForTesting" = 0; "param_testing_suppressSimulatorApp" = 0; "param_testing_usingCLI" = 0; "sdk_canonicalName" = "iphoneos17.2"; "sdk_osVersion" = "17.2"; "sdk_variant" = iphoneos; } -- System Information macOS Version 14.2.1 (Build 23C71) Xcode 15.1 (22502) (Build 15C65) Timestamp: 2024-01-06T03:56:13+07:00
11
5
8.3k
Apr ’24
Xcode debugger doesn't pause on breakpoints (simulator SDK < iOS 17)
Hello. I'm seeing an inconsistent behavior where breakpoints I set in my (Swift) iOS app behave normally when I'm debugging on a device or on a simulator running iOS 17.x, but when I try using simulators of iOS 16 or 15 the breakpoints get ignored completely. I also observe that the breakpoints remain solid blue and do NOT adopt the dotted blue outline, as experienced by other users. I've seen a few posts on here and on SO about the general issue of ignored breakpoints (with no conclusive answer AFAIK), but I haven't seen any where the behavior varies with the SDK being used. The behavior is repeatable and predictable (within the same app at least). I am not adding the breakpoints after building/running, and I'm sure the logic reaches the lines with the breakpoints (and again, whenever I switch to an iOS 17 simulator, execution does pause as expected with the exact same breakpoints). Things I've tried and looked into: Clean up project build folder Delete and re-install simulators (iOS 16.4 and 15.5) Deleted the entire derived data directory, as well as the CoreSimulator one. Confirm the build configuration is Debug, and the "Debug executable" option is checked. inspect various build flags mentioned in other posts: {Swift compiler - Code generation - Optimization level - Debug: -0none; Debug information format: DWARF (I also tried DWARF with dSYM with no impact)}. Most of my settings are on the plain vanilla/out of the box side, with only a couple of SPM dependencies, and I've been maintaining the same app for about 5 years and don't think I've come across this behavior before. Currently using Xcode 15.1. Deployment target is 14.0. Thank you.
8
12
3.1k
Jan ’24
Issue with Firebase Firestore?
So I currently have a Firebase Firestore. That isn't necessarily what I need help with. The Firestore is set up correctly. The issue I am having is, I keep getting an error saying "Thread 1: "Failed to get FirebaseApp instance. Please call FirebaseApp.configure() before using Firestore"". Even though I am calling FirebaseApp.configure() before using Firestore. In fact, it's the first thing my app does when it runs. Anyone have any solutions? Here is the code in my @main file: import UserNotifications import FirebaseCore import FirebaseFirestore import SwiftUI class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool { // Firebase configuration // FirebaseApp.configure() // Notification setup UNUserNotificationCenter.current().requestAuthorization(options: [.badge, .sound, .alert]) { granted, _ in guard granted else { return } DispatchQueue.main.async { application.registerForRemoteNotifications() } } return true } } @main struct MyApp: App { init() { FirebaseApp.configure() } @UIApplicationDelegateAdaptor(AppDelegate.self) var delegate @Environment(\.colorScheme) var colorScheme let myData = MyData() var body: some Scene { WindowGroup { ContentView() .environmentObject(myData) .background(colorScheme == .dark ? Color.black : Color.white) .foregroundColor(colorScheme == .dark ? Color.white : Color.black) //.background(Color(red: 0.956, green: 1, blue: 1)) } } } And here is my code in the ContentView file (this is where I am getting the error): import FirebaseFirestore import FirebaseCore class MyData : ObservableObject { @Published var selectedTab : Int = 1 @Published var selectedView : ContentView.Views = .selectView @Published var selectedLawyer : ContentView.Lawyers = .selectLawyer @Published var selectedAgent : ContentView.Agents = .selectAgent @Published var selectedState : FiltersView.States = .selectState @Published var selectedStatus : ProfileView.Status = .looking @Published var isShowingProfile = false @Published var isShowingFilters = false @Published var isShowingSettings = false @Published var allowLoanOfficers = false @Published var allowFinancialAdvisors = false @Published var allowDivorceLawyers = false @Published var allowCriminalLawyers = false @Published var allowPersonalInjuryLawyers = false @Published var allowCivilLawyers = false @Published var allowCorporateLawyers = false @Published var allowTaxLawyers = false @Published var allowBusinessLawyers = false @Published var allowFinancialLawyers = false @Published var allowInsuranceLawyers = false @Published var allowEstateLawyers = false @Published var allowMedicalMalpracticeLawyers = false @Published var allowContractLawyers = false @Published var allowRealEstateLawyers = false @Published var allowRealEstateAgents = false @Published var allowIndividualSellers = false @Published var allowHealthInsuranceAgents = false @Published var allowAutoInsuranceAgents = false @Published var allowCommercialBrokers = false @Published var allowMortgageLenders = false @Published var allowMechanics = false @Published var name = "Please Add Name" @Published var filterCity = "" @Published var filterZip = 0 var filterZipString: String { // Computed property to get and set as String get { "\(filterZip)" } set { // Ensuring only numbers are accepted and updating the Int value if let number = Int(newValue.filter { "0123456789".contains($0) }) { filterZip = number } } } @Published var myLoanOfficers = 1 @Published var myFinancialAdvisors = 1 @Published var myDivorceLawyers = 1 @Published var myCriminalLawyers = 2 @Published var myPersonalInjuryLawyers = 1 @Published var myCivilLawyers = 1 @Published var myCorporateLawyers = 5 @Published var myTaxLawyers = 1 @Published var myBusinessLawyers = 2 @Published var myFinancialLawyers = 1 @Published var myInsuranceLawyers = 1 @Published var myEstateLawyers = 1 @Published var myMedicalMalpracticeLawyers = 1 @Published var myContractLawyers = 1 @Published var myRealEstateLawyers = 1 @Published var myRealEstateAgents = 2 @Published var myHealthInsuranceAgents = 1 @Published var myAutoInsuranceAgents = 1 @Published var myMechanics = 1 @Published var firstMyAgentTabOpen = true @Published var allowAutoCollapse = false @Published var isShowingLoanOfficers = false @Published var isShowingFinancialAdvisors = false @Published var isShowingDivorceLawyers = false @Published var isShowingCriminalLawyers = false @Published var isShowingPersonalInjuryLawyers = false @Published var isShowingCivilLawyers = false @Published var isShowingCorporateLawyers = false @Published var isShowingTaxLawyers = false @Published var isShowingBusinessLawyers = false @Published var isShowingFinancialLawyers = false @Published var isShowingInsuranceLawyers = false @Published var isShowingEstateLawyers = false @Published var isShowingMedicalMalpracticeLawyers = false @Published var isShowingContractLawyers = false @Published var isShowingRealEstateLawyers = false @Published var isShowingRealEstateAgents = false @Published var isShowingHealthInsuranceAgents = false @Published var isShowingAutoInsuranceAgents = false @Published var isShowingMechanics = false @Published var search = "" @Published var myAgentView = false @Published var messageSearch = "" @Published var selectedColor = Color.purple @Published var isShowingPurchases = false @Published var isShowingMonthlyPrices = true @Published var planType = "Plus" @Published var basicPrice = 29.99 @Published var plusPrice = 39.99 @Published var premiumPrice = 49.99 @Published var boostAmount = 1 @Published var oneBoost = 9.99 @Published var fiveBoosts = 37.49 @Published var tenBoosts = 49.99 private lazy var db = Firestore.firestore() init() { fetchInitialData() } private func fetchInitialData() { } } Anyone know any solutions? I have tried everything I can think of to get it to work.
1
1
443
Jan ’24
App relaunch fails sometimes: Failed to create bundle record for bundleID <private> and error <private>
When I try to use debug mode in Xcode, the app launches when initially started through the run command in Xcode. However, if I try to relaunch the app, it constantly fails (showing 1 second or so my splash screen before terminating). These are happening on real devices, provisioned via AppConnect. When I try to use the app and run it in release mode, relaunching sometimes works and sometimes it does not. Note that I am using Flutter and in the simulators, it works all great. These are the errors I get: domain: BSServiceConnectionErrorDomain; code: 3 ("OperationFailed"); "XPC error received on message reply handler"&gt;. Jan 2 01:14:09 SpringBoard(FrontBoard)[33] &lt;Error&gt;: [app&lt;com.example.myappnamehere(6DC11EF2-C3B9-459A-9210-004DA66051D2)&gt;:2287] Termination failed with error: Error Domain=RBSRequestErrorDomain Code=3 "No such process found" UserInfo={NSLocalizedFailureReason=No such process found} NSUnderlyingError = &lt;NSError: 0x2801a5e30; domain: BSServiceConnectionErrorDomain; code: 3 ("OperationFailed"); "XPC error received on message reply handler"&gt;; Jan 2 01:14:10 ReportCrash(MetricKitSource)[134] &lt;Error&gt;: Failed to create bundle record for bundleID &lt;private&gt; and error &lt;private&gt; Jan 2 01:15:56 SpringBoard(FrontBoard)[33] &lt;Notice&gt;: [(FBSceneManager):sceneID:com.example.myappnamehere-default][1] Scene invalidated with error: &lt;NSError: 0x2801a2d30; domain: BSServiceConnectionErrorDomain; code: 3 ("OperationFailed"); "XPC error received on message reply handler"&gt;. I noticed that sometimes I get these errors on a successful launch as well, except for this one: ReportCrash(MetricKitSource)[131] : Failed to create bundle record for bundleID and error This error is always shown when I fail to relaunch my app. Note that I do not see any other error logs. As the situation only happens when I first manually close my app (otherwise you can't relaunch, of course), the debugger log of Xcode etc. are not showing me anything anymore. Anyone knows what is happening here and how I can solve it?
0
0
372
Jan ’24