Files
firebase-ios-sdk/FirebaseAuth.podspec
T
Nick Cooke 025ef90376 [FirebaseAuth] Expose non-public headers to Swift and build on iOS (#10755)
* Private header exposed to internal Swift impl via private module

* Include all non-public headers in private module map

* Add TODO and #if out import

* Prefer <...> imports and fix API visibility. See more...

- The private module map enables us to selectively expose non-public
  headers to Swift. Now, the internal APIs that were made public for the
  sake of exposing to Swift can be made internal again. Swift files that
  need access to non-public API should do the following:

    @_implementationOnly import FirebaseAuth_Private

- Additionally, any public header imported into a non-public header
  needs to use <...> syntax because the header is technically coming
  from a different module (FirebaseAuth rather than FirebaseAuth_Private).

* Fix import typo

* Style

* More progress. Building for CocoaPods. Not for SPM

* Remove 'MyPrivateClass.h'

* Generate private module map

* Generate private module map followup

* Re-enable testing spec

* Style

* Remove unneeded module.modulemap

* Revert "Remove unneeded module.modulemap"

This reverts commit 3ac44c3570.

* Adjust header import since FIRAuthBackend was moved

* Get library building on iOS

* Builds on iOS

* Revert private module map and update gitignore

* Add TODO

* Wrap FirebaseAuth_Private import with #if COCOAPODS

* Modularize script with arg[0] for podspec name

* Generalize script more and remove private module map

* Revert unintentionally checked in changes

* re-style @objc(...) qualifier

* Fix check

* Fix SPM build

* Change API back to what it was originally

* Fix copyright

* Better error handling in script
2023-07-11 16:09:03 -07:00

128 lines
4.9 KiB
Ruby

Pod::Spec.new do |s|
s.name = 'FirebaseAuth'
s.version = '10.12.0'
s.summary = 'Apple platform client for Firebase Authentication'
s.description = <<-DESC
Firebase Authentication allows you to manage your own account system without any backend code. It
supports email and password accounts, as well as several 3rd party authentication mechanisms.
DESC
s.homepage = 'https://firebase.google.com'
s.license = { :type => 'Apache-2.0', :file => 'LICENSE' }
s.authors = 'Google, Inc.'
s.source = {
:git => 'https://github.com/firebase/firebase-ios-sdk.git',
:tag => 'CocoaPods-' + s.version.to_s
}
s.social_media_url = 'https://twitter.com/Firebase'
ios_deployment_target = '11.0'
osx_deployment_target = '10.13'
tvos_deployment_target = '12.0'
watchos_deployment_target = '6.0'
s.swift_version = '5.3'
s.prepare_command = <<-CMD
ruby scripts/build_private_module_map.rb FirebaseAuth.podspec
CMD
s.ios.deployment_target = ios_deployment_target
s.osx.deployment_target = osx_deployment_target
s.tvos.deployment_target = tvos_deployment_target
s.watchos.deployment_target = watchos_deployment_target
s.cocoapods_version = '>= 1.4.0'
s.prefix_header_file = false
source = 'FirebaseAuth/Sources/'
s.source_files = [
'FirebaseAuth/Sources/Swift/**/*.swift',
source + '**/*.[mh]',
'FirebaseCore/Extension/*.h',
'FirebaseAuth/Interop/*.h',
'FirebaseAppCheck/Interop/*.h',
]
s.module_map = source + 'Public/FirebaseAuth/FirebaseAuth.modulemap'
s.public_header_files = source + 'Public/FirebaseAuth/*.h'
# All headers except the ones in the `Public` should be private.
s.private_header_files = Dir['FirebaseAuth/Sources/**/*.h']
.reject{ |f| f['FirebaseAuth/Sources/Public/'] } + [
'FirebaseCore/Extension/*.h',
'FirebaseAuth/Interop/*.h'
]
s.preserve_paths = [
'FirebaseAuth/README.md',
'FirebaseAuth/CHANGELOG.md'
]
s.pod_target_xcconfig = {
'GCC_C_LANGUAGE_STANDARD' => 'c99',
# The second path is to find FirebaseAuth-Swift.h from a pod gen project
'HEADER_SEARCH_PATHS' => '"${PODS_TARGET_SRCROOT}" "${OBJECT_FILE_DIR_normal}/${NATIVE_ARCH_ACTUAL}"',
# Point to the private module map.
'MODULEMAP_PRIVATE_FILE' =>
'${PODS_TARGET_SRCROOT}/FirebaseAuth/Sources/FirebaseAuth.private.modulemap'
}
s.framework = 'Security'
s.ios.framework = 'SafariServices'
s.dependency 'FirebaseAppCheckInterop', '~> 10.0'
s.dependency 'FirebaseCore', '~> 10.0'
s.dependency 'GoogleUtilities/AppDelegateSwizzler', '~> 7.8'
s.dependency 'GoogleUtilities/Environment', '~> 7.8'
s.dependency 'GTMSessionFetcher/Core', '>= 2.1', '< 4.0'
s.test_spec 'unit' do |unit_tests|
unit_tests.scheme = { :code_coverage => true }
# Unit tests can't run on watchOS.
unit_tests.platforms = {
:ios => ios_deployment_target,
:osx => osx_deployment_target,
:tvos => tvos_deployment_target
}
unit_tests.source_files = 'FirebaseAuth/Tests/Unit/*.[mh]'
unit_tests.osx.exclude_files = [
'FirebaseAuth/Tests/Unit/FIRAuthAPNSTokenManagerTests.m',
'FirebaseAuth/Tests/Unit/FIRAuthAPNSTokenTests.m',
'FirebaseAuth/Tests/Unit/FIRAuthAppCredentialManagerTests.m',
'FirebaseAuth/Tests/Unit/FIRAuthNotificationManagerTests.m',
'FirebaseAuth/Tests/Unit/FIRAuthURLPresenterTests.m',
'FirebaseAuth/Tests/Unit/FIREmailLink*',
'FirebaseAuth/Tests/Unit/FIRPhoneAuthProviderTests.m',
'FirebaseAuth/Tests/Unit/FIRSendVerificationCode*',
'FirebaseAuth/Tests/Unit/FIRSignInWithGameCenterTests.m',
'FirebaseAuth/Tests/Unit/FIRVerifyClient*',
'FirebaseAuth/Tests/Unit/FIRVerifyPhoneNumber*',
'FirebaseAuth/Tests/Unit/FIROAuthProviderTests.m',
'FirebaseAuth/Tests/Unit/FIRMultiFactorResolverTests.m',
]
unit_tests.tvos.exclude_files = [
'FirebaseAuth/Tests/Unit/FIRAuthAPNSTokenManagerTests.m',
'FirebaseAuth/Tests/Unit/FIRAuthNotificationManagerTests.m',
'FirebaseAuth/Tests/Unit/FIRAuthURLPresenterTests.m',
'FirebaseAuth/Tests/Unit/FIREmailLink*',
'FirebaseAuth/Tests/Unit/FIRPhoneAuthProviderTests.m',
'FirebaseAuth/Tests/Unit/FIRSendVerificationCode*',
'FirebaseAuth/Tests/Unit/FIRSignInWithGameCenterTests.m',
'FirebaseAuth/Tests/Unit/FIRVerifyClient*',
'FirebaseAuth/Tests/Unit/FIRVerifyPhoneNumber*',
'FirebaseAuth/Tests/Unit/FIROAuthProviderTests.m',
'FirebaseAuth/Tests/Unit/FIRMultiFactorResolverTests.m',
]
# app_host is needed for tests with keychain
unit_tests.requires_app_host = true
unit_tests.dependency 'OCMock'
# This pre-processor directive is used to selectively disable keychain
# related code that blocks unit testing on macOS.
s.osx.pod_target_xcconfig = {
'GCC_PREPROCESSOR_DEFINITIONS' => 'FIREBASE_AUTH_MACOS_TESTING=1'
}
end
end