google / promises

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

FBLPromises.framework confusion #126

Closed jeff-h closed 4 years ago

jeff-h commented 5 years ago

I'm a little confused about what FBLPromises.framework is, and whether I need to link & embed it. I'm using Carthage and Swift, no objc.

When I link and embed the Carthage-built Promises.framework, everything builds fine but it crashes on launch with:

dyld: Library not loaded: @rpath/FBLPromises.framework/Versions/A/FBLPromises
  Referenced from: /Users/jeffh/Library/Developer/Xcode/DerivedData/CMShell_Demo-byxhplkbtqxauhejbrbnapbkhdgi/Build/Products/Debug/CMShell Demo.app/Contents/Frameworks/Promises.framework/Versions/A/Promises
  Reason: image not found

If I also embed and include the Carthage-built FBLPromises.framework then everything works just fine, but I don't want to be including stuff I shouldn't / don't need.

Sorry if I'm doing something stupid. And thanks for this beautiful library, it really is a joy to use.

shoumikhin commented 4 years ago

Hi @jeff-h,

You do absolutely need the FBLPromises framework, the Swift framework is founded on it.

Thanks.

jeff-h commented 4 years ago

Thanks for clarifying that for me!

svgupta97 commented 4 years ago

I am getting this error, where do I add this framework?

jeff-h commented 4 years ago

@svgupta97 How are you including this in your project (SPM, CocoaPods, Carthage)?

iarata commented 4 years ago

Getting same error! It runs perfectly on the simulator (iOS 13.3) but after I updated my device (iPhone 11 Pro) to iOS 13.3.1, I started getting this error. I included the Firebase/Firestore, Firebase/Auth and Firebase/Core using CocoaPods I've also read that some people said removing the profile should work but didn't work for me.

This is the full error:

dyld: Library not loaded: @rpath/FBLPromises.framework/FBLPromises
  Referenced from: /private/var/containers/Bundle/Application/11X3EC15-5A16-4E27-AC4A-FB0503E6F1E2/Zeta.app/Zeta
  Reason: no suitable image found.  Did find:
    /private/var/containers/Bundle/Application/11X3EC15-5A16-4E27-AC4A-FB0503E6F1E2/Zeta.app/Frameworks/FBLPromises.framework/FBLPromises: code signature invalid for '/private/var/containers/Bundle/Application/11X3EC15-5A16-4E27-AC4A-FB0503E6F1E2/Zeta.app/Frameworks/FBLPromises.framework/FBLPromises'

    /private/var/containers/Bundle/Application/11X3EC15-5A16-4E27-AC4A-FB0503E6F1E2/Zeta.app/Frameworks/FBLPromises.framework/FBLPromises: stat() failed with errno=25
    /private/var/containers/Bundle/Application/11X3EC15-5A16-4E27-AC4A-FB0503E6F1E2/Zeta.app/Frameworks/FBLPromises.framework/FBLPromises: code signature invalid for '/private/var/containers/Bundle/Application/11X3EC15-5A16-4E27-AC4A-FB0503E6F1E2/Zeta.app/Frameworks/FBLPromises.framework/FBLPromises'

    /private/var/containers/Bundle/Application/11X3EC15-5A16-4E27-AC4A-FB0503E6F1E2/Zeta.app/Frameworks/FBLPromises.framework/FBLPromises: stat() failed with errno=1
    /private/var/containers/Bundle/Application/11X3EC15-5A16-4E27-AC4A-FB0503E6F1E2/Zeta.app/Frameworks/FBLPromises.framework/FBLPromises: code signature invalid for '/private/var/containers/Bundle/Application/11X3EC15-5A16-4E27-AC4A-FB0503E6F1E2/Zeta.app/Frameworks/FBLPromises.framework/FBLPromises'

    /private/var/containers/Bundle/Application/11X3EC15-5A16-4E27-AC4A-FB0503E6F1E2/Zeta.app/Frameworks/FBLPromises.framework/FBLPromises: stat() failed with errno=1
(lldb) 
thepoppingone commented 4 years ago

Facing the same issue as above when running the app on iPhone 7+ iOS 13.3.1

shoumikhin commented 4 years ago

Mind share some reproduction steps or a sample project where you integrate Promises and the build fails on iOS 13.3.1?

thepoppingone commented 4 years ago

