kstenerud / KSCrash

The Ultimate iOS Crash Reporter
MIT License
4.23k stars 706 forks source link

dyld: Symbol not found: _objc_debug_tag60_permutations #538

Closed howoften closed 1 week ago

howoften commented 1 month ago

app crash before - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions here is some info print from XCode Console:

dyld: Symbol not found: _objc_debug_tag60_permutations
  Referenced from: /private/var/containers/Bundle/Application/021CB514-F075-4F65-BB58-B0B26CAAACF7/Test.app/Frameworks/KSCrash.framework/KSCrash
  Expected in: /usr/lib/libobjc.A.dylib
 in /private/var/containers/Bundle/Application/021CB514-F075-4F65-BB58-B0B26CAAACF7/Test.app/Frameworks/KSCrash.framework/KSCrash

My podfile:

target 'Test' do
  use_frameworks!
pod 'KSCrash', '~> 2.0.0-alpha.5'
end

The app runs on an iPhone 6 with iOS12.3.1,Xcode version is 15.4

GLinnik21 commented 4 weeks ago

Hi! KSCrash isn't typically used as a dynamic library. Could you try modifying your Podfile to use static linking?

target 'Test' do
  use_frameworks! :linkage => :static
  pod 'KSCrash', '~> 2.0.0-alpha.5'
end

Run pod install and rebuild. Does the error persist? Can you share the code you're using to initialize and run KSCrash? ?

GLinnik21 commented 4 weeks ago

Relevant code https://github.com/kstenerud/KSCrash/blob/69d30a2fe2b2781b28275b18ab5f0f59eba47e79/Sources/KSCrashRecordingCore/KSObjCApple.h#L257-L273

zjzjhaha commented 3 weeks ago

I also encounter the same Issue on iphone SE1 with 13.3.1, How to support this version to fix the BUG

howoften commented 2 weeks ago

Hi! KSCrash isn't typically used as a dynamic library. Could you try modifying your Podfile to use static linking?

target 'Test' do
  use_frameworks! :linkage => :static
  pod 'KSCrash', '~> 2.0.0-alpha.5'
end

Run pod install and rebuild. Does the error persist? Can you share the code you're using to initialize and run KSCrash? ?

thanks for your reply,I've been pretty busy lately. I have modified my podFile like yours, But the error still exist,

howoften commented 2 weeks ago

it cant be reproduce on iOS simulators, because i cant install a simulators with iOS 12.

by the way. it can be run well on iPhone 15 Pro with iOS 17.5 my xcode is 15.4 (15F31d)

according to the xcode console log, the library libobjc.A.dylib doesnt contains the symbol ‘_objc_debug_tag60_permutations’;may be the shared dynamic library(libobjc.A.dylib) on my iPhone 6(12.3.1) doesnt contains that symbol, could you consider to remove that symbol?

At 2024-08-30 06:06:52, "Gleb Linnik" @.***> wrote:

Could you let me know which version of Xcode you used to build the binaries? Does this issue reproduce on iOS simulators or only on physical devices? We're currently trying to reproduce it, but we're having trouble getting Xcode to work with iOS 12 and 13. Our checks with Xcode 11 and iOS 12 and iOS 13 simulators don't show any problems. Unfortunately, Xcode 14 and 15 don't support these iOS versions for debugging.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

GLinnik21 commented 2 weeks ago

it cant be reproduce on iOS simulators, because i cant install a simulators with iOS 12.

We installed the iOS 12 simulator on Xcode 11 on VM, so it doesn't reproduce on the iOS 12 simulator.

according to the xcode console log, the library libobjc.A.dylib doesnt contains the symbol ‘_objc_debug_tag60_permutations’;may be the shared dynamic library(libobjc.A.dylib) on my iPhone 6(12.3.1) doesnt contains that symbol, could you consider to remove that symbol?

Yes, that is exactly what is happening. I did find my iPhone 6 with iOS 12 and successfully reproduced the problem. I'm already working on a solution in the linked branch.