From 7f1f9669844ee012639e4ca90caa30f5efd81bad Mon Sep 17 00:00:00 2001 From: Chris Garrity Date: Tue, 24 Mar 2020 17:31:16 -0400 Subject: [PATCH 1/2] Improve Analytics setup documentation Added instructions to the README for how to get the google services configuration files for analytics. Removed (and ignored in future) the empty config files. Note: empty folders are ignored in git, so added an empty file `.exist` to the android folder so that it will be there as a place to hold the actual google services file. Finally added the xCode scheme for the app that you need for newer versions of xCode. --- .gitignore | 2 + README.md | 12 ++- editions/free/android-resources/.exist | 0 .../android-resources/google-services.json | 40 ---------- .../ios-resources/GoogleService-Info.plist | 38 --------- .../xcschemes/ScratchJr Free.xcscheme | 78 +++++++++++++++++++ 6 files changed, 90 insertions(+), 80 deletions(-) create mode 100644 editions/free/android-resources/.exist delete mode 100644 editions/free/android-resources/google-services.json delete mode 100644 editions/free/ios-resources/GoogleService-Info.plist create mode 100644 ios/ScratchJr.xcodeproj/xcshareddata/xcschemes/ScratchJr Free.xcscheme diff --git a/.gitignore b/.gitignore index 7b40807..49cfcb5 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,5 @@ /android/ScratchJr/.idea/caches /android/ScratchJr/.idea/modules.xml ios/Pods +google-services.json +GoogleService-Info.plist diff --git a/README.md b/README.md index fbe8a2e..a11b4b3 100644 --- a/README.md +++ b/README.md @@ -3,12 +3,12 @@ This is the official git repository hosting the source code for the [ScratchJr](http://scratchjr.org/) project. ScratchJr can be built both for iOS and Android. -A pure-web version or Chrome-app version is planned to follow at some point in the future. +A pure-web version is planned to follow at some point in the future. Platform | Status -------- | ------------- iOS | Released in App Store -Android | Released in Google Play and Amazon store +Android | Released in Google Play ## Release Schedule @@ -50,6 +50,14 @@ Regardless of whether you are doing iOS development or Android development, you 5. Run brew install imagemagick to install commandline `magick` 6. In the top level of the scratchjr repo directory, install npm dependencies for bundling the JavaScript: npm install +### Analytics +ScratchJr uses the Firebase SDK to record analytics for the app. Scratch Team developers should look for +the configuration files in the Scratch Devs Vault. If you're not on the Scratch Team, then you'll need to +set up your own [app analytics](https://firebase.google.com/products/analytics) with Google Firebase. It's free. + +1. Place the `google-services.json` file in `editions/free/android-resources` +2. Place the `GoogleService-Info.plist` file in `editions/free/ios-resources` + ### iOS 1. To build the iOS version, you need to have a Mac with XCode diff --git a/editions/free/android-resources/.exist b/editions/free/android-resources/.exist new file mode 100644 index 0000000..e69de29 diff --git a/editions/free/android-resources/google-services.json b/editions/free/android-resources/google-services.json deleted file mode 100644 index af0b7bf..0000000 --- a/editions/free/android-resources/google-services.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "project_info": { - "project_number": "", - "firebase_url": "", - "project_id": "", - "storage_bucket": "" - }, - "client": [ - { - "client_info": { - "mobilesdk_app_id": "", - "android_client_info": { - "package_name": "" - } - }, - "oauth_client": [ - { - "client_id": "", - "client_type": 3 - } - ], - "api_key": [ - { - "current_key": "" - } - ], - "services": { - "appinvite_service": { - "other_platform_oauth_client": [ - { - "client_id": "", - "client_type": 3 - } - ] - } - } - } - ], - "configuration_version": "1" -} diff --git a/editions/free/ios-resources/GoogleService-Info.plist b/editions/free/ios-resources/GoogleService-Info.plist deleted file mode 100644 index a074554..0000000 --- a/editions/free/ios-resources/GoogleService-Info.plist +++ /dev/null @@ -1,38 +0,0 @@ - - - - - CLIENT_ID - - REVERSED_CLIENT_ID - - ANDROID_CLIENT_ID - - API_KEY - - GCM_SENDER_ID - - PLIST_VERSION - 1 - BUNDLE_ID - - PROJECT_ID - - STORAGE_BUCKET - - IS_ADS_ENABLED - - IS_ANALYTICS_ENABLED - - IS_APPINVITE_ENABLED - - IS_GCM_ENABLED - - IS_SIGNIN_ENABLED - - GOOGLE_APP_ID - - DATABASE_URL - - - diff --git a/ios/ScratchJr.xcodeproj/xcshareddata/xcschemes/ScratchJr Free.xcscheme b/ios/ScratchJr.xcodeproj/xcshareddata/xcschemes/ScratchJr Free.xcscheme new file mode 100644 index 0000000..1af1d0d --- /dev/null +++ b/ios/ScratchJr.xcodeproj/xcshareddata/xcschemes/ScratchJr Free.xcscheme @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 20e0303b6886536e0125a150a8ae32b809956cfc Mon Sep 17 00:00:00 2001 From: Chris Garrity Date: Mon, 30 Mar 2020 11:27:15 -0400 Subject: [PATCH 2/2] Address comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use correct (and consisten) capitalization for ‘Xcode’. Clarify that Firebase generates config files. --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a11b4b3..1e530b8 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ This repository has the following directory structure: * ScratchJr/ - Android Studio Project for ScratchJr Android Application * bin/ - Build scripts and other executables * doc/ - Developer Documentation -* ios/ - XCode project for iOS build. (Make sure to open ScratchJr.xcworkspace not ScratchJr.xcodeproj) +* ios/ - Xcode project for iOS build. (Make sure to open ScratchJr.xcworkspace not ScratchJr.xcodeproj) ## Building ScratchJr @@ -53,18 +53,18 @@ Regardless of whether you are doing iOS development or Android development, you ### Analytics ScratchJr uses the Firebase SDK to record analytics for the app. Scratch Team developers should look for the configuration files in the Scratch Devs Vault. If you're not on the Scratch Team, then you'll need to -set up your own [app analytics](https://firebase.google.com/products/analytics) with Google Firebase. It's free. +set up your own [app analytics](https://firebase.google.com/products/analytics) with Google Firebase. It's free. Firebase will generate the configuration files for you to download. 1. Place the `google-services.json` file in `editions/free/android-resources` 2. Place the `GoogleService-Info.plist` file in `editions/free/ios-resources` ### iOS -1. To build the iOS version, you need to have a Mac with XCode +1. To build the iOS version, you need to have a Mac with Xcode 2. Run brew install cocoapods to install CocoaPods 3. Run pod install to install the Firebase Analytics dependencies -4. Open XCode -5. In XCode, open ios/ScratchJr.xcworkspace +4. Open Xcode +5. In Xcode, open ios/ScratchJr.xcworkspace ### Android