Hi I realised that this is not a Promises issue but a CocoaPods one, other projects running Pods facing similar problems when deploying with Cocoapods integrated projects. Will update if I find a solution to this.

DracarySineD commented 4 years ago

Hi I realised that this is not a Promises issue but a CocoaPods one, other projects running Pods facing similar problems when deploying with Cocoapods integrated projects. Will update if I find a solution to this.

Hello, if you find a solution please, don't forget to update this. I have the same issue. Finding a solve, I found this message: "You are probably using free developer account. Apple blocked utilizing external frameworks on free accounts with 13.3.1 upgrade. Try downgrading to 13.3.". May It be true?

jeff-h commented 4 years ago

Not sure if it helps, but if you haven't tried it I would suggest integrating this library into your projects using Swift Package Manager. Apple has integrated SPM really nicely into Xcode now.

thepoppingone commented 4 years ago

https://github.com/Alamofire/Alamofire/issues/3051

Comment !use_frameworks inside cocoapods and rebuild the pods. That will make it work on 13.3.1

DracarySineD commented 4 years ago

Alamofire/Alamofire#3051

Comment !use_frameworks inside cocoapods and rebuild the pods. That will make it work on 13.3.1

After I did it, I got this error: "Module map file '/Users/admin/Desktop/Projects/Firebase 0.1/Pods/Headers/Private/openssl_grpc/BoringSSL-GRPC.modulemap' not found"

thepoppingone commented 4 years ago

Alamofire/Alamofire#3051 Comment !use_frameworks inside cocoapods and rebuild the pods. That will make it work on 13.3.1

After I did it, I got this error: "Module map file '/Users/admin/Desktop/Projects/Firebase 0.1/Pods/Headers/Private/openssl_grpc/BoringSSL-GRPC.modulemap' not found"

Unable to assist you further, but basically I followed that link and got mine fixed.

DracarySineD commented 4 years ago

Okay, thank you very much

RFitz99 commented 4 years ago

Hi I realised that this is not a Promises issue but a CocoaPods one, other projects running Pods facing similar problems when deploying with Cocoapods integrated projects. Will update if I find a solution to this.

Hello, if you find a solution please, don't forget to update this. I have the same issue. Finding a solve, I found this message: "You are probably using free developer account. Apple blocked utilizing external frameworks on free accounts with 13.3.1 upgrade. Try downgrading to 13.3.". May It be true?

Yes, I have been having the same issue and it is all due to the 13.3.1 update. After trying all of the above recommendations, I ended up rolling back to 13.3 and I am now able to deploy to my phone again with no errors. This is obviously not the perfect solution since as a side effect I was not able to do a restore because all of my backups happened to be with 13.3.1 and subsequently was making update again. So a fresh install of 13.3 did the trick but again, just had to manually reinstall all apps, etc.

sunchitanand commented 4 years ago

@RFitz99 how did you downgrade to 13.3? For me it says downgrade not authorized.

RFitz99 commented 4 years ago

@RFitz99 how did you downgrade to 13.3? For me it says downgrade not authorized.

@sunchitanand I followed the instructions provided here. However, for it to work, Apple must still be signing the version. At the time that I rolled back, they were. I have just checked myself to see if they are still signing this version, using this site but it appears they have stopped. Unfortunately when a new version comes out it is a short window of opportunity, maybe a couple weeks, i'm not sure.

Perhaps if more people get on to Apple, we may get an answer or resolution since this is still only a temporary fix.

iarata commented 4 years ago

Apple blocked utilising external frameworks on free accounts with 13.3.1 upgrade.

so I used a developer account with an active subscription and now everything works fine for me. also using use_modular_headers! gave me this error: Showing Recent Issues The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 4.3, but the range of supported deployment target versions is 8.0 to 13.2.99.

check this issue in here: Library not loaded: @rpath/FBLPromises.framework/FBLPromises iOS 13.3.1

itpmisolo commented 4 years ago

Facing the same issue as above when running the app on iPhone 7+ iOS 13.3.1

did you fix that sir?

stebratori commented 4 years ago

Alamofire/Alamofire#3051

Comment !use_frameworks inside cocoapods and rebuild the pods. That will make it work on 13.3.1

This solved it for me. I have now validated Firebase and using it successfully on 13.3.1