Skip to content

Add Rome instructions #2014

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions Carthage.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
## Context

This page introduces and provides instructions for an **experimental** Firebase
[Carthage](https://github.com/Carthage/Carthage) implementation. Based on
feedback and usage, the Firebase team may decide to make the Carthage
distribution official.
[Carthage](https://github.com/Carthage/Carthage) distribution. Based on
feedback and usage, the Firebase team may decide to [make the Carthage
distribution official](https://github.com/firebase/firebase-ios-sdk/issues/1862).

Please [let us know](https://github.com/firebase/firebase-ios-sdk/issues) if you
have suggestions about how best to distribute Carthage binaries that include
resource bundles.
have suggestions or questions.

## Carthage Installation

Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,14 @@ pod 'FirebaseMessaging', :path => '/path/to/firebase-ios-sdk'

### Carthage (iOS only)

An experimental Carthage distribution is now available. See
Instructions for the experimental Carthage distribution are at
[Carthage](Carthage.md).

### Rome

Instructions for installing binary frameworks via
[Rome](https://github.com/CocoaPods/Rome) are at [Rome](Rome.md).

## Development

Follow the subsequent instructions to develop, debug, unit test, run integration
Expand Down
90 changes: 90 additions & 0 deletions Rome.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Firebase Rome

## Context

This page introduces and provides instructions for using Firebase via a
[Rome](https://github.com/CocoaPods/Rome) distribution. Based on
feedback and usage, the Firebase team may decide to make the Rome
support official.

Please [let us know](https://github.com/firebase/firebase-ios-sdk/issues) if you
have suggestions or questions.

## Introduction

Unlike regular CocoaPods, Rome does not touch the Xcode project file. It
installs and builds all of the frameworks and leaves the project integration to
you.

As a result, with Rome, the installed frameworks are all binary whether the
CocoaPod itself was source or binary.

In comparison to Carthage, Rome supports subspecs. Therefore, you can install
exactly the right frameworks customized for your requirements.

## Rome Installation

```bash
$ gem install cocoapods-rome
```

## Firebase Installation

1. Copy the [template Podfile](Rome/Podfile) to your project directory
1. Delete any Firebase pods that you don't need
1. Run `pod install`
1. With the Finder `open Rome`
1. Make sure you have an Xcode project open in Xcode.
1. In Xcode, hit `⌘-1` to open the Project Navigator pane. It will open on
left side of the Xcode window if it wasn't already open.
1. Drag each framework from the Finder window into Project
Navigator pane. In the dialog box that appears, make sure the target you
want the framework to be added to has a checkmark next to it, and that
you've selected "Copy items if needed".
1. Find the dynamic frameworks: In a shell type:
`file Rome/*/* | grep universal | grep dynamic`
1. Drag each dynamic framework to the "Embed Frameworks" section on the
Xcode Build Target's "General" page.
1. If you're using FirebaseML, FirebaseInAppMessaging, FirebaseFirestore, or
FirebaseInvites, find
the resources to the project: `ls -ld Pods/*/Resources/*`. More details on
this below.
1. Drag all of those resources into the Project Navigator, just
like the frameworks, again making sure that the target you want to add these
resources to has a checkmark next to it, and that you've selected "Copy items
if needed".
1. Add the -ObjC flag to "Other Linker Settings":
a. In your project settings, open the Settings panel for your target
b. Go to the Build Settings tab and find the "Other Linker Flags" setting
in the Linking section.
c. Double-click the setting, click the '+' button, and add "-ObjC" (without
quotes)
1. Add Firebase.h and module support:
a. In your project settings, open the Settings panel for your target
b. Go to the Build Settings tab and find the "User Header Search Paths"
setting in the Search Paths section.
c. Double-click the setting, click the '+' button, and add
`Pods/Firebase/CoreOnly/Sources`
1. Make sure that the build target(s) includes your project's
`GoogleService-Info.plist`
([how to download config file](https://support.google.com/firebase/answer/7015592)).
1. You're done! Compile your target and start using Firebase.

## Firebase Resource Details
- If you're including a Firebase component that has resources, copy its bundles
into the Xcode project and make sure they're added to the
`Copy Bundle Resources` Build Phase :
- For Firestore:
- ./Rome/GRPCClient.framework/gRPCCertificates.bundle
- For InAppMessagingDisplay:
- ./Rome/FirebaseInAppMessagingDisplay.framework/InAppMessagingDisplayResources.bundle
- For Invites:
- ./Pods/FirebaseInvites/Resources/GINInviteResources.bundle
- ./Pods/FirebaseInvites/Resources/GPPACLPickerResources.bundle
- ./Pods/GoogleSignIn/Resources/GoogleSignIn.bundle
- For FirebaseMLVisionFaceModel:
- ./Pods/GoogleMobileVision/FaceDetector/Resources/GoogleMVFaceDetectorResources
- For FirebaseMLVisionTextModel:
- ./Pods/GoogleMobileVision/TextDetector/Resources/GoogleMVTextDetectorResources
- For the FirebaseML resources, a bundle needs to be created. TBD better
instructions here.