@@ -26,41 +26,110 @@ Introduction
26
26
27
27
- [ Read more about Firebase Auth] ( https://developers.google.com/firebase/ )
28
28
29
- Getting Started
30
- ---------------
29
+ Building and Running the testapp
30
+ --------------------------------
31
31
32
32
### 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.
36
62
- Add the following frameworks from the Firebase C++ SDK to the project:
37
63
- frameworks/ios/universal/firebase.framework
38
64
- 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
41
79
via the console. In Xcode, select
42
80
"View --> Debug Area --> Activate Console" from the menu.
81
+ - See [below](#using_the_test_app) for usage instructions.
43
82
44
83
### 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).
48
111
- Configure the location of the Firebase C++ SDK by setting the
49
112
firebase\_cpp\_sdk.dir Gradle property to the SDK install directory.
50
113
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.
56
121
- 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
59
127
in the logcat output of Android studio or by running
60
128
"adb logcat *:W android_main firebase" from the command line.
61
129
62
130
Known issues
63
131
------------
132
+
64
133
- User::UpdateUserProfile() currently fails to set the photo URL on both
65
134
Android and iOS, and also fails to set the display name on Android.
66
135
- The iOS testapp generates benign asserts of the form:
0 commit comments