forked from invertase/react-native-firebase
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(app-distribution): Implement Firebase App Distribution module
- Loading branch information
Showing
37 changed files
with
1,386 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
--- | ||
title: App Distribution | ||
description: Installation and getting started with App Distribution. | ||
icon: /assets/docs/app-distribution/app-distribution.png | ||
next: /auth/usage | ||
previous: /app-check/usage | ||
--- | ||
|
||
# Installation | ||
|
||
This module requires that the `@react-native-firebase/app` module is already setup and installed. To install the "app" | ||
module, view the [Getting Started](/) documentation. | ||
|
||
```bash | ||
# Install & setup the app module | ||
yarn add @react-native-firebase/app | ||
|
||
# Install the app-check module | ||
yarn add @react-native-firebase/app-distribution | ||
|
||
# If you're developing your app using iOS, run this command | ||
cd ios/ && pod install | ||
``` | ||
|
||
# What does it do | ||
|
||
Firebase App Distribution gives a holistic view of your beta testing program across iOS and Android, providing you with valuable feedback before a new release is in production. You can send pre-release versions of your app using the console or your CI servers, and installing your app is easy for testers. | ||
|
||
Firebase App Distribution makes distributing your apps to trusted testers painless. By getting your apps onto testers' devices quickly, you can get feedback early and often. And if you use Crashlytics in your apps, you’ll automatically get stability metrics for all your builds, so you know when you’re ready to ship. | ||
|
||
<Youtube id="SiPOaV-5j9o" /> | ||
|
||
# Key capabilities | ||
|
||
- Cross-platform Manage both your iOS and Android pre-release distributions from the same place. | ||
- Fast distributions Get early releases into your testers' hands quickly, with fast onboarding, no SDK to install, and instant app delivery. | ||
- Fits into your workflow Distribute builds using the Firebase console, the Firebase Command Line Interface (CLI) tool, - or Gradle (Android). Automate distribution by integrating the CLI into CI jobs. | ||
- Tester management Manage your testing teams by organizing them into groups. Easily add new testers with email invitations that walk them through the onboarding process. See the status of each tester for specific versions of your app: view who has accepted a testing invitation and downloaded the app. | ||
- Works with Android App Bundles Distribute releases to testers for your Android App Bundle in Google Play. App - Distribution integrates with Google Play's internal app sharing service to streamline your app testing and launching processes. | ||
- Works with Crashlytics When combined with Crashlytics, get insights into the stability of your test distributions. | ||
|
||
The [official Firebase App Check documentation](https://firebase.google.com/docs/app-distribution) has more information, including about build upload integration, it is worth a read. | ||
|
||
# Usage | ||
|
||
The react-native-firebase module for App Distribution is meant to expose the new version alert capabilities of the iOS SDK. The majority of the App Distribution Firebase service depends on native build/release integrations. Those build/release integrations must be natively implemented for iOS and Android, according to [the upstream docs from Firebase](https://firebase.google.com/docs/app-distribution) or our build system provider. | ||
|
||
## New Version Alerts | ||
|
||
On iOS if you include the App Distribution module, you can optionally enable in-app alerts that appear when new builds are available to test. | ||
|
||
## Tester Sign-in Status | ||
|
||
The methods signInTester and isTesterSignedIn give you more flexibility customizing your tester's sign-in experience, so it can better match your app's look and feel. | ||
|
||
You may check if your tester has already signed into their Firebase App Distribution tester account, so you can choose to display your sign-in UI only for testers who haven't yet signed in. After the tester has signed in, you can then call checkForUpdate to check whether the tester has access to a new build. | ||
|
||
## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# Built application files | ||
android/*/build/ | ||
|
||
# Crashlytics configuations | ||
android/com_crashlytics_export_strings.xml | ||
|
||
# Local configuration file (sdk path, etc) | ||
android/local.properties | ||
|
||
# Gradle generated files | ||
android/.gradle/ | ||
|
||
# Signing files | ||
android/.signing/ | ||
|
||
# User-specific configurations | ||
android/.idea/gradle.xml | ||
android/.idea/libraries/ | ||
android/.idea/workspace.xml | ||
android/.idea/tasks.xml | ||
android/.idea/.name | ||
android/.idea/compiler.xml | ||
android/.idea/copyright/profiles_settings.xml | ||
android/.idea/encodings.xml | ||
android/.idea/misc.xml | ||
android/.idea/modules.xml | ||
android/.idea/scopes/scope_settings.xml | ||
android/.idea/vcs.xml | ||
android/*.iml | ||
|
||
# Xcode | ||
*.pbxuser | ||
*.mode1v3 | ||
*.mode2v3 | ||
*.perspectivev3 | ||
*.xcuserstate | ||
ios/Pods | ||
ios/build | ||
*project.xcworkspace* | ||
*xcuserdata* | ||
|
||
# OS-specific files | ||
.DS_Store | ||
.DS_Store? | ||
._* | ||
.Spotlight-V100 | ||
.Trashes | ||
ehthumbs.db | ||
Thumbs.dbandroid/gradle | ||
android/gradlew | ||
android/build | ||
android/gradlew.bat | ||
android/gradle/ | ||
|
||
.idea | ||
coverage | ||
yarn.lock | ||
e2e/ | ||
.github | ||
.vscode | ||
.nyc_output | ||
android/.settings | ||
*.coverage.json | ||
.circleci | ||
.eslintignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
Apache-2.0 License | ||
------------------ | ||
|
||
Copyright (c) 2016-present Invertase Limited <[email protected]> & Contributors | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this library except in compliance with the License. | ||
|
||
You may obtain a copy of the Apache-2.0 License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
|
||
|
||
Creative Commons Attribution 3.0 License | ||
---------------------------------------- | ||
|
||
Copyright (c) 2016-present Invertase Limited <[email protected]> & Contributors | ||
|
||
Documentation and other instructional materials provided for this project | ||
(including on a separate documentation repository or it's documentation website) are | ||
licensed under the Creative Commons Attribution 3.0 License. Code samples/blocks | ||
contained therein are licensed under the Apache License, Version 2.0 (the "License"), as above. | ||
|
||
You may obtain a copy of the Creative Commons Attribution 3.0 License at | ||
|
||
https://creativecommons.org/licenses/by/3.0/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<p align="center"> | ||
<a href="https://rnfirebase.io"> | ||
<img width="160px" src="https://i.imgur.com/JIyBtKW.png"><br/> | ||
</a> | ||
<h2 align="center">React Native Firebase - App Distribution</h2> | ||
</p> | ||
|
||
<p align="center"> | ||
<a href="https://api.rnfirebase.io/coverage/app-distribution/detail"><img src="https://api.rnfirebase.io/coverage/app-distribution/badge?style=flat-square" alt="Coverage"></a> | ||
<a href="https://www.npmjs.com/package/@react-native-firebase/app-distribution"><img src="https://img.shields.io/npm/dm/@react-native-firebase/app-distribution.svg?style=flat-square" alt="NPM downloads"></a> | ||
<a href="https://www.npmjs.com/package/@react-native-firebase/app-distribution"><img src="https://img.shields.io/npm/v/@react-native-firebase/app-distribution.svg?style=flat-square" alt="NPM version"></a> | ||
<a href="/LICENSE"><img src="https://img.shields.io/npm/l/react-native-firebase.svg?style=flat-square" alt="License"></a> | ||
<a href="https://lerna.js.org/"><img src="https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg?style=flat-square" alt="Maintained with Lerna"></a> | ||
</p> | ||
|
||
<p align="center"> | ||
<a href="https://invertase.link/discord"><img src="https://img.shields.io/discord/295953187817521152.svg?style=flat-square&colorA=7289da&label=Chat%20on%20Discord" alt="Chat on Discord"></a> | ||
<a href="https://twitter.com/rnfirebase"><img src="https://img.shields.io/twitter/follow/rnfirebase.svg?style=flat-square&colorA=1da1f2&colorB=&label=Follow%20on%20Twitter" alt="Follow on Twitter"></a> | ||
<a href="https://www.facebook.com/groups/rnfirebase"><img src="https://img.shields.io/badge/Follow%20on%20Facebook-4172B8?logo=facebook&style=flat-square&logoColor=fff" alt="Follow on Facebook"></a> | ||
</p> | ||
|
||
--- | ||
|
||
App Distribution helps you distribute your pre-release app versions to users | ||
|
||
[> Learn More](https://firebase.google.com/products/app-distribution/) | ||
|
||
## Installation | ||
|
||
Requires `@react-native-firebase/app` to be installed. | ||
|
||
```bash | ||
yarn add @react-native-firebase/app-distribution | ||
``` | ||
|
||
## Documentation | ||
|
||
- [Guides](https://rnfirebase.io/app-distribution/usage) | ||
- [Reference](https://rnfirebase.io/reference/app-distribution) | ||
|
||
## License | ||
|
||
- See [LICENSE](/LICENSE) | ||
|
||
--- | ||
|
||
<p> | ||
<img align="left" width="75px" src="https://static.invertase.io/assets/invertase-logo-small.png"> | ||
<p align="left"> | ||
Built and maintained with 💛 by <a href="https://invertase.io">Invertase</a>. | ||
</p> | ||
</p> | ||
|
||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
require 'json' | ||
package = JSON.parse(File.read(File.join(__dir__, 'package.json'))) | ||
appPackage = JSON.parse(File.read(File.join('..', 'app', 'package.json'))) | ||
|
||
coreVersionDetected = appPackage['version'] | ||
coreVersionRequired = package['peerDependencies'][appPackage['name']] | ||
firebase_sdk_version = appPackage['sdkVersions']['ios']['firebase'] | ||
if coreVersionDetected != coreVersionRequired | ||
Pod::UI.warn "NPM package '#{package['name']}' depends on '#{appPackage['name']}' v#{coreVersionRequired} but found v#{coreVersionDetected}, this might cause build issues or runtime crashes." | ||
end | ||
|
||
Pod::Spec.new do |s| | ||
s.name = "RNFBAppDistribution" | ||
s.version = package["version"] | ||
s.description = package["description"] | ||
s.summary = <<-DESC | ||
A well tested feature rich Firebase implementation for React Native, supporting iOS & Android. | ||
DESC | ||
s.homepage = "http://invertase.io/oss/react-native-firebase" | ||
s.license = package['license'] | ||
s.authors = "Invertase Limited" | ||
s.source = { :git => "https://github.com/invertase/react-native-firebase.git", :tag => "v#{s.version}" } | ||
s.social_media_url = 'http://twitter.com/invertaseio' | ||
s.ios.deployment_target = "10.0" | ||
s.source_files = 'ios/**/*.{h,m}' | ||
|
||
# React Native dependencies | ||
s.dependency 'React-Core' | ||
s.dependency 'RNFBApp' | ||
|
||
if defined?($FirebaseSDKVersion) | ||
Pod::UI.puts "#{s.name}: Using user specified Firebase SDK version '#{$FirebaseSDKVersion}'" | ||
firebase_sdk_version = $FirebaseSDKVersion | ||
end | ||
|
||
# Firebase dependencies | ||
s.dependency 'Firebase/AppDistribution', firebase_sdk_version | ||
|
||
if defined?($RNFirebaseAsStaticFramework) | ||
Pod::UI.puts "#{s.name}: Using overridden static_framework value of '#{$RNFirebaseAsStaticFramework}'" | ||
s.static_framework = $RNFirebaseAsStaticFramework | ||
else | ||
s.static_framework = false | ||
end | ||
end |
11 changes: 11 additions & 0 deletions
11
packages/app-distribution/__tests__/app-distribution.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { firebase } from '../lib'; | ||
|
||
describe('appDistribution()', function () { | ||
describe('namespace', function () { | ||
it('accessible from firebase.app()', function () { | ||
const app = firebase.app(); | ||
expect(app.appDistribution).toBeDefined(); | ||
expect(app.appDistribution().app).toEqual(app); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# editorconfig | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true |
Oops, something went wrong.