Post

Replies

Boosts

Views

Activity

Reply to Change in iOS 14 Beta 3 to trigger 0xdead10cc
Hey guys, I just reproduce the bug without Realm. It's all about holding flock in App Group directory. You can follow these steps to quickly reproduce the weird crash: Create a new iOS App project (Objective-C) using Xcode. Add an App Group container in project setting page. Paste this code snippet in application:didFinishLaunchingWithOptions:: &#9;&#9;// 1. prepare a non-empty file under App Group directory &#9;&#9;NSFileManager* fileManager = [NSFileManager defaultManager]; &#9;&#9;NSURL* dir = [fileManager containerURLForSecurityApplicationGroupIdentifier:@"group.***.***....."]; <= your group id here &#9;&#9;NSURL* fileUrl = [dir URLByAppendingPathComponent:@"file"]; &#9;&#9;[fileManager createFileAtPath:[fileUrl path] &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9; contents:[@"some data..." dataUsingEncoding:(NSUTF8StringEncoding)] &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9; attributes:nil]; &#9;&#9; &#9;&#9;// 2. hold a file lock &#9;&#9;int fd = open([fileUrl path].UTF8String, O_RDWR); &#9;&#9;int ret = flock(fd, LOCK_SH); 4. Debug the project on a physical device running iOS 14 b3/b4/b5. 5. The app will be killed after you return to home screen. 6. If you unlock the file by calling flock(fd, LOCK_UN) before the app enters suspended state, the app won't be killed by iOS. Note that: This only crash on a physical device, not a simulator. Xcode does not handle it like a normal crash. It just print a termination message in console and ends the debug session gracefully.
Aug ’20
Reply to TestFlight watchOS build crashes on Apple Watch Series 3 devices (32-bit) (Bitcode related?)
I'm having the same problem. As long as my watchOS app is installed via TestFlight or the App Store, it crashes on startup. And it only reproduces on Apple Watch S3 (armv7k). My watch app target also uses Swift Package Manager to reference dependencies. However, if the exact same Archive is installed via Xcode's Devices Manager, the app no longer crashes! This seems to indicate that it's not a compiler or build issue, but rather a TestFlight/App Store distribution issue for the app. The crash log indicates that the crash was due to a segmentation fault: Exception Type:&#9;EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_INVALID_ADDRESS at 0x00000034 VM Region Info: 0x34 is not in any region.&#9;Bytes before following region: 2834380 ... Termination Signal: Segmentation fault: 11 Termination Reason: Namespace SIGNAL, Code 0xb Terminating Process: exc handler [1746] Triggered by Thread:&#9;0 Thread 0 name: Thread 0 Crashed: 0&#9; WatchApp Extension&#9;&#9;&#9;&#9;&#9;&#9; 0x004311be _hidden#5646_ + 14 (hidden#5809_:0) <== 🤔 impossible crash! 1&#9; WatchApp Extension&#9;&#9;&#9;&#9;&#9;&#9; 0x0042f62c _hidden#5611_ + 34 2&#9; WatchApp Extension&#9;&#9;&#9;&#9;&#9;&#9; 0x0042e76a _hidden#5596_ + 40 3&#9; WatchApp Extension&#9;&#9;&#9;&#9;&#9;&#9; 0x00327dc8 StoreKey.init(wrappedValue:key:) + 114 (__hidden#969_:19) 4&#9; WatchApp Extension&#9;&#9;&#9;&#9;&#9;&#9; 0x002d4ff2 Store.init() + 116 (Store.swift:24) ... 7&#9; libdispatch.dylib&#9;&#9;&#9;&#9;&#9;&#9; 0x4d8b6100 _dispatch_once_callout + 14 (once.c:52) So, to summarize, the necessary factors for this problem to be reproduced are: Apple Watch with armv7k CPU using Swift Package Manager distributed via TestFlight/App Store
Jan ’21
Reply to Problem with Sign In With Apple & IAP (IOS 14 Beta 1)
Encountered same issue on watchOS 7.2 when trying to restore a purchase using StoreKit API. Error Domain = SKErrorDomain Code = 0 "UNKNOWN_ERROR" UserInfo = { &#9;NSUnderlyingError = 0x154f34c0 { &#9;&#9;Error Domain = ASDErrorDomain Code = 500 "Unhandled exception" &#9;&#9;UserInfo = { &#9;&#9;&#9;NSLocalizedDescription = Unhandled exception, &#9;&#9;&#9;NSUnderlyingError = 0x1542a6e0 { &#9;&#9;&#9;&#9;Error Domain = AMSErrorDomain Code = 100 "Authentication Failed" &#9;&#9;&#9;&#9;UserInfo = { &#9;&#9;&#9;&#9;&#9;NSLocalizedDescription = Authentication Failed, &#9;&#9;&#9;&#9;&#9;NSUnderlyingError = 0x154a3630 { &#9;&#9;&#9;&#9;&#9;&#9;Error Domain = com.apple.accounts Code = 6 "The operation couldn’t be completed. (com.apple.accounts error 6.)" &#9;&#9;&#9;&#9;&#9;&#9;UserInfo = 0x1541d610(not displayed) &#9;&#9;&#9;&#9;&#9;}, &#9;&#9;&#9;&#9;&#9;NSLocalizedFailureReason = The verify credentials call failed. &#9;&#9;&#9;&#9;} &#9;&#9;&#9;}, &#9;&#9;&#9;NSLocalizedFailureReason = An unknown error occurred &#9;&#9;} &#9;}, &#9;NSLocalizedDescription = UNKNOWN_ERROR }
Jan ’21
Reply to Catalyst app localized languages other than base language (EN) not being displayed in Mac App Store
Ran into the exact same problem. My app uses Simplified Chinese as the base language and also supports English. But on the Mac App Store page, it only shows that Chinese is supported. Yet when I download and install the app, it does support both languages. You can even verify the list of languages supported by the app through System Preferences -> Languages & Regions -> App. So this means there should be no problem with the app build and the problem is with the Mac App Store.
Jan ’21
Reply to How to change the app name shown in a Catalyst app?
This is what I found for Catalyst mac app: If you add both CFBundleName and CFBundleDisplayName into your InfoPlist.strings file, and set "Application has localized display name" to YES in your Info.plist, then the $(PRODUCT_NAME) will never be shown to user. However, the app name is always localized to your app developent language, not to the current system language. I have not yet found a solution. In addition, the main menu and about dialog are perfectly localized. Note also that I found another serious problem with the localization of Catalyst applications: https://developer.apple.com/forums/thread/670649
Jan ’21
Reply to PlugInKit crash on widget
I encountered the same problem. My Widget Extension opens a Realm database on init(). The database file located in the App Group, and later the Widget Extension receives 0xdead10cc error. I have never reproduced this problem in my own development environment, or test environment. But I can continue to collect this crash report from users. There is still no solution.
Jun ’21
Reply to Xcode 13.2.1: Crash about swift::Demangle/ResolveAsSymbolicReference when use SwiftUI if-available
I committed a code-level support request about this compiler bug several days ago. However, they replied that there is no workaround available, and the bug is still being investigated. Finally I realize I have to solve this apple bug by myself. Possible workarounds I found: Go back to use Xcode 13.1 Keep using Xcode 13.2 but disable compiler optimization with -Onone Write a simple container view like @available(iOS 15, *) struct Wrapper<Content: View>: View {…}. And wrap the true branch of each if-#available in ViewBuilder with it.
Dec ’21
Reply to Unable to export for Ad Hoc or Development distribution with Xcode 13.3 RC
Exactly same issue here. Not only does it affect Ad Hoc distribution, but for normal App Store distribution, it also receives errors. "ITMS-90562: Invalid Bundle - One or more dynamic libraries that are referenced by your app are not present in dylib search path." (this is incorrect error message). Unchecking "Include Bitcode for iOS content" can workaround the problem, but this cannot be applied to apps with Apple Watch applications. Detailed error log: ipatool failed with an exception: #<CmdSpec::NonZeroExitException: $ /Applications/Xcode.app/Contents/Developer/usr/bin/python3 /Applications/Xcode.app/Contents/Developer/usr/bin/bitcode-build-tool -v -t /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin --sdk /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS8.5.sdk -o /var/folders/lv/58r5dhv52j779_qn41gnq4c80000gn/T/ipatool20220310-49488-1r6fqqy/thinned-out/armv7k/Payload/MyApp.app/Watch/WatchApp.app/Frameworks/libswift_Concurrency.dylib --generate-dsym /var/folders/lv/58r5dhv52j779_qn41gnq4c80000gn/T/ipatool20220310-49488-1r6fqqy/thinned-out/armv7k/Payload/MyApp.app/Watch/WatchApp.app/Frameworks/libswift_Concurrency.dylib.dSYM --strip-swift-symbols /var/folders/lv/58r5dhv52j779_qn41gnq4c80000gn/T/ipatool20220310-49488-1r6fqqy/thinned-in/armv7k/Payload/MyApp.app/Watch/WatchApp.app/Frameworks/libswift_Concurrency.dylib Status: pid 49600 exit 1 Stdout: SDK path: /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS8.5.sdk SDK version: 8.5 PATH: ['/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin', '/Applications/Xcode.app/Contents/Developer/usr/bin'] Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo MachoInfo: cd / ['/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo', '-info', '/var/folders/lv/58r5dhv52j779_qn41gnq4c80000gn/T/ipatool20220310-49488-1r6fqqy/thinned-in/armv7k/Payload/MyApp.app/Watch/WatchApp.app/Frameworks/libswift_Concurrency.dylib'] -= Output =- Non-fat file: /var/folders/lv/58r5dhv52j779_qn41gnq4c80000gn/T/ipatool20220310-49488-1r6fqqy/thinned-in/armv7k/Payload/MyApp.app/Watch/WatchApp.app/Frameworks/libswift_Concurrency.dylib is architecture: armv7k Exited with 0 Command took 0 seconds Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dwarfdump GetUUID: cd / ['/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dwarfdump', '-u', '/var/folders/lv/58r5dhv52j779_qn41gnq4c80000gn/T/ipatool20220310-49488-1r6fqqy/thinned-in/armv7k/Payload/MyApp.app/Watch/WatchApp.app/Frameworks/libswift_Concurrency.dylib'] -= Output =- UUID: 3285553C-DF9E-38CB-84BA-C5E9E898FFDF (armv7k) /var/folders/lv/58r5dhv52j779_qn41gnq4c80000gn/T/ipatool20220310-49488-1r6fqqy/thinned-in/armv7k/Payload/MyApp.app/Watch/WatchApp.app/Frameworks/libswift_Concurrency.dylib Exited with 0 ... Command took 0 seconds Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS8.5.sdk/usr/lib/libobjc.A.tbd Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS8.5.sdk/usr/lib/libc++.1.tbd Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS8.5.sdk/usr/lib/libSystem.B.tbd Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS8.5.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation.tbd Search Path: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.1.6/lib/darwin, /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/watchos, /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS8.5.sdk/usr/lib, /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS8.5.sdk/System/Library/Frameworks libswiftCore.tbd not found in dylib search path Stderr: > /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:372:in `run' /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2889:in `block in CompileOrStripBitcodeInBundle' /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2828:in `each' /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2828:in `CompileOrStripBitcodeInBundle' /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2813:in `block in CompileOrStripBitcodeInBundle' /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2812:in `each' /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2812:in `CompileOrStripBitcodeInBundle' /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:3115:in `block in ProcessIPA' /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:3076:in `each' /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:3076:in `ProcessIPA' /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:4038:in `<main>'
Mar ’22