Giter Club home page Giter Club logo

Comments (101)

paulb777 avatar paulb777 commented on August 27, 2024 139

This PR will be updated when there is progress.

Please don't add additional comments unless you are interested in contributing to the implementation.

Use 👍 to indicate interest.

from firebase-ios-sdk.

basememara avatar basememara commented on August 27, 2024 126

22u1bz

Not all of us are ok with CocoaPods molesting our project files. Stripe, Intercom, and Facebook all have beast SDK's and have Carthage support, and you're the ones supposed to be mobile dev friendly.

The manual setup is ridiculously insane and a huge barrier. The impression I get is you got something super legacy I wouldn't touch with a 10-foot pole.

from firebase-ios-sdk.

paulb777 avatar paulb777 commented on August 27, 2024 48

An experimental binary Carthage Firebase distribution is now available including all of Firebase except Firestore and Invites. Details at https://github.com/firebase/firebase-ios-sdk/blob/master/Carthage.md.

I've also created a new github Carthage label for any specific issues or feedback.

from firebase-ios-sdk.

TKBurner avatar TKBurner commented on August 27, 2024 37

Todd from Crashlytics here. Right now we don't have plans for official Carthage support, we will continue to support Cocoapods and static frameworks.

I'll let the team know you are interested 👍

from firebase-ios-sdk.

monsantovernon avatar monsantovernon commented on August 27, 2024 23

Still waiting for direct Carthage support.

from firebase-ios-sdk.

mbuchetics avatar mbuchetics commented on August 27, 2024 21

How is this still an open issue? Is somebody actively working on it?
Carthage 0.28 supports static binaries: https://github.com/Carthage/Carthage/releases/tag/0.28.0

from firebase-ios-sdk.

soheilbm avatar soheilbm commented on August 27, 2024 18

For time being I already created a carthage compatible for firebase. https://github.com/soheilbm/firebase

from firebase-ios-sdk.

joselinoneto avatar joselinoneto commented on August 27, 2024 16

+1

from firebase-ios-sdk.

alokc83 avatar alokc83 commented on August 27, 2024 15

+1

from firebase-ios-sdk.

iSevenDays avatar iSevenDays commented on August 27, 2024 15

Is there any progress?

from firebase-ios-sdk.

morganchen12 avatar morganchen12 commented on August 27, 2024 13

We can't add Carthage support via a shared framework scheme for the time being since all the Firebase libraries have a common dependency in Analytics, which is still closed source and vended as a static library. If we were to try to distribute the other Firebase libs as dynamic frameworks, they would all have link time dependencies on Analytics and would end up duplicating the Analytics classes in the runtime, bloating app size and causing undefined behavior in some instances.

Carthage does support vending binaries, so we could still distribute these as static binaries with static dependencies on Analytics. Others wouldn't be able to easily build and redistribute libraries wrapping Firebase, but otherwise we'd retain many of the benefits of using Carthage. But before this can happen Analytics also needs to be distributed through Carthage, since mixing dependency managers is not something we should encourage developers to do.

The most straightforward solution would be to distribute Analytics as a dynamic framework through Carthage and then build the open source Firebase frameworks on top of that via a shared framework scheme. This is unlikely to happen in the very short term. In the longer term, we'd need to weigh the drawback of causing longer app launch times for dylib users versus the benefit of allowing users to install Firebase through Carthage and easily build frameworks wrapping Firebase. If you have either of these concerns (app launch times/want to build on top of Firebase), please share your thoughts!

from firebase-ios-sdk.

 avatar commented on August 27, 2024 11

+1

from firebase-ios-sdk.

paulocoutinhox avatar paulocoutinhox commented on August 27, 2024 10

+1

from firebase-ios-sdk.

paulb777 avatar paulb777 commented on August 27, 2024 10

Thanks to @blender for help with Carthage binary resource installation.

from firebase-ios-sdk.

floriangbh avatar floriangbh commented on August 27, 2024 9

+1

from firebase-ios-sdk.

TofPlay avatar TofPlay commented on August 27, 2024 7

I create some dynamic frameworks compatible with carthage for my own projects with dependencies between them. It's not really complex. And if you want to create a cross-platform framework compatible with carthage you can follow this tutorial I created: Swift Cross Platform Framework 👍

from firebase-ios-sdk.

paulb777 avatar paulb777 commented on August 27, 2024 7

@miguelrc86 Occasionally, Xcode's automatic linking fails to pull in all of the necessary libraries. You can find the missing libraries by internet searching the missing symbol errors or systematically adding in all of the libraries that show up in Carthage/Build/iOS/*/Modules/module.modulemap.

In this case, the c++ and sqlite libraries need to be added to the Link Binary With Libraries Build Phase:

screen shot 2018-05-09 at 9 14 51 pm

from firebase-ios-sdk.

miguelrc86 avatar miguelrc86 commented on August 27, 2024 7

