Skip to main content
Solved

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

  • 22 October 2021
  • 5 replies
  • 3544 views

Forum|alt.badge.img+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?

Best answer by Andy

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

View original
Did this post help you find an answer to your question?

5 replies

Andy
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • 236 replies
  • Answer
  • October 22, 2021

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


Forum|alt.badge.img+3
  • Author
  • Helper
  • 2 replies
  • October 22, 2021

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

 


Andy
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • 236 replies
  • October 22, 2021

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


Forum|alt.badge.img
  • New Member
  • 1 reply
  • January 21, 2022

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!


Forum|alt.badge.img

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings