Added a DeviceCheck isSupported check and return a FIRAppCheckErrorCodeUnsupported error when not supported (e.g., when running on the simulator or older Macs). This was done to match the behaviour of the FIRAppAttestProvider.
- Updated the FIR_DEVICE_CHECK_PROVIDER_AVAILABILITY and FIR_APP_ATTEST_PROVIDER_AVAILABILITY API availability macros to reflect the set of supported platforms for DeviceCheck (iOS 11+, macOS 10.15+, macCatalyst 13+, tvOS 11+, watchOS 9+) and App Attest (iOS 14+, macOS 11.3+, macCatalyst 14.5+, tvOS 15+, watchOS 9+).
- Removed the extraneous check for the watchOS 9 SDK now that Xcode 14 is the minimum supported by Firebase.
Removed the #if TARGET_OS_IOS compiler directive in AppCheckAPITests.swift since TARGET_OS_IOS is only available in Objective-C and was always false.
* draft pr for callable functions
* Adjust Functions podspec dependency on AppCheckInterop
* Add 'HTTPSCallableOptions' class
* Re-implement with new HTTPSCallableOptions type
* Revert and update Objective-C API tests
* Mark new AppCheckInterop API optional for backwards compatibility
* Preserve existing codable Functions API
* Revert integration tests
* Style
* Fix some test build breakages
* Add changelog entry
* Style
* Fix AppCheck tests
* Cleanup current approach
* Re-organize tests
* Add 'options' param to 'getContext' call
* Add success case unit test
* Shorten expectation waiting timeout
* Add remaining unit tests
* Amend current test
* Rename 'limitedUseTokens' to 'requireLimitedUseTokens'
* Fix build and tests
* Fix some renaming misses
* Fix some renaming misses (1)
* Update FirebaseFunctions/CHANGELOG.md
Co-authored-by: Andrew Heard <andrewheard@google.com>
* Update FirebaseFunctions/Sources/Functions.swift
Co-authored-by: Andrew Heard <andrewheard@google.com>
* Update FirebaseFunctions/Sources/Functions.swift
Co-authored-by: Andrew Heard <andrewheard@google.com>
* Update FirebaseFunctions/Sources/Functions.swift
Co-authored-by: Andrew Heard <andrewheard@google.com>
* Update FirebaseFunctions/Sources/Functions.swift
Co-authored-by: Andrew Heard <andrewheard@google.com>
* Update FirebaseFunctions/Sources/HTTPSCallableOptions.swift
Co-authored-by: Andrew Heard <andrewheard@google.com>
* [App Check] Always return fresh limitedUseToken (#11298)
Updated `limitedUseTokenWithCompletion:` to always return a fresh limited-used token in every invocation (removed the `ongoingLimitedUseTokenPromise` property).
---------
Co-authored-by: Nick Cooke <nickcooke@google.com>
Co-authored-by: Nick Cooke <36927374+ncooke3@users.noreply.github.com>
Co-authored-by: Andrew Heard <andrewheard@google.com>
* Add limited use token to FirAppeCheck Interface
* revise some naming
* remove extra promise and clean the logic for limitedUseToken
* ADD UNIT tests
* suppress style error
* style the file
* Fixed comments and still need to add one more test
* change testLimitedUseToken to uncached test and add error test too
* test in FIRAppCheckTestFile to make sure limited-use token is working
* style the file to pass checks
* style swift file to pass checks
* style swift file to pass checks
* style swift file to pass checks
* style swift file to pass checks
* Run scripts/style.sh to format AppDelegate.swift
Script updated in https://github.com/firebase/firebase-ios-sdk/pull/11097
* comments typo fixed
* Fixed typos and add desciption to changelog.md
* solve comments
* remove extra space
* add a spce in the title
---------
Co-authored-by: Andrew Heard <andrewheard@google.com>
Stopped synthesizing a backing instance variable for the `isTokenAutoRefreshEnabled` property in `FIRAppCheckSettings` because it is unused, resulting in a warning when "-Wunused-property-ivar" is enabled.
This resolves the error "FIRAppCheckSettings.m:92:1: error: ivar '_isTokenAutoRefreshEnabled' which backs the property is not referenced in this property's accessor [-Werror,-Wunused-property-ivar]" when building in google3 (where this warning is treated as an error).
* Initial API implementation
* Update CHANGELOG
* Update test imports
* Make API async/await friendly by default
* Make API async friendly by default 2
* Fix CI
* Remove async/await example to fix CI
* Edit comment spacing
* Keychain error handling
* API rename and tests
* Add comments to tests
* Add public errors to umbrella header
* Refactor remaining test logic
* Remove newline
* Review
* Fix import style
* Fix import style 2