@jemartti I resolved this by using import FirebaseCore instead if I remember well, so yeap, you need to follow the instructions by removing the Firebase framework and its related imports, hope it helps.

from firebase-ios-sdk.

olejnjak avatar olejnjak commented on August 27, 2024 6

I was also wondering, since Crashlytics are now part of Firebase and are the default crash reporting tool, can we expect official Carthage support? I mean different than "some guys" repo (Carthage/Carthage#2036)?

from firebase-ios-sdk.

schlingding avatar schlingding commented on August 27, 2024 5

+1 for Fabric/Crashlytics inclusion.

from firebase-ios-sdk.

tmspzz avatar tmspzz commented on August 27, 2024 5

Hello,

This PR which just landed in Carthage/master makes it possible to use the archive at https://kit-downloads.fabric.io/cocoapods/fabric/1.7.6/fabric.zip with Carthage. If you want to try it yourself, run brew update carthage --HEAD

What is left to do, is for Google/Crashlytics to host the binary dependency file somewhere. This is a simple JSON, see https://github.com/Carthage/Carthage/blob/master/Documentation/Artifacts.md#binary-project-specification

@TKBurner Do you think this is something that Fabic users can expect? It would definitely be better for developers to get Fabric from the original source rather than from (so far benevolent) third parties.

EDIT: Carthage also supports local binary definitions. You can host your own locally like so:

binary "Fabric.json" ~> 1.7.6

EDIT2: this is supported starting from carthage 0.30.1

from firebase-ios-sdk.

salqadri avatar salqadri commented on August 27, 2024 3

Hi @mhuusko5. Google Analytics for Firebase is what enables us to offer an integrated experience across the various other Firebase services we offer. As such we try to make Firebase Analytics included in the default experience since this is will maximize the value to our users. A great example of this is the AdMob integration with Firebase. When used together, we are able to combine metrics from both AdMob and Analytics to answer more sophisticated questions like "On which screens are users being exposed to advertising the most or the least?" However, we know that some advanced users may explicitly only want the AdMob SDK which is why we avoid having hard dependencies. So yes, since this is by design, you can expect that we will continue to only be using weak dependencies for the majority of our inter-product integrations. There are other weak dependencies in the codebase as well, such as between Database and Auth, such that Database works without it, but when Auth is included in an app its functionality is enhanced. Hope that clarifies this.

from firebase-ios-sdk.

paulb777 avatar paulb777 commented on August 27, 2024 3

@AndrewSB Specifically gRPC/etc/roots.pem from https://github.com/grpc/grpc.

I couldn't find a place to put it in the zip without being ignored by the Carthage installer.

The next time I have bandwidth for Carthage, I'll take another stab at it and make an issue. In the meantime, suggestions and contributions are welcome.

from firebase-ios-sdk.

karlpuusepp avatar karlpuusepp commented on August 27, 2024 3

Nope, already checked that. It's neither linked nor embedded with the app target.

It seems that replacing all import Firebase statements with import FirebaseAnalytics seems to get rid of the warning.

from firebase-ios-sdk.

nidegen avatar nidegen commented on August 27, 2024 3

@paulb777 For the protobuf checkout bug, deleting cache with rm -rf ~/Library/Caches/org.carthage.CarthageKit actually fixes my issue, probably also yours @walsht

I run it before each carthage update

from firebase-ios-sdk.

paulb777 avatar paulb777 commented on August 27, 2024 3

@schlingding 5.10.0 is now available via Carthage.

See #1862 to follow the status of official Carthage support

from firebase-ios-sdk.

AndrewSB avatar AndrewSB commented on August 27, 2024 2

@paulb777 are you talking about https://github.com/grpc/grpc? Can you be more specific with the resources that are required? Also, the folks over at Carthage are usually pretty helpful. If you aren't sure how to do this, creating an Issue there will probably get you an answer

from firebase-ios-sdk.

karlpuusepp avatar karlpuusepp commented on August 27, 2024 2

@prsolucoes these are static frameworks, you are not supposed to add them to the copy-frameworks script

from firebase-ios-sdk.

paulocoutinhox avatar paulocoutinhox commented on August 27, 2024 2

Hi,

I have updated everything and all is working.

I change all the project and make a sample that receive a message from Firebase console and show a push message. It is nice. With carthage support and makefile to help users.

Thanks for all support guys. Here is the repository:

https://github.com/prsolucoes/firebase

from firebase-ios-sdk.

schlingding avatar schlingding commented on August 27, 2024 2

from firebase-ios-sdk.

pisarm avatar pisarm commented on August 27, 2024 2

This also helped me - I was missing libicucore.tbd and libc++.tbd.

from firebase-ios-sdk.

jemartti avatar jemartti commented on August 27, 2024 2

Ah yes, switching from import Firebase to import FirebaseCore and adding StoreKit to "Link Binary With Libraries" got me to a clean build. Thanks @miguelrc86!

from firebase-ios-sdk.

nidegen avatar nidegen commented on August 27, 2024 2

I often get an error when running carthage update with the framework protobuf. No idea where it comes from. Happens on different machines. Any ideas? thanks:)

