Skip to content

Commit 16e062c

Browse files
jeremydurhampranavrajgopalschnecle
authored
Switch App Distribution SDK from AppAuth to FirebaseInstallations (#6126)
* Adding error handling and returning correct error codes * * Handling auth cancellation a few other error cases * Adding some logging for EAP (Using NSLogs temporarily. DONOT MERGE) * Add in a setter for clientID to allow overrides (#5514) * Add in a setter for clientID to allow overrides * Update styling * Adding some result parsing logs * Fixing code hash logging * Add FirebaseAppDistribution to ZipBuilder * * Making sure keychain is accesible after first unlock even if app is backgrounded (#5563) * Fix auth persistence logging and invalid type casting (#5631) * Logging app id requesting releases (#5655) * AppDistribution keychain access fixes (#5683) * Using the GULKeychainUtils instead of custom keychain utility. Also added better logging * Updating keychain name and fixing tests * Code review feedback updates * Making serviceID unique per app * Adding gmp app id to the keychain along with the bundle id * Moving Keychain Utility functions in the AuthPersistence class and deleting the utility class * Lazy initialize auth state (#5755) * Lazy initialize auth state * Making sure we dont log an error is auth state is not persisted in the keychain * Switch from NSLog to FIRFADLogger (#5756) * Add FIRLogger * Switch from NSLog to FIRFADLogger * * Use FIS Auth for authenticating the tester * Remove AppAuth and start wiring up interceptor to do sign in * Extracting registration flow UI in interceptor * Adding support for iOS 9 and 10 * Create app distribution api service to handle tester api calls. (#6060) * Pull out calls to the FAD API to make them reuseable * Fix tests and run styl updates * Uncomment FIRFADLog Statements * Use [] accessor rather than . accessor * Re-running style updates * Trying to get these checks to pass the first time around * App distribution signin persist (#6063) * Pull out calls to the FAD API to make them reuseable * Fix tests and run styl updates * Add in UserDefaults storage after a tester has signed in * Add testing for the main AppDistribution file * Ran style.sh * Remove FIRFADLocalStorage and call GULUserDefaults directly. Update tests to stop mocking on teardown. * Add support for dynamic url schemes and fix two crashes (#6081) * Add support for dynamic url schemes and fix two crashes * Add support for dynamic url schemes in the format appdistribution-<app id without colons> * Fix crash when launching an app directly via a URL scheme * Fix a crash on iOS 10 simulator caused by calling NSLogv twice * Remove uses of NSLog * Fix warnings * Switch encodedAppId to be a class method * Fix styles * Create changelog and readme in preparation for release. (#6095) Just changing markdown files so will not wait for gha checks. * Change slices property from copy to strong (#6097) Fix lint warning * Change error handlers to return bool values instead of void (#6101) * Mapping sign in flow errors to app distribution errors. Also renaming AppDelegateInterceptor to FIRAppDistributionUIService (#6099) * Add github action for App Distribution (#6094) * Updating app distribution deployment target to iOS 9 (#6118) * Making sure we return granular errors during sign in persistence. Also fixing some naming and comment issues (#6117) * Encoding colons to dashes in the app id (#6119) * Move Internal headers to Sources (#6106) * Move Internal headers to Sources/ folder * PR feedback * Remove appDistribution from zip builder * Respond to code review feedback (#6138) * Initializing UIWindow using initWithWindowScene for ios 13 and removing UI code from main FIRAppDistribution.m (#6144) * Initializing UIWindow using initWithWindowScene for ios 13. Also making sure we only reset window in the App delegate if a registration flow is in progress. * Remove UI code from main class, add unit tests, and clean up UIService * stylish * Remove defines in favor of solely 'if (@available(iOS 13.0, *))' * Respond to code review feedback Co-authored-by: Cleo Schneider <[email protected]> Co-authored-by: Pranav Rajgopal <[email protected]> Co-authored-by: Cleo Schneider <[email protected]>
1 parent 6d8edf9 commit 16e062c

30 files changed

+1961
-765
lines changed

.github/workflows/appdistribution.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: appdistribution
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'FirebaseAppDistribution**'
7+
- '.github/workflows/appdistribution.yml'
8+
- 'Gemfile'
9+
schedule:
10+
# Run every day at 3am (PST) - cron uses UTC times
11+
# This is set to 3 hours after zip workflow finishes so zip testing can run after.
12+
- cron: '0 11 * * *'
13+
14+
jobs:
15+
pod-lib-lint:
16+
# Don't run on private repo unless it is a PR.
17+
if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
18+
19+
runs-on: macos-latest
20+
strategy:
21+
matrix:
22+
target: [ios]
23+
steps:
24+
- uses: actions/checkout@v2
25+
- name: Setup Bundler
26+
run: scripts/setup_bundler.sh
27+
- name: Build and test
28+
run: |
29+
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAppDistribution.podspec \
30+
--platforms=${{ matrix.target }}
31+
32+
appdistribution-cron-only:
33+
if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'
34+
35+
runs-on: macos-latest
36+
strategy:
37+
matrix:
38+
target: [ios]
39+
flags: [
40+
'--use-modular-headers',
41+
'--use-libraries'
42+
]
43+
needs: pod-lib-lint
44+
steps:
45+
- uses: actions/checkout@v2
46+
- name: Setup Bundler
47+
run: scripts/setup_bundler.sh
48+
- name: PodLibLint App Distribution Cron
49+
run: |
50+
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAppDistribution.podspec \
51+
--platforms=${{ matrix.target }} ${{ matrix.flags }}

FirebaseAppDistribution.podspec

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ iOS SDK for App Distribution for Firebase.
1515
:tag => 'AppDistribution-' + s.version.to_s
1616
}
1717

18-
s.ios.deployment_target = '8.0'
18+
s.ios.deployment_target = '9.0'
1919

2020
s.cocoapods_version = '>= 1.4.0'
2121
s.static_framework = true
@@ -25,14 +25,18 @@ iOS SDK for App Distribution for Firebase.
2525
s.source_files = [
2626
base_dir + '**/*.{c,h,m,mm}',
2727
'FirebaseCore/Sources/Private/*.h',
28+
'FirebaseInstallations/Source/Library/Private/*.h',
29+
'GoogleDataTransport/GDTCORLibrary/Internal/*.h',
2830
'GoogleUtilities/AppDelegateSwizzler/Private/*.h',
31+
'GoogleUtilities/UserDefaults/Private/*.h',
2932
]
3033
s.public_header_files = base_dir + 'Public/*.h'
31-
s.private_header_files = base_dir + 'Private/*.h'
3234

3335
s.dependency 'FirebaseCore', '~> 6.8'
34-
s.dependency 'AppAuth', '~> 1.2.0'
3536
s.dependency 'GoogleUtilities/AppDelegateSwizzler', '~> 6.7'
37+
s.dependency 'GoogleUtilities/UserDefaults', '~> 6.7'
38+
s.dependency 'FirebaseInstallations', '~> 1.5'
39+
s.dependency 'GoogleDataTransport', '~> 7.0'
3640

3741
s.pod_target_xcconfig = {
3842
'GCC_C_LANGUAGE_STANDARD' => 'c99',

FirebaseAppDistribution/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# v0.1.0
2+
- Initial beta release.

FirebaseAppDistribution/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Firebase App Distribution SDK
2+
3+
## Development
4+
5+
### Prereqs
6+
7+
- At least CocoaPods 1.6.0
8+
- Install [cocoapods-generate](https://github.com/square/cocoapods-generate)
9+
10+
### To Develop
11+
12+
- Run `pod gen FirebaseAppDistribution.podspec`
13+
- `open gen/FirebaseAppDistribution/FirebaseAppDistribution.xcworkspace`
14+
15+
You are ready to develop, build, debug, and test FirebaseAppDistribution.
16+
17+
### Running Unit Tests
18+
19+
Open the generated workspace, choose the FirebaseAppDistribution-Unit-unit scheme and press Command-u.

0 commit comments

Comments
 (0)