google / promises

Promises is a modern framework that provides a synchronization construct for Swift and Objective-C.
Apache License 2.0
3.79k stars 292 forks source link

dynamic linkage issue #161

Closed rex-remind101 closed 3 years ago

rex-remind101 commented 3 years ago

Using Firebase through Cocoapods I receive the following error

dyld: Library not loaded: @rpath/FBLPromises.framework/FBLPromises
  Referenced from: /Users/<Me>/Library/Developer/CoreSimulator/Devices/36EADE97-65F3-4E85-AEED-E73CDED046E4/data/Containers/Bundle/Application/A89E5B88-D246-49CE-9BC0-EC7669AC1902/Remind101.app/<MyApp>
  Reason: image not found

This appears related to FBLPromises.framework/. The solution here suggests using static linkage https://github.com/firebase/firebase-ios-sdk/issues/4889#issuecomment-596147745 however, this is not acceptable in our application on it's own, since multiple other dependencies require dynamic linkage.

It appears that podspec may have a flag to enforce static linkage https://guides.cocoapods.org/syntax/podspec.html#static_framework . Is it possible that you need to add this? I do not see it in the Podfile

ykjchen commented 3 years ago

Hey, thanks for reporting.

I tried to repro but was unable to. Here were my steps:

  1. create new app
  2. Add these to Podfile:
pod 'Firebase/Analytics'
pod 'Firebase/Auth'
pod 'Firebase/Firestore'
  1. Run pod install
  2. Add the following to AppDelegate:
import Firebase

// in ...didFinishLaunching...
FirebaseApp.configure()
  1. Ran app in simulator

Do you have more specific instructions on how to repro?

ykjchen commented 3 years ago

Closing for now (unable to repro). Please re-open if you are able to provide additional details. Thanks.