carthage update --platform iOS
*** Downloading binary-only framework FirebaseDynamicLinksBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseDynamicLinksBinary.json"
*** Downloading binary-only framework FirebasePerformanceBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebasePerformanceBinary.json"
*** Downloading binary-only framework FirebaseABTestingBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseABTestingBinary.json"
*** Downloading binary-only framework FirebaseFunctionsBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseFunctionsBinary.json"
*** Downloading binary-only framework Fabric at "https://raw.githubusercontent.com/Building42/Specs/master/Carthage/Fabric.json"
*** Downloading binary-only framework FirebaseDatabaseBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseDatabaseBinary.json"
*** Downloading binary-only framework FirebaseMessagingBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseMessagingBinary.json"
*** Downloading binary-only framework FirebaseAnalyticsBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json"
*** Fetching Localize-Swift
*** Downloading binary-only framework FirebaseFirestoreBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseFirestoreBinary.json"
*** Downloading binary-only framework FirebaseAdMobBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAdMobBinary.json"
*** Downloading binary-only framework FirebaseAuthBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAuthBinary.json"
*** Downloading binary-only framework Crashlytics at "https://raw.githubusercontent.com/Building42/Specs/master/Carthage/Crashlytics.json"
*** Downloading binary-only framework FirebaseRemoteConfigBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseRemoteConfigBinary.json"
*** Downloading binary-only framework FirebaseStorageBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseStorageBinary.json"
*** Downloading binary-only framework FirebaseInvitesBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseInvitesBinary.json"
*** Checking out Localize-Swift at "2.0.0"
*** Downloading binary-only framework Crashlytics at "https://raw.githubusercontent.com/Building42/Specs/master/Carthage/Crashlytics.json"
*** Downloading binary-only framework Fabric at "https://raw.githubusercontent.com/Building42/Specs/master/Carthage/Fabric.json"
*** xcodebuild output can be found in /var/folders/xw/40bn71nx71591_rwtsp05k780000gn/T/carthage-xcodebuild.3BRGy2.log
*** Downloading binary-only framework FirebaseABTestingBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseABTestingBinary.json"
*** Downloading binary-only framework FirebaseAdMobBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAdMobBinary.json"
*** Downloading binary-only framework FirebaseAnalyticsBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json"
*** Downloading binary-only framework FirebaseAuthBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAuthBinary.json"
*** Downloading binary-only framework FirebaseDatabaseBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseDatabaseBinary.json"
*** Downloading binary-only framework FirebaseDynamicLinksBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseDynamicLinksBinary.json"
*** Downloading binary-only framework FirebaseFirestoreBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseFirestoreBinary.json"
*** Downloading binary-only framework FirebaseFunctionsBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseFunctionsBinary.json"
*** Downloading binary-only framework FirebaseInvitesBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseInvitesBinary.json"
*** Downloading binary-only framework FirebaseMessagingBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseMessagingBinary.json"
*** Downloading binary-only framework FirebasePerformanceBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebasePerformanceBinary.json"
*** Downloading binary-only framework FirebaseRemoteConfigBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseRemoteConfigBinary.json"
A shell task (/usr/bin/xcrun dwarfdump --uuid /Users/<...>/Carthage/Build/iOS/Protobuf.framework/Protobuf) failed with exit code 1:
error: unable to open '/Users/<...>/Carthage/Build/iOS/Protobuf.framework/Protobuf': No such file or directory

from firebase-ios-sdk.

olejnjak avatar olejnjak commented on August 27, 2024 1

I think this is just fine but can we expect Firestore support in near future?

from firebase-ios-sdk.

kasyanov-ms avatar kasyanov-ms commented on August 27, 2024 1

We need someone of the contributors to confirm it is safe to remove FirebaseCoreDiagnostics.framework

from firebase-ios-sdk.

paulb777 avatar paulb777 commented on August 27, 2024 1

@kasyanov-ms @prsolucoes I deployed Firebase 4.12.0 to Carthage and fixed the FirebaseCoreDiagnostics error in the process.

I'm not able to reproduce the "This app could not be installed at this time." issue. If that's still occurring for you, please create another issue with details on how to reproduce.

from firebase-ios-sdk.

tbaranes avatar tbaranes commented on August 27, 2024 1

Just wanted to say that I just migrated from solheim library to use firebase with Carthage to that new implementation and it's working perfectly! It's an awesome news 🎉

from firebase-ios-sdk.

morganchen12 avatar morganchen12 commented on August 27, 2024 1

@mortenbekditlevsen that's correct.

from firebase-ios-sdk.

