Solved

iOS Xcode issue - App crashes after adding the cocoapods pod 'Purchases' to my podfile

  • 22 October 2021
  • 5 replies
  • 3249 views

Badge +3

I have an existing Objective-C project that is already using CocoaPods.

After adding the pod 'Purchases' to my podfile my project no longer runs.

It quits with the error messages:

__abort_with_payload
dyld[15384]: Library not loaded: @rpath/libswiftCore.dylib
libswiftCore.dylib' (no such file)

I am on Xcode 13.0

I checked the solutions on this page https://stackoverflow.com/questions/26024100/dyld-library-not-loaded-rpath-libswiftcore-dylib, and based on that, have confirmed the following:

For both my project and target:

  • Build Settings > Build Options > Always Embed Swift Standard Libraries is set to Yes

For my target:

  • Build Settings > Linking > Runpath Search Paths is set to @executable_path/Frameworks

I also Cleaned the project and deleted all Derived Data.

What else do I need to do to resolve this error?

icon

Best answer by Andy 22 October 2021, 18:23

View original

5 replies

Badge

Wow, I had the same error “Library not loaded: @rpath/libswiftCore.dylib” and stumbled across this post via a Google search.  Creating an empty swift file solved the issue, thank you Andy!

I don’t even use RevenueCat for my app but now I may consider it!

Userlevel 5
Badge +8

Hi there! 👋

I’d recommend following the steps in our SDK Troubleshooting Guide

In particular, I think your issue might be solved by adding a single, empty Swift file to the project. Could you give that a shot? 

 

Andy

Badge +3

Thank you. Adding the swift file which prompted me to create a bridging header fixed the issue.

 

Userlevel 5
Badge +8

Thanks for the update! I’m glad it worked 😃 Have a great day!

Badge

This fixed my problem, although my symptom was different though; program loaded and ran, but then crashed during Purchase’s init on the call to  storeKit2Listener.listenForTransactions.

Reply