firebase / firebase-ios-sdk

Firebase SDK for Apple App Development
https://firebase.google.com
Apache License 2.0
5.67k stars 1.49k forks source link

[Carthage] Some frameworks are missing Info.plist files and fail installation in Simulator #5562

Closed daltonclaybrook closed 4 years ago

daltonclaybrook commented 4 years ago

[REQUIRED] Step 1: Describe your environment

[REQUIRED] Step 2: Describe the problem

I'm attempting to use the Firebase Analytics framework using Carthage, but when I attempt to run the app on the simulator with this framework and dependent frameworks included in the bundle, I receive the following error in Xcode:

Failed to load Info.plist from bundle at path /Users/daltonclaybrook/Library/Developer/CoreSimulator/Devices/506C25EF-1588-4AA5-A19A-79D71FE85875/data/Library/Caches/com.apple.mobile.installd.staging/temp.1Fh1ur/extracted/Payload/Argon.app/Frameworks/GoogleAppMeasurement.framework
Failed to load Info.plist from bundle at path /Users/daltonclaybrook/Library/Developer/CoreSimulator/Devices/506C25EF-1588-4AA5-A19A-79D71FE85875/data/Library/Caches/com.apple.mobile.installd.staging/temp.1Fh1ur/extracted/Payload/Argon.app/Frameworks/GoogleAppMeasurement.framework

Upon inspection of the framework in the Carthage builds folder, it is clear that this framework does not contain an Info.plist. As a test, I manually created an Info.plist for this framework and received the error again for FIRAnalyticsConnector and FirebaseAnalytics. Once I created Info.plists for all three frameworks, the build seems to install correctly.

Steps to reproduce:

  1. Make a new app and install the Firebase Analytics framework and all dependencies using Carthage.
  2. Run the app on the simulator.
  3. App fails to install in simulator with the above errors
google-oss-bot commented 4 years ago

I found a few problems with this issue:

paulb777 commented 4 years ago

Thanks for the report.

I see the issue of the missing Info.plist files, but I'm able to start in the simulator without a problem. Make sure they're NOT included in the Carthage copy-frameworks Build Phase.

Anyway, I'll take a look at including them in the next release.

paulb777 commented 4 years ago

It seems this has existed for several releases and seems to be mostly innocuous. Since there is a relatively easy workaround, I'm not going to prioritize for the next release.

daltonclaybrook commented 4 years ago

Thanks for the quick reply @paulb777. You're right, I had erroneously included these frameworks in the copy-frameworks phase. Removing them fixed my issue.

paulb777 commented 4 years ago

Great! I'll leave this issue open to add back the Info.plist files.

KC-218 commented 4 years ago

Sorry, I met the same question, how to create these info.plist. And what the plist content look like?

paulb777 commented 4 years ago

@Bruce9487 The solution is to make sure the Firebase frameworks are not in the copy-frameworks phase.