paulb777 avatar paulb777 commented on August 27, 2024 1

@nidegen The Carthage zip files for multiple Firebase components include the Protobuf.framework. If you're using two or more of those components, Carthage will attempt to do multiple copies to ./Carthage/Build/iOS/Protobuf.framework.

@schlingding Does clearing the Carthage cache make a difference - rm -rf ~/Library/Caches/org.carthage.CarthageKit

from firebase-ios-sdk.

josemssilva avatar josemssilva commented on August 27, 2024 1

Anyone had troubles updating from 5.4 to 5.6? Missing FirebaseNanoPB and GoogleToolboxForMac, and I'm unable to build the project without those.

from firebase-ios-sdk.

okydk avatar okydk commented on August 27, 2024

Ok, fingers crossed for support in the future 🤞 and thanks for the clarification.

from firebase-ios-sdk.

mhuusko5 avatar mhuusko5 commented on August 27, 2024

@morganchen12 I'm very much interested in building frameworks on top of Firebase, and I think the more Firebase continues to grow as a defacto database and auth/etc. solution, the more people/companies are going to be wrapping it, at least for internal use (but probably convenience frameworks at some point too).
At the moment though I'm most interested in this Analytics topic. From what I can tell at first pass of the source (at least of FirebaseCore), Analytics being present is desired but not required. Is this actually/will this continue to be, the case?

from firebase-ios-sdk.

mhuusko5 avatar mhuusko5 commented on August 27, 2024

@salqadri fantastic, thanks for the breakdown, and I love the design strategy. 👍

from firebase-ios-sdk.

morganchen12 avatar morganchen12 commented on August 27, 2024

@mhuusko5 for the time being you can create frameworks wrapping Firebase for your own personal use by just embedding them in a target and using CocoaPods' inherit! :search_paths without any issues. Life becomes much harder once you try to distribute the framework afterwards.

from firebase-ios-sdk.

AndrewSB avatar AndrewSB commented on August 27, 2024

Distributing Analytics through Carthage shouldn't be too hard. For example, this is what mapbox does: https://www.mapbox.com/ios-sdk/

Relevant line in a consumer's cartfile would be binary "https://www.mapbox.com/ios-sdk/Mapbox-iOS-SDK.json" ~> 3.5, which just points to a JSON file (https://www.mapbox.com/ios-sdk/Mapbox-iOS-SDK.json ) with version numbers and a URL from where to download the .framework

I understand that it will take some time to work through the bureaucracy that comes with being at Google, so I understand that adding complete Carthage support will potentially be a long-term goal 😄
Take your time, thank you for going (almost completely) open source ❤️

from firebase-ios-sdk.

morganchen12 avatar morganchen12 commented on August 27, 2024

@AndrewSB for reference the issue here isn't Carthage, it's that we currently don't ship Analytics as a dynamic framework, which we must (should) before distributing it through Carthage.

from firebase-ios-sdk.

AndrewSB avatar AndrewSB commented on August 27, 2024

Ahh, I see. Still a static framework, I take back what I said then. So I guess we're waiting on that dynamic framework then

from firebase-ios-sdk.

paulb777 avatar paulb777 commented on August 27, 2024

Carthage has recently added some info to its README about integrating static frameworks that could be helpful - https://github.com/Carthage/Carthage#build-static-frameworks-to-speed-up-your-apps-launch-times

from firebase-ios-sdk.

Davtyanag avatar Davtyanag commented on August 27, 2024

+1

from firebase-ios-sdk.

localredhead avatar localredhead commented on August 27, 2024

+1 Analytics supports Carthage AFAIK https://github.com/segmentio/analytics-ios#carthage ?

from firebase-ios-sdk.

AndrewSB avatar AndrewSB commented on August 27, 2024

FWIW I gave this a shot last week, I couldn't believe Google would just let it sit for years and I wanted it for a project I was working on. WIP over at my fork.
I ran into a small snag: to vend firebase through Carthage, google-toolbox-for-mac also needs to support Carthage. I looked into setting that up too, but that project has some strange xcscheme settings I didn't feel like unmangling. WIP over at my fork of the toolbox.

@firebase-ops: I'd love some help upgrading google-toolbox-for-mac. Maybe you can ask some of the internal maintainers to work on this?
If anyone else would like to contribute, please don't hesitate to target my forks, I'd be happy to merge anything that gets the project going with Carthage

from firebase-ios-sdk.

paulb777 avatar paulb777 commented on August 27, 2024

@AndrewSB Thanks for digging in and glad to hear you're making progress, but I'm not sure it's currently possible with Carthage to support Firebase as the mix of source static frameworks currently required to work with the Analytics and InstanceID binary static framework dependencies.

I'm currently working on making a pure binary Firebase Carthage distribution derived from the Firebase zip distribution and planning to make it publicly available in the near future.

