|
| 1 | +# Firebase Carthage |
| 2 | + |
| 3 | +## Context |
| 4 | + |
| 5 | +This page introduces and provides instructions for an **experimental** Firebase |
| 6 | +[Carthage](https://github.com/Carthage/Carthage) implementation. Based on |
| 7 | +feedback and usage, the Firebase team may decide to make the Carthage |
| 8 | +distribution official. |
| 9 | + |
| 10 | +FirebaseFirestore and FirebaseInvites are not yet supported from Carthage. |
| 11 | +Please [let us know](https://github.com/firebase/firebase-ios-sdk/issues) if you |
| 12 | +have suggestions about how best to distribute Carthage binaries that include |
| 13 | +resource bundles. |
| 14 | + |
| 15 | +## Carthage Installation |
| 16 | + |
| 17 | +[Homebrew](http://brew.sh/) is one way to install Carthage. |
| 18 | + |
| 19 | +```bash |
| 20 | +$ brew update |
| 21 | +$ brew install carthage |
| 22 | +``` |
| 23 | + |
| 24 | +See the |
| 25 | +[Carthage page](https://github.com/Carthage/Carthage#installing-carthage) for |
| 26 | +more details and additional installation methods. |
| 27 | + |
| 28 | +## Carthage Usage |
| 29 | + |
| 30 | +- Create a Cartfile with a **subset** of the following components. Note that |
| 31 | + **FirebaseAnalytics** must always be included. |
| 32 | +``` |
| 33 | +binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseABTestingBinary.json" |
| 34 | +binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAdMobBinary.json" |
| 35 | +binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json" |
| 36 | +binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAuthBinary.json" |
| 37 | +binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseCrashBinary.json" |
| 38 | +binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseDatabaseBinary.json" |
| 39 | +binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseDynamicLinksBinary.json" |
| 40 | +binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseMessagingBinary.json" |
| 41 | +binary "https://dl.google.com/dl/firebase/ios/carthage/FirebasePerformanceBinary.json" |
| 42 | +binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseRemoteConfigBinary.json" |
| 43 | +binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseStorageBinary.json" |
| 44 | +``` |
| 45 | +- Run `carthage update` |
| 46 | +- Use Finder to open `Carthage/Build/iOS`. |
| 47 | +- Copy the contents into the top level of your Xcode project and make sure |
| 48 | + they're added to the right build target(s). |
| 49 | +- Add the -ObjC flag to "Other Linker Flags". |
| 50 | +- Make sure that the build target(s) includes your project's `GoogleService-Info.plist`. |
| 51 | + |
| 52 | +## Versioning |
| 53 | + |
| 54 | +Unlike the CocoaPods distribution, the Carthage distribution is like the |
| 55 | +Firebase zip release in that all the Firebase components share the same version. |
| 56 | +Mixing and matching components with different versions may cause linker errors. |
| 57 | + |
| 58 | +## Static Frameworks |
| 59 | + |
| 60 | +Note that the Firebase frameworks in the distribution include static libraries. |
| 61 | +While it is fine to link these into apps, it will generally not work to depend |
| 62 | +on them from wrapper dynamic frameworks. |
| 63 | + |
| 64 | +## Acknowledgements |
| 65 | + |
| 66 | +Thanks to the Firebase community for encouraging this implementation including |
| 67 | +those who have made this the most updated |
| 68 | +[firebase-ios-sdk](https://github.com/firebase/firebase-ios-sdk) |
| 69 | +[issue](https://github.com/firebase/firebase-ios-sdk/issues/9). |
| 70 | + |
| 71 | +Thanks also to those who have already done Firebase Carthage implementations, |
| 72 | +such as https://github.com/soheilbm/Firebase. |
0 commit comments