Skip to content

Commit 47e0a98

Browse files
App check and storage, functions and RTDB support (#7928)
* AppAttestation initial public API * Run ./scripts/style.sh * Copyright * Cleanup * Cleanup * Get token forcing refresh method * Formatting * Forcing refresh samples * Interop introduced * Code samples for Interop * Run ./scripts/style.sh * Cleanup * TODOs and Copirights * Fix build * Supported iOS versions * Remove unnecessary bridging header * Run ./scripts/style.sh * [WIP] DeviceCheckAttestationProvider as a subspec * cleanup * Add memory attributes to readonly properties * Move FIRDeviceCheckAttestationProvider.h to private headers * TODO for `FirebaseAppAttestation/Core` name * Remove memory attributes from FIRAppAttestationToken properties * FIRAppAttestationTests.testSetAttestationProviderFactory introduced * FIRAppAttestationToken initializer * Basic FIRLibrary implementation and FIRAppAttestationProviderFactory ingestion. * Fix * FIRAppAttestationToken+Interop.h * TODOs * Tests: reset FIRApps * GHA for App Attestation * Run ./scripts/style.sh * Style fixes. * Run ./scripts/style.sh * TODO * Nullable initializer and type annpotations * TODOs * TODOs * TODO * Fix spec and allow warnings * AppAttestation initial public API * Run ./scripts/style.sh * Copyright * Cleanup * Cleanup * Get token forcing refresh method * Formatting * Forcing refresh samples * Interop introduced * Code samples for Interop * Run ./scripts/style.sh * Cleanup * TODOs and Copirights * Fix build * Supported iOS versions * Remove unnecessary bridging header * Run ./scripts/style.sh * [WIP] DeviceCheckAttestationProvider as a subspec * cleanup * Add memory attributes to readonly properties * Move FIRDeviceCheckAttestationProvider.h to private headers * TODO for `FirebaseAppAttestation/Core` name * Remove memory attributes from FIRAppAttestationToken properties * FIRAppAttestationTests.testSetAttestationProviderFactory introduced * FIRAppAttestationToken initializer * Basic FIRLibrary implementation and FIRAppAttestationProviderFactory ingestion. * Fix * FIRAppAttestationToken+Interop.h * TODOs * Tests: reset FIRApps * Run ./scripts/style.sh * Style fixes. * Run ./scripts/style.sh * TODO * Nullable initializer and type annpotations * TODOs * TODOs * TODO * Revert FirestoreDecoder.swift formatting. * Basic implementation of FIRDeviceCheckAttestationProvider and tests (#626) * DeviceCheck attestation provider sceleton * DeviceCheck attestation provider sceleton * Basic FIRDeviceCheckAttestationProviderTests * Run ./scripts/style.sh * FIRAppAttestStorage implementation and tests (#627) * FIRDeviceCheckAttestationProvider designated init * FIRAppAttestStorage API and basic tests. * FIRAppAttestStoredToken: NSSecureCoding implementation * WIP Storage * Add `accessGroup` param to `FIRAppAttestStorage` * FIRAppAttestStorage implementation * Use constants * FIRAppAttestStorage API doc * Coding style and typos. * Code formatting * Attestation Token caching (#630) * Storage instance and looging * AppAttestation caching * Tests and cleanup * Cleanup * Rename App Attestation -> App Check (#631) * Rename App Attestation -> App Check * Run ./scripts/style.sh * Update GHA * Default Custom Provider (#633) * AppCheck: remove not unnecessary public API (#634) * AppCheck: remove not unnecessary public API * Run ./scripts/style.sh * AppCheck: DeviceCheck token server API (#635) * Generic HTTP request handling * [draft] AppCheck: device check HTTP API and simple tests * Parse response * Cleanup * AppCheck: API errors and tests (#636) * AppCheck errors * API service tests and fixes * Cleanup * Run ./scripts/style.sh * Naming * AppCheck: Register device check provider factory as a default (#637) * AppCheck errors * API service tests and fixes * Cleanup * Run ./scripts/style.sh * AppCheck: register FIRDeviceCheckProvider as a component * Naming * Registre device check provider factory as a default * FIRDeviceCheckProvider tests * AppCheck: API communication common for all providers moved to FIRAppCheckAPIService (#640) * FIRAppCheckAPIService introduced * Move URL seession stub to FIRURLSessionOCMockStub * Run ./scripts/style.sh * Move approximate date comparing to FIRDateTestUtils * compose request in FIRAppCheckAPIService * FIRAppCheckAPIServiceTests * Use FIRAppCheckAPIService in FIRDeviceCheckProvider * Cleanup * DeviceCheck mock server integration and tests (#686) * DeviceCheck mock server integration and tests * TODO * Update FIROptions.h import * Temporary add FirebaseAppCheck to skip import validation * TestUtilities moved to SharedTestUtilities * FirebaseAppCheck.podspec: TestUtilities->SharedTestUtilities * SwiftPM: add OCMock dependency to SharedTestUtilities * FIRURLSessionOCMockStub: #import "OCMock.h" * App Check: Firebase 7 fixes (#715) * AppCheck Firebase 7 * FirebaseCore repo-relative imports * Fix FIRAppCheckStorage.m compilation * Repo relative imports * linebreak * AppCheck: debug FAC token provider (#716) * AppCheck Firebase 7 * FirebaseCore repo-relative imports * Fix FIRAppCheckStorage.m compilation * Repo relative imports * linebreak * Remove FIRAppCheckDefaultCustomProvider * FIRAppCheckDebugProvider introduced * FIRAppCheckDebugProviderTests * style * Print locally generated debug token to console * Fix imports * mullability and line breaks * typo * Comments * TODO * AppCheck: merge into single spec (package) (#717) * Standard package folder structure * Move interop header into AppCheck sources folder * Combine public headers in the standard dir * Private headers to internal * Podspec * Headers import udpdate * style * Fix header imports * Enable check_imports.swift and fix imports * AppCheck: server request adjustments (#718) * Wrap DeviceCheck token into JSON * AppChek - remove static_framework requirement * WIP * Update default base URL * Set content-type header * Check for empty response data * Fix tests * Style and formatting * Podspec - revert wrong change and remove static_framework * Assign error to error pointer safely. * AppCheck: primitive test app (#719) * Remove static_framework requirement * WIP: FIRAppCheckTestApp introduced * Delete .plist * Copyright * Remove empty test targets * pod deintegrate * Remove test targets from Podfile * formatting * Storage: integration with AppCheck (#720) * Storage: add AppCheck interop dependency * Inject AppCheck into FIRStorageTokenAuthorizer * initial AppCheck integration * Introduce AppCheck fake * AppCheck fake implementation * FIRStorageTokenAuthorizer tests and fixes * @"Authorization" header constant * Log AppCheck error. * Cleanup * FIRStorageTokenAuthorizerTests: helpers * TODO * Cleanup * AppCheck: separate 2P and 3P API (#724) * FIRAppCheckInterop: remove a convenience method. * Rename: FIRAppCheckTokenInterop->FIRAppCheckTokenResultInterop * FIRAppCheckTokenResult introduced * Update FIRAppCheckTokenHandlerInterop, FIRAppCheckTokenResultInterop and tests * style * Update token result * Update storage integration * Adjust check_imports.swift for test files * Don't use internal AppCheck classes in Storage tests * style * Rename token to tokenResult in 2P API * Add private Core headers to app check sources * Fix storage log message code format * token clarification comments in API docs * Rename token->tokenResult * AppCheck cleanup (#737) * Fix public headers import * Cleanup imported test utils * FirebaseAppCheck podspec: revert git URL * AppCheck: Debug token to AppCheck token exchange API (#739) * GUL: make NSURLSession promise extension public * Use NSURLSession+GULPromises to send requests * style * Move FIRAppCheckToken+APIResponse to Core dir * rename * FIRAppCheckDebugProviderAPIService introduced * Move async token parsing API to FIRAppCheckToken extension * Move token exchange response handling to FIRAppCheckAPIService. Tests WIP. * Move API response parsing tests to FIRAppCheckAPIServiceTests * FIRAppCheckDebugProviderAPIServiceTests * Cleanup * style * App Check debug provider: integrate with exchange API (#743) * Move FIROption validation to FIRAppCheckValidator * FIRAppCheckDebugProvider token exchange and tests * Fix FIRAppCheckDebugProviderFactoryTests * style * App Check test app debug provider fix (#747) * App Check: minor touchups (#750) * Update dummy token value * Print local debug token to logs * Require GoogleUtilities v7.2 and above * Print debug token on init * Don't print debug token again * App Check: use prod environment (#751) * App Check: use prod backend by default. * Update token expiration threshold * App Check SwiftPM support (#753) * AppCheck SwiftPM package definition * Promise header import fix * OCMock header fix * Fix fixture dependent tests * Exclude Keychain dependent tests * License * ./scripts/style.sh * Cleanup * Format with proper SwiftFormat version * `.process` resources. * Swift tests target * Cleanup and code formatting * App Check: token auto-refresh (#754) * FIRAppCheckTokenRefresher API defined * FIRAppCheckTokenRefresher implementation draft * [WIP] Token refresher integration * Token refresher integration * FIRAppCheckTests: token refresher tests * FIRAppCheckTests: additional tests cases * FIRAppCheckTimer introduced * FIRAppCheckTokenRefresher: use FIRAppCheckTimer instead of the dispatch timer. * FIRFakeTimer * FIRAppCheckTokenRefresherTests testInitialRefresh * FIRAppCheckTokenRefresherTests: testNextRefreshOnRefreshSuccess * ./scripts/style.sh * Exponential backoff * Style and comments * Move token refresh files to a separate folder * FIRAppCheckTimerTests * FIRAppCheck: use expicit class in init * FIRAppCheckDebugProviderFactory Swift name * FIRAppCheckTokenRefresher: Increment/decrement directly * App Check fixes (#755) * Fix backoff: no backoff for the initial request * Use eager initialization * FIRAppCheckTokenRefresher: don't refresh until handler set * FIRAppCheckIntegrationTests: disable token refresher * Fix testInitialRefresh test * style * FIRAppCheckIntegrationTests fix * Temporary exclude App Check from platfrom logging (#756) * App Check: send app check SDK version only in the header (#757) * App Check: store FAC token per app ID (#758) * App Check: store FAC token per app ID * update podspec * API docs * FIRAppCheck initWithApp tests * AppCheckCustomProvideApp (#760) * Functions: App Check integration (#762) * Functions: app check API added to FUNContextProvider * FUNContextProviderTests * FUNContextProvider app check support * ./scripts/style.sh * FIRFunctions: pass FAC token as HTTP header * Fix SPM * Fix Firebase-Package scheme bad merge * Cleanup * RTDB: pass FAC token to web socket (#763) * RTDB: pass FAC token to web socket * FIRAppCheckFake default init * Rename FAuthTokenProvider to FIRDatabaseConnectionContext; integrate with App Check * Pass App Check token in the HTTP header * Rename * Fix existing tests * TODO * ./scripts/style.sh * Context provider: assume separate FAC token change listener * FIRDatabaseConnectionContextProviderTests * Remove unused files * Copy NSMutableURLRequest * Cleanup * ./scripts/style.sh * FIRDatabaseConnectionContextProvider: sync callback when no auth or app check * Cleanup * Rename "authToken" leftovers to "context" * Fix renaming * Pass missing headers to NSURLSessionWebSocketTask * Cleanup * add a name to TODO * App Check: token update notifications (#764) * AppCheck: token did change API and tests * notification implementation and fixes * Run ./scripts/style.sh * Update comments * RTDB: send app check token updates to keep connection open (#765) * Pass AppCheck instance as an object into the the FAC token update notification * FIRDatabaseConnectionContext: add FAC token change listener API * formatting * Send FAC token updates to open connection * More informative empty response message * refreshAppCheckToken fixes * Remove assertion * Don't modify state * forceTokensRefresh -> forceTokenRefreshes * Call listeners on [FIRDatabaseQuery sharedQueue] * App Check API cleanup and docs (#766) * AppCheck public API and docs cleanup * More API docs * Fix compilation errors * typos and wording * Make summary different from description (pod lib lint warning) * port app check workflow changes from another branch * pod lib lint: remove --allow-warnings * App Check cleanup (#767) * Cleanup debug code and outdated TODOs * Fix FIRDeviceCheckProvider availablility for SPM * Fix availability in tests * Fix availability in tests * Make sure os requirements are consistent for tests specs * Migrate v1alpha URLs to v1beta * Migrate v1alpha URLs to v1beta * Run ./scripts/style.sh * Functions tests: fix Xcode 11 warnings (#7931) * Functions tests: fix Xcode 11 warnings * style * App Check: token auto-refresh opt-out API (#769) * FIRAppCheckSettings introduced (WIP) * FIRAppCheckSettingsTests * Style * Make FIRAppCheckSettings instance per-app. * FIRAppCheckTokenRefresher: use FIRAppCheckSettings.isTokenAutoRefreshEnabled (WIP) * Tests * Add public instance getters * Fix analyzer warnings * Fix testspec OS versions * FIRAppCheckTokenRefresher expiration date update; tests * FIRAppCheck.isTokenAutoRefreshEnabled implementation and tests * style * FIRAppCheck: Use specific types for variables in the default init * More precise comments * missing symbol * FIRAppCheckSettings: remove defensive conditions from init. Co-authored-by: Nick Cooke <nickcooke@google.com> Co-authored-by: Nick Cooke <36927374+ncooke3@users.noreply.github.com>
1 parent 192b7d0 commit 47e0a98

File tree

156 files changed

+9853
-515
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

156 files changed

+9853
-515
lines changed

.github/workflows/app_check.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: app_check
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'FirebaseAppCheck**'
7+
- '.github/workflows/app_check.yml'
8+
schedule:
9+
# Run every day at 11pm (PST) - cron uses UTC times
10+
- cron: '0 7 * * *'
11+
12+
jobs:
13+
pod_lib_lint:
14+
runs-on: macOS-latest
15+
strategy:
16+
matrix:
17+
target: [ios, tvos, macos]
18+
steps:
19+
- uses: actions/checkout@v2
20+
- name: Setup Bundler
21+
run: scripts/setup_bundler.sh
22+
- name: FirebaseAppCheck
23+
run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAppCheck.podspec --platforms=${{ matrix.target }}
24+
25+
diagnostics:
26+
# Don't run on private repo unless it is a PR.
27+
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
28+
runs-on: macOS-latest
29+
strategy:
30+
matrix:
31+
diagnostic: [tsan, asan, ubsan]
32+
steps:
33+
- uses: actions/checkout@v2
34+
- name: Initialize xcodebuild
35+
run: xcodebuild -list
36+
- name: iOS Unit Tests
37+
run: scripts/third_party/travis/retry.sh ./scripts/build.sh AppCheckUnit iOS spm ${{ matrix.diagnostic }}
38+
- name: Upload raw logs if failed
39+
if: ${{ failure() }}
40+
uses: actions/upload-artifact@v2
41+
with:
42+
name: failure-xcodebuild-raw-logs
43+
path: xcodebuild.log
44+
45+
app_check-cron-only:
46+
runs-on: macos-latest
47+
if: github.event_name == 'schedule'
48+
strategy:
49+
matrix:
50+
flags: [
51+
'--use-modular-headers',
52+
'--use-libraries'
53+
]
54+
needs: pod_lib_lint
55+
steps:
56+
- uses: actions/checkout@v2
57+
- name: Setup Bundler
58+
run: scripts/setup_bundler.sh
59+
- name: PodLibLint FirebaseAppCheck Cron
60+
# TODO: Remove --allow-warnings when stabilized.
61+
run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAppCheck.podspec --platforms=ios ${{ matrix.flags }}

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,3 +144,7 @@ CocoaPodsIntegrationTest/Podfile
144144
# In-app messaging integration tests
145145
FirebaseInAppMessaging/Tests/Integration/FunctionalTestApp/GoogleService-Info.plist
146146
FirebaseInAppMessaging/Tests/Integration/FunctionalTestApp/App/InAppMessaging-Example-iOS/AppDelegate.m
147+
148+
# FIRAppCheckTestApp
149+
FirebaseAppCheck/Apps/FIRAppCheckTestApp/FIRAppCheckTestApp/GoogleService-Info.plist
150+
FirebaseAppCheck/Apps/AppCheckCustomProvideApp/AppCheckCustomProvideApp/GoogleService-Info.plist
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1230"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
</BuildAction>
9+
<TestAction
10+
buildConfiguration = "Debug"
11+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
12+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
13+
shouldUseLaunchSchemeArgsEnv = "YES">
14+
<Testables>
15+
<TestableReference
16+
skipped = "NO">
17+
<BuildableReference
18+
BuildableIdentifier = "primary"
19+
BlueprintIdentifier = "AppCheckUnit"
20+
BuildableName = "AppCheckUnit"
21+
BlueprintName = "AppCheckUnit"
22+
ReferencedContainer = "container:">
23+
</BuildableReference>
24+
</TestableReference>
25+
</Testables>
26+
</TestAction>
27+
<LaunchAction
28+
buildConfiguration = "Debug"
29+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
30+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
31+
launchStyle = "0"
32+
useCustomWorkingDirectory = "NO"
33+
ignoresPersistentStateOnLaunch = "NO"
34+
debugDocumentVersioning = "YES"
35+
debugServiceExtension = "internal"
36+
allowLocationSimulation = "YES">
37+
</LaunchAction>
38+
<ProfileAction
39+
buildConfiguration = "Release"
40+
shouldUseLaunchSchemeArgsEnv = "YES"
41+
savedToolIdentifier = ""
42+
useCustomWorkingDirectory = "NO"
43+
debugDocumentVersioning = "YES">
44+
</ProfileAction>
45+
<AnalyzeAction
46+
buildConfiguration = "Debug">
47+
</AnalyzeAction>
48+
<ArchiveAction
49+
buildConfiguration = "Release"
50+
revealArchiveInOrganizer = "YES">
51+
</ArchiveAction>
52+
</Scheme>
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1230"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
</BuildAction>
9+
<TestAction
10+
buildConfiguration = "Debug"
11+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
12+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
13+
shouldUseLaunchSchemeArgsEnv = "YES">
14+
<Testables>
15+
<TestableReference
16+
skipped = "NO">
17+
<BuildableReference
18+
BuildableIdentifier = "primary"
19+
BlueprintIdentifier = "AppCheckUnitSwift"
20+
BuildableName = "AppCheckUnitSwift"
21+
BlueprintName = "AppCheckUnitSwift"
22+
ReferencedContainer = "container:">
23+
</BuildableReference>
24+
</TestableReference>
25+
</Testables>
26+
</TestAction>
27+
<LaunchAction
28+
buildConfiguration = "Debug"
29+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
30+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
31+
launchStyle = "0"
32+
useCustomWorkingDirectory = "NO"
33+
ignoresPersistentStateOnLaunch = "NO"
34+
debugDocumentVersioning = "YES"
35+
debugServiceExtension = "internal"
36+
allowLocationSimulation = "YES">
37+
</LaunchAction>
38+
<ProfileAction
39+
buildConfiguration = "Release"
40+
shouldUseLaunchSchemeArgsEnv = "YES"
41+
savedToolIdentifier = ""
42+
useCustomWorkingDirectory = "NO"
43+
debugDocumentVersioning = "YES">
44+
</ProfileAction>
45+
<AnalyzeAction
46+
buildConfiguration = "Debug">
47+
</AnalyzeAction>
48+
<ArchiveAction
49+
buildConfiguration = "Release"
50+
revealArchiveInOrganizer = "YES">
51+
</ArchiveAction>
52+
</Scheme>

.swiftpm/xcode/xcshareddata/xcschemes/Firebase-Package.xcscheme

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -826,9 +826,9 @@
826826
buildForAnalyzing = "YES">
827827
<BuildableReference
828828
BuildableIdentifier = "primary"
829-
BlueprintIdentifier = "Firebase_FirebaseInAppMessaging"
830-
BuildableName = "Firebase_FirebaseInAppMessaging"
831-
BlueprintName = "Firebase_FirebaseInAppMessaging"
829+
BlueprintIdentifier = "FirebaseAppCheck"
830+
BuildableName = "FirebaseAppCheck"
831+
BlueprintName = "FirebaseAppCheck"
832832
ReferencedContainer = "container:">
833833
</BuildableReference>
834834
</BuildActionEntry>
@@ -840,9 +840,9 @@
840840
buildForAnalyzing = "YES">
841841
<BuildableReference
842842
BuildableIdentifier = "primary"
843-
BlueprintIdentifier = "Firebase_FirebaseInAppMessaging_iOS"
844-
BuildableName = "Firebase_FirebaseInAppMessaging_iOS"
845-
BlueprintName = "Firebase_FirebaseInAppMessaging_iOS"
843+
BlueprintIdentifier = "Firebase_AppCheckUnit"
844+
BuildableName = "Firebase_AppCheckUnit"
845+
BlueprintName = "Firebase_AppCheckUnit"
846846
ReferencedContainer = "container:">
847847
</BuildableReference>
848848
</BuildActionEntry>
@@ -1058,6 +1058,26 @@
10581058
ReferencedContainer = "container:">
10591059
</BuildableReference>
10601060
</TestableReference>
1061+
<TestableReference
1062+
skipped = "NO">
1063+
<BuildableReference
1064+
BuildableIdentifier = "primary"
1065+
BlueprintIdentifier = "AppCheckUnit"
1066+
BuildableName = "AppCheckUnit"
1067+
BlueprintName = "AppCheckUnit"
1068+
ReferencedContainer = "container:">
1069+
</BuildableReference>
1070+
</TestableReference>
1071+
<TestableReference
1072+
skipped = "NO">
1073+
<BuildableReference
1074+
BuildableIdentifier = "primary"
1075+
BlueprintIdentifier = "AppCheckUnitSwift"
1076+
BuildableName = "AppCheckUnitSwift"
1077+
BlueprintName = "AppCheckUnitSwift"
1078+
ReferencedContainer = "container:">
1079+
</BuildableReference>
1080+
</TestableReference>
10611081
</Testables>
10621082
</TestAction>
10631083
<LaunchAction

FirebaseAppCheck.podspec

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
Pod::Spec.new do |s|
2+
s.name = 'FirebaseAppCheck'
3+
s.version = '7.6.0-beta'
4+
s.summary = 'Firebase App Check SDK.'
5+
6+
s.description = <<-DESC
7+
Firebase SDK for anti-abuse compatibility.
8+
DESC
9+
10+
s.homepage = 'https://firebase.google.com'
11+
s.license = { :type => 'Apache', :file => 'LICENSE' }
12+
s.authors = 'Google, Inc.'
13+
14+
s.source = {
15+
:git => 'https://github.com/firebase/firebase-ios-sdk.git',
16+
:tag => 'CocoaPods-' + s.version.to_s
17+
}
18+
s.social_media_url = 'https://twitter.com/Firebase'
19+
20+
ios_deployment_target = '11.0'
21+
osx_deployment_target = '10.15'
22+
tvos_deployment_target = '11.0'
23+
24+
s.ios.deployment_target = ios_deployment_target
25+
s.osx.deployment_target = osx_deployment_target
26+
s.tvos.deployment_target = tvos_deployment_target
27+
28+
s.cocoapods_version = '>= 1.4.0'
29+
s.prefix_header_file = false
30+
31+
base_dir = "FirebaseAppCheck/"
32+
33+
s.source_files = [
34+
base_dir + 'Sources/**/*.[mh]',
35+
'FirebaseCore/Sources/Private/*.h',
36+
]
37+
s.public_header_files = base_dir + 'Sources/Public/FirebaseAppCheck/*.h'
38+
39+
s.framework = 'DeviceCheck'
40+
41+
s.dependency 'FirebaseCore', '~> 7.0'
42+
s.dependency 'PromisesObjC', '~> 1.2'
43+
s.dependency 'GoogleUtilities/Environment', '~> 7.2'
44+
45+
preprocessor_definitions = 'FIRAppCheck_LIB_VERSION=' + String(s.version)
46+
s.pod_target_xcconfig = {
47+
'GCC_C_LANGUAGE_STANDARD' => 'c99',
48+
'GCC_PREPROCESSOR_DEFINITIONS' => preprocessor_definitions,
49+
'HEADER_SEARCH_PATHS' => '"${PODS_TARGET_SRCROOT}"'
50+
}
51+
52+
s.test_spec 'unit' do |unit_tests|
53+
unit_tests.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
54+
unit_tests.source_files = [
55+
base_dir + 'Tests/Unit/**/*.[mh]',
56+
base_dir + 'Tests/Utils/**/*.[mh]',
57+
'SharedTestUtilities/AppCheckFake/*',
58+
'SharedTestUtilities/Date/*',
59+
'SharedTestUtilities/URLSession/*',
60+
]
61+
62+
unit_tests.resources = base_dir + 'Tests/Fixture/**/*'
63+
unit_tests.dependency 'OCMock'
64+
unit_tests.requires_app_host = true
65+
end
66+
67+
s.test_spec 'integration' do |integration_tests|
68+
integration_tests.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
69+
integration_tests.source_files = base_dir + 'Tests/Integration/**/*.[mh]',
70+
base_dir + 'Tests/Integration/**/*.[mh]',
71+
integration_tests.resources = base_dir + 'Tests/Fixture/**/*'
72+
integration_tests.requires_app_host = true
73+
end
74+
75+
s.test_spec 'swift-unit' do |swift_unit_tests|
76+
swift_unit_tests.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
77+
swift_unit_tests.source_files = base_dir + 'Tests/Unit/Swift/**/*.swift',
78+
base_dir + 'Tests/Unit/Swift/**/*.h'
79+
end
80+
81+
end

0 commit comments

Comments
 (0)