from firebase-ios-sdk.

AndrewSB avatar AndrewSB commented on August 27, 2024

@paulb777 thats great to hear, that does seem like the complete solution. Keep us updated on how that's going. Like I mentioned last year, it should be as simple as creating a JSON file like https://www.mapbox.com/ios-sdk/Mapbox-iOS-SDK.json once the releases are uploaded in a standard way

from firebase-ios-sdk.

schlingding avatar schlingding commented on August 27, 2024

from firebase-ios-sdk.

paulb777 avatar paulb777 commented on August 27, 2024

@olejnjak Firestore has a dependency on gRPC which has resources and I couldn't figure out how to get the Carthage installer to install resources for a binary component. Any ideas?

from firebase-ios-sdk.

karlpuusepp avatar karlpuusepp commented on August 27, 2024

We're seeing a linker warning when using Firebase with Carthage

ld: warning: Auto-Linking framework linker option at .../Carthage/Build/iOS/Firebase.framework/Firebase is not a dylib and not an archive

Any clue what's causing this? It still appears when Link frameworks automatically is disabled.

from firebase-ios-sdk.

olejnjak avatar olejnjak commented on August 27, 2024

@rerelease do you link empty Firebase.framework? You shouldn't https://github.com/firebase/firebase-ios-sdk/blob/master/Carthage.md#carthage-usage

Delete Firebase.framework from the Link Binary With Libraries Build Phase.

from firebase-ios-sdk.

Drusy avatar Drusy commented on August 27, 2024

Having the same problem @rerelease, having the import Firebase statement produces this warning.
Replacing with any other library works import FirebaseCore for example or import FirebaseAnalytics.

from firebase-ios-sdk.

paulocoutinhox avatar paulocoutinhox commented on August 27, 2024

How to add this repository to Carthage? Only need paste that lines "binary ..." to the Cartfile?

from firebase-ios-sdk.

floriangbh avatar floriangbh commented on August 27, 2024

How to add this repository to Carthage? Only need paste that lines "binary ..." to the Cartfile?

README : https://github.com/firebase/firebase-ios-sdk/blob/master/Carthage.md#carthage-usage

from firebase-ios-sdk.

paulocoutinhox avatar paulocoutinhox commented on August 27, 2024

I already read, but what mean "create a subset"? I paste it to Carfile and testing now. Thanks.

from firebase-ios-sdk.

paulb777 avatar paulb777 commented on August 27, 2024

@prsolucoes Does #1061 answer your question?

from firebase-ios-sdk.

paulocoutinhox avatar paulocoutinhox commented on August 27, 2024

Yes. In my opinion, i think that something more clear as "paste de following lines into your Cartfile" will be easier to carthage newbies like me auhahuahuahuahua. But i understand that is paste lines and im testing now.

from firebase-ios-sdk.

paulocoutinhox avatar paulocoutinhox commented on August 27, 2024

Hi,

After include this reps:

binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json"
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseMessagingBinary.json"

And carthage build, i have include the frameworks, but got error:

Invalid architecture: Could not read architectures from /Users/paulo/Developer/workspaces/xcode/xxx/Carthage/Build/iOS/FirebaseCoreDiagnostics.framework
Command /bin/sh failed with exit code 1

from firebase-ios-sdk.

kasyanov-ms avatar kasyanov-ms commented on August 27, 2024

I've just deleted that framework, and all works well

from firebase-ios-sdk.

paulocoutinhox avatar paulocoutinhox commented on August 27, 2024

I can ignore it? Remove it from my build and copy-framework?

from firebase-ios-sdk.

paulocoutinhox avatar paulocoutinhox commented on August 27, 2024

Today im using all of this:

image

To use Analytics and Messaging parts.

from firebase-ios-sdk.

paulocoutinhox avatar paulocoutinhox commented on August 27, 2024

I have removed it too, now its compile, but when i go install i receive this message on simulator and on device:

image

from firebase-ios-sdk.

paulocoutinhox avatar paulocoutinhox commented on August 27, 2024

Hi @paulb777, Thanks for the update. But FirebaseCoreDiagnostics is needly or not?

from firebase-ios-sdk.

paulocoutinhox avatar paulocoutinhox commented on August 27, 2024

Now with the new version everything is working and compiling, but when i run i get the error:

image

from firebase-ios-sdk.

olejnjak avatar olejnjak commented on August 27, 2024

@prsolucoes i think that this might be some problem with your project configuration...

from firebase-ios-sdk.

paulocoutinhox avatar paulocoutinhox commented on August 27, 2024

@olejnjak @paulb777 No guys, dont be a problem here. I create an empty and simple new project, add carthage file, download the frameworks, link into the project and the same problem happen. If i remove all from firebase, the project back to work:

The repository that i create only to test firebase and carthage:
https://github.com/prsolucoes/firebase

from firebase-ios-sdk.

