dyld: Symbol not found: _OBJC_CLASS_$_Reachability, Xcode 11 crash

Viewed 1971

I encountered the following crash only after installing the pod PusherSwift.

On application launch, getting a crash with the following crash logs:

dyld: Symbol not found: _OBJC_CLASS_$_Reachability
  Referenced from: /Users/abc/Library/Developer/CoreSimulator/Devices/387D652C-CB80-4739-88B1-DD04ACAFA8D6/data/Containers/Bundle/Application/D9CEB1B3-9B9D-42E8-AFB6-8BCA056DDE1C/LalaFood-User.app/Frameworks/ChatSDK.framework/ChatSDK
  Expected in: /Users/abc/Library/Developer/CoreSimulator/Devices/387D652C-CB80-4739-88B1-DD04ACAFA8D6/data/Containers/Bundle/Application/D9CEB1B3-9B9D-42E8-AFB6-8BCA056DDE1C/LalaFood-User.app/Frameworks/Reachability.framework/Reachability
 in /Users/abc/Library/Developer/CoreSimulator/Devices/387D652C-CB80-4739-88B1-DD04ACAFA8D6/data/Containers/Bundle/Application/D9CEB1B3-9B9D-42E8-AFB6-8BCA056DDE1C/LalaFood-User.app/Frameworks/ChatSDK.framework/ChatSDK

I have the following file copied directly to my project. As I checked PusherSwift.podspec, it has ReachabilitySwift as a dependency. So, I'm guessing that's where the problem came from. I tried deleting the Reachability file that was directly copied on my project, but after running, the crash is still there.

I also have Reachability library by Tony Million through another pod, but I have no idea which one.

I also tried implementing PusherSwift on a fresh new project and it works perfectly fine. But when I try on my existing project, it always crashes.

Is there something I have to import like the header file or something to add? I keep seeing to add the framework on Frameworks, Libraries, and Embedded Content. I tried to add Reachability.framework there, but it did not work.

Hoping someone could help.

Thank you!

1 Answers

For the time being, I just did a workaround on this. I just manually copied the files I need from PusherSwift, instead of installing it via Cocoapods. Then, pod installed its dependencies.

Related