Skip to content

Commit 382338f

Browse files
author
Stewart Miles
committed
Integrate Latest @ 117946170
Changes to analytics/testapp ... - Add more detail to the readme.md instructions. Changes to auth/testapp ... - Add more detail to the readme.md instructions. - Link in the correct Firebase jars. Changes to invites/testapp ... - Add more detail to the readme.md instructions. CL: 117946170
1 parent 2f377fa commit 382338f

File tree

3 files changed

+245
-69
lines changed

3 files changed

+245
-69
lines changed

analytics/testapp/readme.md

Lines changed: 78 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,39 +10,100 @@ Introduction
1010

1111
- [Read more about Firebase Analytics](https://developers.google.com/firebase/)
1212

13-
Getting Started
14-
---------------
13+
Building and Running the testapp
14+
--------------------------------
1515

1616
### iOS
17-
- [Add Firebase to your iOS Project](https://developers.google.com/firebase/docs/ios/setup).
18-
You can use "com.google.ios.analytics.testapp" as the App ID while
19-
you're testing.
17+
- Link your iOS app to the Firebase libraries.
18+
- Get access to the Firebase SDK git repo via
19+
[git cookie](https://cpdc-eap.googlesource.com/new-password).
20+
- Get CocoaPods version 1 or later by running,
21+
```
22+
$ sudo gem install CocoaPods --pre
23+
```
24+
- From the testapp directory, install the CocoaPods listed in the Podfile
25+
by running,
26+
```
27+
$ pod install
28+
```
29+
- Open the generated Xcode workspace (which now has the CocoaPods),
30+
```
31+
$ open testapp.xcworkspace
32+
```
33+
- For further details please refer to the
34+
[general instructions for setting up an iOS app with Firebase](https://developers.google.com/firebase/docs/ios/setup).
35+
- Register your iOS app with Firebase.
36+
- Create a new app on [Firebase console](https://g.co/firebase), and attach
37+
your iOS app to it.
38+
- You can use "com.google.ios.analytics.testapp" as the iOS Bundle ID
39+
while you're testing. You can omit App Store ID while testing.
40+
- Add the GoogleService-Info.plist that you downloaded from Firebase
41+
console to the testapp root directory. This file identifies your iOS app
42+
to the Firebase backend.
2043
- Add the following frameworks from the Firebase C++ SDK to the project:
2144
- frameworks/ios/universal/firebase.framework
2245
- frameworks/ios/universal/firebase_analytics.framework
23-
- From XCode build & run the sample on an iOS device or emulator.
24-
- The application has no user interface, the output of the app can be viewed
46+
- You will need to either,
47+
1. Check "Copy items if needed" when adding the frameworks, or
48+
2. Add the framework path in "Framework Search Paths"
49+
- e.g. If you downloaded the Firebase C++ SDK to
50+
`/Users/me/firebase_cpp_sdk`,
51+
then you would add the path
52+
`/Users/me/firebase_cpp_sdk/frameworks/ios/universal`.
53+
- To add the path, in XCode, select your project in the project
54+
navigator, then select your target in the main window.
55+
Select the "Build Settings" tab, and click "All" to see all
56+
the build settings. Scroll down to "Search Paths", and add
57+
your path to "Framework Search Paths".
58+
- In XCode, build & run the sample on an iOS device or simulator.
59+
- The testapp has no user interface. The output of the app can be viewed
2560
via the console. In Xcode, select
2661
"View --> Debug Area --> Activate Console" from the menu.
2762
- After 5 hours, data should be visible in the Firebase Console under the
2863
"Analytics" tab accessible from
2964
[https://developers.google.com/firebase/]().
3065
3166
### Android
32-
- [Add Firebase to your Android Project](https://developers.google.com/firebase/docs/android/setup).
33-
You can use "com.google.android.analytics.testapp" as the App ID while
34-
you're testing.
67+
- Register your Android app with Firebase.
68+
- Create a new app on [Firebase console](https://g.co/firebase), and attach
69+
your Android app to it.
70+
- You can use "com.google.android.analytics.testapp" as the Package Name
71+
while you're testing.
72+
- To [generate a SHA1](https://developers.google.com/android/guides/client-auth)
73+
run this command on Mac and Linux,
74+
```
75+
keytool -exportcert -list -v -alias androiddebugkey -keystore ~/.android/debug.keystore
76+
```
77+
or this command on Windows,
78+
```
79+
keytool -exportcert -list -v -alias androiddebugkey -keystore %USERPROFILE%\.android\debug.keystore
80+
```
81+
- If keytool reports that you do not have a debug.keystore, you can
82+
[create one with](http://developer.android.com/tools/publishing/app-signing.html#signing-manually),
83+
```
84+
keytool -genkey -v -keystore ~/.android/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"
85+
```
86+
- Add the `google-services.json` file that you downloaded from Firebase
87+
console to the root directory of testapp. This file identifies your
88+
Android app to the Firebase backend.
89+
- For further details please refer to the
90+
[general instructions for setting up an Android app with Firebase](https://developers.google.com/firebase/docs/android/setup).
3591
- Configure the location of the Firebase C++ SDK by setting the
3692
firebase\_cpp\_sdk.dir Gradle property to the SDK install directory.
3793
For example, in the project directory:
38-
> echo "systemProp.firebase\_cpp\_sdk.dir=~/firebase\_cpp\_sdk" >> gradle.properties
39-
- Configure the location of the Android NDK by setting the ndk.dir Gradle
40-
property to the NDK install directory.
41-
For example, in the project directory:
42-
> echo "ndk.dir=~/ndk" >> local.properties
94+
```
95+
> echo "systemProp.firebase\_cpp\_sdk.dir=/User/$USER/firebase\_cpp\_sdk" >> gradle.properties
96+
```
97+
- Ensure the Android SDK and NDK locations are set in Android Studio.
98+
- From the Android Studio launch menu, go to
99+
Configure/Project Defaults/Project Structure and download the SDK and NDK if
100+
the locations are not yet set.
43101
- Open *build.gradle* in Android Studio.
44-
- Build & run the sample on an Android device or emulator.
45-
- The application has no user interface, the output of the app can be viewed
102+
- From the Android Studio launch menu, "Open an existing Android Studio
103+
project", and select `build.gradle`.
104+
- Install the SDK Platforms that Android Studio reports missing.
105+
- Build the testapp and run it on an Android device or emulator.
106+
- The testapp has no user interface. The output of the app can be viewed
46107
in the logcat output of Android studio or by running "adb logcat" from
47108
the command line.
48109
- After 5 hours, data should be visible in the Firebase Console under the

auth/testapp/readme.md

Lines changed: 86 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,41 +26,110 @@ Introduction
2626

2727
- [Read more about Firebase Auth](https://developers.google.com/firebase/)
2828

29-
Getting Started
30-
---------------
29+
Building and Running the testapp
30+
--------------------------------
3131

3232
### iOS
33-
- [Add Firebase to your iOS Project](https://developers.google.com/firebase/docs/ios/setup).
34-
You can use "com.google.ios.auth.testapp" as the App ID while
35-
you're testing.
33+
- Link your iOS app to the Firebase libraries.
34+
- Get access to the Firebase SDK git repo via
35+
[git cookie](https://cpdc-eap.googlesource.com/new-password).
36+
- Get CocoaPods version 1 or later by running,
37+
```
38+
$ sudo gem install CocoaPods --pre
39+
```
40+
- From the testapp directory, install the CocoaPods listed in the Podfile
41+
by running,
42+
```
43+
$ pod install
44+
```
45+
- Open the generated Xcode workspace (which now has the CocoaPods),
46+
```
47+
$ open testapp.xcworkspace
48+
```
49+
- For further details please refer to the
50+
[general instructions for setting up an iOS app with Firebase](https://developers.google.com/firebase/docs/ios/setup).
51+
- Register your iOS app with Firebase.
52+
- Create a new app on [Firebase console](https://g.co/firebase), and attach
53+
your iOS app to it.
54+
- You can use "com.google.ios.auth.testapp" as the iOS Bundle ID
55+
while you're testing. You can omit App Store ID while testing.
56+
- Add the GoogleService-Info.plist that you downloaded from Firebase
57+
console to the testapp root directory. This file identifies your iOS app
58+
to the Firebase backend.
59+
- In Firebase console, select "Auth" then enable "Email/Password" in addition
60+
to "Anonymous" (which should already be enabled). This will allow the
61+
testapp to use email accounts.
3662
- Add the following frameworks from the Firebase C++ SDK to the project:
3763
- frameworks/ios/universal/firebase.framework
3864
- frameworks/ios/universal/firebase_auth.framework
39-
- From XCode build & run the sample on an iOS device or emulator.
40-
- The application has no user interface, the output of the app can be viewed
65+
- You will need to either,
66+
1. Check "Copy items if needed" when adding the frameworks, or
67+
2. Add the framework path in "Framework Search Paths"
68+
- e.g. If you downloaded the Firebase C++ SDK to
69+
`/Users/me/firebase_cpp_sdk`,
70+
then you would add the path
71+
`/Users/me/firebase_cpp_sdk/frameworks/ios/universal`.
72+
- To add the path, in XCode, select your project in the project
73+
navigator, then select your target in the main window.
74+
Select the "Build Settings" tab, and click "All" to see all
75+
the build settings. Scroll down to "Search Paths", and add
76+
your path to "Framework Search Paths".
77+
- In XCode, build & run the sample on an iOS device or simulator.
78+
- The testapp has no user interface. The output of the app can be viewed
4179
via the console. In Xcode, select
4280
"View --> Debug Area --> Activate Console" from the menu.
81+
- See [below](#using_the_test_app) for usage instructions.
4382
4483
### Android
45-
- [Add Firebase to your Android Project](https://developers.google.com/firebase/docs/android/setup).
46-
You can use "com.google.android.auth.testapp" as the App ID while
47-
you're testing.
84+
- Register your Android app with Firebase.
85+
- Create a new app on [Firebase console](https://g.co/firebase), and attach
86+
your Android app to it.
87+
- You can use "com.google.android.auth.testapp" as the Package Name
88+
while you're testing.
89+
- To [generate a SHA1](https://developers.google.com/android/guides/client-auth)
90+
run this command on Mac and Linux,
91+
```
92+
keytool -exportcert -list -v -alias androiddebugkey -keystore ~/.android/debug.keystore
93+
```
94+
or this command on Windows,
95+
```
96+
keytool -exportcert -list -v -alias androiddebugkey -keystore %USERPROFILE%\.android\debug.keystore
97+
```
98+
- If keytool reports that you do not have a debug.keystore, you can
99+
[create one with](http://developer.android.com/tools/publishing/app-signing.html#signing-manually),
100+
```
101+
keytool -genkey -v -keystore ~/.android/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"
102+
```
103+
- Add the `google-services.json` file that you downloaded from Firebase
104+
console to the root directory of testapp. This file identifies your
105+
Android app to the Firebase backend.
106+
- In Firebase console, select "Auth" then enable "Email/Password" in addition
107+
to "Anonymous" (which should already be enabled). This will allow the
108+
testapp to use email accounts.
109+
- For further details please refer to the
110+
[general instructions for setting up an Android app with Firebase](https://developers.google.com/firebase/docs/android/setup).
48111
- Configure the location of the Firebase C++ SDK by setting the
49112
firebase\_cpp\_sdk.dir Gradle property to the SDK install directory.
50113
For example, in the project directory:
51-
> echo "systemProp.firebase\_cpp\_sdk.dir=~/firebase\_cpp\_sdk" >> gradle.properties
52-
- Configure the location of the Android NDK by setting the ndk.dir Gradle
53-
property to the NDK install directory.
54-
For example, in the project directory:
55-
> echo "ndk.dir=~/ndk" >> local.properties
114+
```
115+
> echo "systemProp.firebase\_cpp\_sdk.dir=/User/$USER/firebase\_cpp\_sdk" >> gradle.properties
116+
```
117+
- Ensure the Android SDK and NDK locations are set in Android Studio.
118+
- From the Android Studio launch menu, go to
119+
Configure/Project Defaults/Project Structure and download the SDK and NDK if
120+
the locations are not yet set.
56121
- Open *build.gradle* in Android Studio.
57-
- Build & run the sample on an Android device or emulator.
58-
- The application has no user interface, the output of the app can be viewed
122+
- From the Android Studio launch menu, "Open an existing Android Studio
123+
project", and select `build.gradle`.
124+
- Install the SDK Platforms that Android Studio reports missing.
125+
- Build the testapp and run it on an Android device or emulator.
126+
- The testapp has no user interface. The output of the app can be viewed
59127
in the logcat output of Android studio or by running
60128
"adb logcat *:W android_main firebase" from the command line.
61129
62130
Known issues
63131
------------
132+
64133
- User::UpdateUserProfile() currently fails to set the photo URL on both
65134
Android and iOS, and also fails to set the display name on Android.
66135
- The iOS testapp generates benign asserts of the form:

0 commit comments

Comments
 (0)