paulocoutinhox avatar paulocoutinhox commented on August 27, 2024

@olejnjak @paulb777 Hi. I made more command line tool in my sample project (https://github.com/prsolucoes/firebase). After run on simulator (make run-simulator) i got error:

ios-sim launch ./build/Build/Products/Debug-iphonesimulator/FirebaseTest.app --devicetypeid=iPhone-7
An error was encountered processing the command (domain=IXUserPresentableErrorDomain, code=1):
This app could not be installed at this time.
Underlying error (domain=MIInstallerErrorDomain, code=57):
	Found bundle at /Users/paulo/Library/Developer/CoreSimulator/Devices/CE49D8E9-CC06-4398-9ED1-D11DB21B64C9/data/Library/Caches/com.apple.mobile.installd.staging/temp.NvZWu9/extracted/FirebaseTest.app/Frameworks/FirebaseCore.framework with the same identifier (com.firebase.Firebase) as bundle at /Users/paulo/Library/Developer/CoreSimulator/Devices/CE49D8E9-CC06-4398-9ED1-D11DB21B64C9/data/Library/Caches/com.apple.mobile.installd.staging/temp.NvZWu9/extracted/FirebaseTest.app/Frameworks/Protobuf.framework

I think that it can be a clue.

All frameworks has the same bundle-id:

paulo@Paulos-MacBook-Pro:~/Developer/workspaces/xcode/FirebaseTest (master) $ grep -R "com.firebase.Firebase" .
./Carthage/Build/iOS/Protobuf.framework/Info.plist:	<string>com.firebase.Firebase</string>
./Carthage/Build/iOS/Firebase.framework/Info.plist:	<string>com.firebase.Firebase</string>
./Carthage/Build/iOS/FirebaseCore.framework/Info.plist:	<string>com.firebase.Firebase</string>
./Carthage/Build/iOS/FirebaseAnalytics.framework/Info.plist:	<string>com.firebase.Firebase</string>
./Carthage/Build/iOS/FirebaseMessaging.framework/Info.plist:	<string>com.firebase.Firebase</string>
./Carthage/Build/iOS/GoogleToolboxForMac.framework/Info.plist:	<string>com.firebase.Firebase</string>
./Carthage/Build/iOS/nanopb.framework/Info.plist:	<string>com.firebase.Firebase</string>
./Carthage/Build/iOS/FirebaseNanoPB.framework/Info.plist:	<string>com.firebase.Firebase</string>
./Carthage/Build/iOS/FirebaseInstanceID.framework/Info.plist:	<string>com.firebase.Firebase</string>
./Carthage/Build/iOS/FirebaseCoreDiagnostics.framework/Info.plist:	<string>com.firebase.Firebase</string>

I have download the ZIP inside the JSON and all frameworks come with the same bundle-id.

Can you check?

from firebase-ios-sdk.

paulocoutinhox avatar paulocoutinhox commented on August 27, 2024

Hi @olejnjak and @paulb777,

I solved it changing manually all info.plist as i sad and it is working now:

./Carthage/Build/iOS/Protobuf.framework/Info.plist:	<string>com.firebase.Firebase.Protobuf</string>
./Carthage/Build/iOS/Firebase.framework/Info.plist:	<string>com.firebase.Firebase</string>
./Carthage/Build/iOS/FirebaseCore.framework/Info.plist:	<string>com.firebase.Firebase.Core</string>
./Carthage/Build/iOS/FirebaseAnalytics.framework/Info.plist:	<string>com.firebase.Firebase.Analytics</string>
./Carthage/Build/iOS/FirebaseMessaging.framework/Info.plist:	<string>com.firebase.Firebase.Messaging</string>
./Carthage/Build/iOS/GoogleToolboxForMac.framework/Info.plist:	<string>com.firebase.Firebase.GTFM</string>
./Carthage/Build/iOS/nanopb.framework/Info.plist:	<string>com.firebase.Firebase.nanopb</string>
./Carthage/Build/iOS/FirebaseNanoPB.framework/Info.plist:	<string>com.firebase.FirebaseNanoPB</string>
./Carthage/Build/iOS/FirebaseInstanceID.framework/Info.plist:	<string>com.firebase.Firebase.InstanceID</string>
./Carthage/Build/iOS/FirebaseCoreDiagnostics.framework/Info.plist:	<string>com.firebase.Firebase.CoreDiagnostics</string>

Now you only need correct all the frameworks to have individual bundle-id. What i do is change to "com.firebase.Firebase + . + [Framework Name]"

from firebase-ios-sdk.

paulocoutinhox avatar paulocoutinhox commented on August 27, 2024

Hi,

So, i dont need add anyone too copy-framework?

image

Thanks.

from firebase-ios-sdk.

paulb777 avatar paulb777 commented on August 27, 2024

Right - the Firebase frameworks are all static and linked at build time and don't need to be copied for runtime linking.

from firebase-ios-sdk.

mortenbekditlevsen avatar mortenbekditlevsen commented on August 27, 2024

Hi there,
I have a question about the Carthage support help page.

Under Static Frameworks it is stated that:
"Note that the Firebase frameworks in the distribution include static libraries. While it is fine to link these into apps, it will generally not work to depend on them from wrapper dynamic frameworks."

Could this comment be elaborated?
Is it a generic logical issue with static libs inside dynamic frameworks?
Is it an issue with how Carthage does this?
Or is it an issue with the libraries themselves?

We are already manually building a dynamic wrapper framework using CocoaPods - and use this dynamic framework in our own Carthage setup.

Initial tests show that using this Carthage repo instead (still linking into a dynamic framework that contains all of our networking/sync logic) appears to work just fine, so it would be great to know what the issue might be.

Carthage support is a great update, thanks! Looking forward to the tvOS and macOS builds to become available through this channel as well. ;-)

