Merge pull request #249 from LLK/document-analytics

Improve setup documentation and ergonomics
This commit is contained in:
chrisgarrity 2020-04-01 09:16:31 -04:00 committed by GitHub
commit a50e7943fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 94 additions and 84 deletions

2
.gitignore vendored
View file

@ -29,3 +29,5 @@
/android/ScratchJr/.idea/caches
/android/ScratchJr/.idea/modules.xml
ios/Pods
google-services.json
GoogleService-Info.plist

View file

@ -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
@ -33,7 +33,7 @@ This repository has the following directory structure:
* <tt>ScratchJr/</tt> - Android Studio Project for ScratchJr Android Application
* <tt>bin/</tt> - Build scripts and other executables
* <tt>doc/</tt> - Developer Documentation
* <tt>ios/</tt> - XCode project for iOS build. (Make sure to open <tt>ScratchJr.xcworkspace</tt> not <tt>ScratchJr.xcodeproj</tt>)
* <tt>ios/</tt> - Xcode project for iOS build. (Make sure to open <tt>ScratchJr.xcworkspace</tt> not <tt>ScratchJr.xcodeproj</tt>)
## Building ScratchJr
@ -50,13 +50,21 @@ Regardless of whether you are doing iOS development or Android development, you
5. Run <tt>brew install imagemagick</tt> to install commandline `magick`
6. In the top level of the scratchjr repo directory, install npm dependencies for bundling the JavaScript: <tt>npm install</tt>
### 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. 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 <tt>brew install cocoapods</tt> to install CocoaPods
3. Run <tt>pod install</tt> to install the Firebase Analytics dependencies
4. Open XCode
5. In XCode, open <tt>ios/ScratchJr.xcworkspace</tt>
4. Open Xcode
5. In Xcode, open <tt>ios/ScratchJr.xcworkspace</tt>
### Android

View file

View file

@ -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"
}

View file

@ -1,38 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CLIENT_ID</key>
<string></string>
<key>REVERSED_CLIENT_ID</key>
<string></string>
<key>ANDROID_CLIENT_ID</key>
<string></string>
<key>API_KEY</key>
<string></string>
<key>GCM_SENDER_ID</key>
<string></string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string></string>
<key>PROJECT_ID</key>
<string></string>
<key>STORAGE_BUCKET</key>
<string></string>
<key>IS_ADS_ENABLED</key>
<false/>
<key>IS_ANALYTICS_ENABLED</key>
<true/>
<key>IS_APPINVITE_ENABLED</key>
<true/>
<key>IS_GCM_ENABLED</key>
<true/>
<key>IS_SIGNIN_ENABLED</key>
<true/>
<key>GOOGLE_APP_ID</key>
<string></string>
<key>DATABASE_URL</key>
<string></string>
</dict>
</plist>

View file

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1130"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D92D0F861C33381B00C573AD"
BuildableName = "ScratchJr Free.app"
BlueprintName = "ScratchJr Free"
ReferencedContainer = "container:ScratchJr.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D92D0F861C33381B00C573AD"
BuildableName = "ScratchJr Free.app"
BlueprintName = "ScratchJr Free"
ReferencedContainer = "container:ScratchJr.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D92D0F861C33381B00C573AD"
BuildableName = "ScratchJr Free.app"
BlueprintName = "ScratchJr Free"
ReferencedContainer = "container:ScratchJr.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>