from firebase-ios-sdk.

paulb777 avatar paulb777 commented on August 27, 2024

@mortenbekditlevsen Thanks for the feedback!

Yes - it's a general issue about how static and dynamic linking works. Static linking happens at build time. Dynamic linking happens at run time. if a dynamic library depends upon a static library, that static library will be loaded at runtime, which it isn't necessarily built to do. When a second dynamic library is linked that depends on the same static library, two copies of the static library will get linked into the app.

While app's like this may pass simple tests, they will have subtle failures based on indeterministic behavior of data inside the static library - like values of static/global variables or calls to isKindOfClass:.

Xcode will log in the console One of the two will be used. Which one is undefined.

While it may be possible to make workarounds viable for particular use cases, none of Xcode, CocoaPods, or Carthage have a general purpose solution for depending on static libraries from dynamic frameworks.

from firebase-ios-sdk.

mortenbekditlevsen avatar mortenbekditlevsen commented on August 27, 2024

Thanks, @paulb777 ,

So am I correct in assuming, that if only one dynamic library has the static libraries linked, then you will only ever have one copy of the static libraries loaded, and you will get no inderterminism in that regard?

from firebase-ios-sdk.

m-toyoda avatar m-toyoda commented on August 27, 2024

+1

from firebase-ios-sdk.

erikkerber avatar erikkerber commented on August 27, 2024

@TKBurner Does you mean that we can't expect Crashlytics.framework and Fabric.framework to support Carthage, but FirebaseXXXX.framework and all Firebase originals will have Carthage support?

from firebase-ios-sdk.

miguelrc86 avatar miguelrc86 commented on August 27, 2024

Hi everyone!

I've being trying to make FirebaseDatabase work with no success... I followed the installation guide throughfully, adding ObjC to other linker flags, removing the Firebase.framework from the linked frameworks, including GoogleService-Info.plist in my build target and my subset for the Cartfile is as follows:

binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json"
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseDatabaseBinary.json"

I'm receiving a lot of Apple Mach-O Linker errors... 😕 This is a new project using Xcode 9.3, iOS 11 support, Swift 4.1 any clues? Thanks in advance!

screen shot 2018-05-09 at 22 56 36

from firebase-ios-sdk.

miguelrc86 avatar miguelrc86 commented on August 27, 2024

Oh! Thank you so much @paulb777 for your ultra quick and clear response, will do that! 🙂

from firebase-ios-sdk.

miguelrc86 avatar miguelrc86 commented on August 27, 2024

Thanks @paulb777 @pisarm added those libraries, also had to include StoreKit and voila! Firebase is up and running now 👊🏻

from firebase-ios-sdk.

TKBurner avatar TKBurner commented on August 27, 2024

You are all in great hands with @paulb777, we had a chance to meet and are trying to see what we can as far as Crashlytics.

from firebase-ios-sdk.

jemartti avatar jemartti commented on August 27, 2024

I've got Carthage working and running—however, I'm seeing the same linker warning as @rerelease and @Drusy:

ld: warning: Auto-Linking framework linker option at /Users/jacob/workspace/fundu-ios/Carthage/Build/iOS/Firebase.framework/Firebase is not a dylib and not an archive

There was a mention of removing any import Firebase statements; however, that seems to contradict the required step of configuring a FirebaseApp shared instance (e.g. FirebaseApp.configure() in application:didFinishLaunchingWithOptions:).

Has anyone managed to get rid of this warning?

from firebase-ios-sdk.

paulb777 avatar paulb777 commented on August 27, 2024

@nidegen I've seen this a few times, but not able to reproduce reliably. I suspect a Carthage race condition since Protobuf.framework is a dependency of multiple components.

Rerunning the carthage update command is a workaround.

from firebase-ios-sdk.

nidegen avatar nidegen commented on August 27, 2024

@paulb777 yes I have also just reupdated carthage a couple of times, but it is really a mess for our CI pipelines😬😬

are the binaries not just download only? how comes carthage has to check out dependencies there?

from firebase-ios-sdk.

paulb777 avatar paulb777 commented on August 27, 2024

@nidegen Since Carthage doesn't do dependencies for binaries, the multiple Firebase components that depend on Protobuf.framework need to include it.

from firebase-ios-sdk.

schlingding avatar schlingding commented on August 27, 2024

Some frameworks are fetching version 5.0.1 and some version 5.1.0.

binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json"
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseMessagingBinary.json"
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebasePerformanceBinary.json"
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseRemoteConfigBinary.json"
*** Downloading binary-only framework FirebaseAnalyticsBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json"
*** Downloading FirebaseAnalyticsBinary.framework binary at "5.0.1"
*** Downloading binary-only framework FirebaseMessagingBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseMessagingBinary.json"
*** Downloading FirebaseMessagingBinary.framework binary at "5.1.0"
*** Downloading binary-only framework FirebasePerformanceBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebasePerformanceBinary.json"
*** Downloading FirebasePerformanceBinary.framework binary at "5.0.1"
*** Downloading binary-only framework FirebaseRemoteConfigBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseRemoteConfigBinary.json"
*** Downloading FirebaseRemoteConfigBinary.framework binary at "5.0.1"
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebasePerformanceBinary.json" == 5.1.0

produces

No available version for binary "https://dl.google.com/dl/firebase/ios/carthage/FirebasePerformanceBinary.json" satisfies the requirement: == 5.1.0

Anyone else seeing this issue?

from firebase-ios-sdk.

nidegen avatar nidegen commented on August 27, 2024

@paulb777 i dont get it. if binaries have no dependencies (I already understood it that way) why is there an issue with a dependency (protobuf). To me it seems that carthage does check for dependencies after all, or performs some kind of processing of the binaries. i dont see why it should / a binary package is performing anything

from firebase-ios-sdk.

schlingding avatar schlingding commented on August 27, 2024

@paulb777 I have tried clearing the cache and removing the Carthage folder as well. Same results. I’m on the latest version of Carthage.

Are you getting 5.1.0 when running Carthage? If so I’ll debug further.

from firebase-ios-sdk.

schlingding avatar schlingding commented on August 27, 2024

@paulb777 Ran Carthage today and now it's pulling all 5.1.0 versions. Leaving the previous comment intact in case someone else runs into the issue.

from firebase-ios-sdk.

walsht avatar walsht commented on August 27, 2024

Seeing this on "5.2.0"

Failed to write to /.../Carthage/Build/iOS/Protobuf.framework: Error Domain=NSCocoaErrorDomain Code=513 "“Protobuf.framework” couldn’t be removed because you don’t have permission to access it." UserInfo={NSFilePath=/.../Carthage/Build/iOS/Protobuf.framework, NSUserStringVariant=(
    Remove
), NSUnderlyingError=0x7faa64d60730 {Error Domain=NSPOSIXErrorDomain Code=66 "Directory not empty"}}

Only way to resolve is
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebasePerformanceBinary.json" == 5.1.0

from firebase-ios-sdk.

yoiang avatar yoiang commented on August 27, 2024

I also had to manually add SystemConfiguration.framework when I was Carthage-ing Firebase Analytics, otherwise it was complaining about missing a number of SC symbols

from firebase-ios-sdk.

tbaranes avatar tbaranes commented on August 27, 2024

Hey guys! Can you add macOS support? The binary binary ".../firebase/ios/carthage/FirebaseAnalyticsBinary.json" is working perfectly for iOS, but it would even greater to have a binary link for macOS as well.

from firebase-ios-sdk.

paulb777 avatar paulb777 commented on August 27, 2024

See #1701 for discussion of carthage update from a release before Firebase 5.5.0 to one after it.

from firebase-ios-sdk.

schlingding avatar schlingding commented on August 27, 2024

Firebase is releasing weeks faster than the updates to the binary files for carthage.

At the time of this post, I'm seeing the latest carthage binary references at 5.8.0 where 5.8.1, 5.9.0, and 5.10.0 have since been released.

Can updating these binary references be part of the Firebase iOS release process or are there further issues?

Please update soon so the community can take advantage of the bug fixes and enhancements.

Thank you!

from firebase-ios-sdk.

paulb777 avatar paulb777 commented on August 27, 2024

Those of you interested in Firebase via Carthage may want to check out Firebase via Rome. Rome provides many of the Carthage features as well as a few additional advantages. Check out the details at https://github.com/firebase/firebase-ios-sdk/blob/master/Rome.md.

We'd love to hear any feedback in another issue.

from firebase-ios-sdk.

paulb777 avatar paulb777 commented on August 27, 2024

Closing since Carthage is now available experimentally. We'll track making it officially supported in #1862.

from firebase-ios-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.