mirror of
https://github.com/google/GoogleDataTransport
synced 2026-11-09 22:25:53 +05:45
* Squashed commit of the following: commit 563db8b3062a8361b24e7fa1f4a23253d9dbca3f Author: Maksym Malyhin <mmaksym@google.com> Date: Tue Jan 12 18:02:01 2021 -0500 GDT: upload URL request steps wrapped into promises (#6771) * Fix build * Rename GDTCCTUploader2.m back to GDTCCTUploader.m * GDT: Add GoogleUtilities/Environment dependency * WIP * Remove unnecessary logic * next upload time storage implementation * GDTCCTUploader debug logs and test helpers * URL request steps * Fix modular FBLPromise imports * GDT GUL dependency in SwiftPM * Cleanup * Formatting * Update dependency * Fix WatchOS app * Update imports * [WIP] Integration tests with a test server * Remove GDTCCTUploadCompleteNotification * GDTCCTIntegrationTest: use test server instead of a real server. * Fix GDTCCTUploadOperation.uploadAttempted flag * Fix GDTCCTUploader waitForUploadFinished method * GDTCORIntegrationTestEvent: wait for the final upload to finish before stopping test server * style * Cleanup * merge fix * Fix waitForUploadFinishedWithTimeout: * Cleanup * GDTCCTUploaderTest: wait for operation finish before tearDown * GDTCCTIntegrationTest: enable debug logs * Increase timeout * Debug logs on CI * Handle not started operation cancellation properly * GDTCOREncodeArchive: fix log messages * Revert debug logging * ./scripts/style.sh * ./scripts/style.sh with clang-format 11.0.1 * Enable verbose pod lib lint logs * fail-fast disable retry * GDTCCTUploadOperation: set proper state for not stated operation without KVO. * revert verbose logs * Comments commit 28f561f459fe4c3e926750cf92c960a5d83ed160 Merge: 382eee99e 3d84b9985 Author: Maksym Malyhin <mmaksym@google.com> Date: Fri Jan 8 15:20:44 2021 -0500 Merge remote-tracking branch 'origin/master' into gdt-promises-main commit 382eee99ecc6559e86d1104198c069cf080229c9 Author: Maksym Malyhin <mmaksym@google.com> Date: Thu Dec 10 10:22:19 2020 -0500 Fix merge errors commit 52b3a31d6a4f1c1efeacc4e5b195c62133eb2835 Merge: 8e1c203b7 3720a72ba Author: Maksym Malyhin <mmaksym@google.com> Date: Thu Dec 10 10:12:52 2020 -0500 Merge branch 'master' into mm/gdt-promise-merge commit 8e1c203b7ada390fa3ee4ccdcea396109368ee6a Merge: 8881f2301 f0a8e74ee Author: Maksym Malyhin <mmaksym@google.com> Date: Wed Nov 4 15:23:53 2020 -0500 Merge remote-tracking branch 'origin/master' into gdt-promises-main commit 8881f2301a9952cccd134565edd6ac9f4dce3445 Merge: c0812aeb3 b05be68db Author: Maksym Malyhin <mmaksym@google.com> Date: Thu Oct 29 17:02:02 2020 -0400 Merge remote-tracking branch 'origin/master' into gdt-promises-main commit c0812aeb38e4aef1f9976bc1928504d9331fbcd9 Merge: 2ac027d9d ff23d08f6 Author: Maksym Malyhin <mmaksym@google.com> Date: Fri Oct 16 16:23:53 2020 -0400 Merge branch 'gdt-promises-main' of github.com:firebase/firebase-ios-sdk into gdt-promises-main commit 2ac027d9d3f8dbb8fb2e5b4c5c89f9506bd149d5 Merge: ef4385b71 7e70a6dd0 Author: Maksym Malyhin <mmaksym@google.com> Date: Fri Oct 16 16:23:40 2020 -0400 Merge remote-tracking branch 'origin/master' into gdt-promises-main commit ff23d08f6901edb167d8e9ed1441b3846f43e315 Author: Maksym Malyhin <mmaksym@google.com> Date: Fri Oct 16 13:43:07 2020 -0400 Rename GDTCCTUploader2.m back to GDTCCTUploader.m (#6748) * Fix build * Rename GDTCCTUploader2.m back to GDTCCTUploader.m commit ef4385b71c67e7ab4c24e125d2dd6f534ce9af68 Author: Maksym Malyhin <mmaksym@google.com> Date: Thu Oct 15 13:39:33 2020 -0400 GDT: wrap and bind upload operation using promises (#6728) * Fix header imports * Wrap and chain batching operations * Fix test compilation * todo * Cleanup * Storage condition * Recover GDTCCTUploaderTest * Revert unintended change * NDEBUG TODO * Interupt upload erlier when storage is missing * style commit 0c2bf2aa37d82ee7d77147c9dde46768d883919e Merge: f84069ae8 1c79d9bce Author: Maksym Malyhin <mmaksym@google.com> Date: Wed Oct 14 09:30:45 2020 -0400 Merge remote-tracking branch 'origin/master' into gdt-promises-main commit f84069ae8a9b1b3ecbc85f158e44637f9530639c Merge: 5d96f9699 ec14d8252 Author: Maksym Malyhin <mmaksym@google.com> Date: Thu Oct 8 15:19:55 2020 -0400 Merge branch 'gdt-promises-main' of github.com:firebase/firebase-ios-sdk into gdt-promises-main commit 5d96f9699b3b72cf5a6413083890b9f3d656d928 Merge: f6595a0c8 bff6b664d Author: Maksym Malyhin <mmaksym@google.com> Date: Thu Oct 8 15:19:30 2020 -0400 Merge remote-tracking branch 'origin/master' into gdt-promises-main commit ec14d825245591abb61963f7962cd9ef15e34299 Author: Maksym Malyhin <mmaksym@google.com> Date: Tue Sep 29 13:53:53 2020 -0400 Move common state from GDTCCTUploadOperation to GDTCCTUploader (#6587) * Move URLs from `GDTCCTUploadOperation` to `GDTCCTUploader` * Move next upload time tracking from `GDTCCTUploadOperation` to `GDTCCTUploader` * Rename back GDTCCTUploader2.m -> GDTCCTUploader.m * Revert "Rename back GDTCCTUploader2.m -> GDTCCTUploader.m" This reverts commit a4946d2524846917bf7b9c5e565f015ffa311bcd. * ./scripts/style.sh * Camel case * Cleanup * Move optional API key to metadata provider * Use a common dispatch queue for upload operations commit f6595a0c8ed9d7289746b1beff68b12a64232ef7 Merge: 27595267e d75180498 Author: Maksym Malyhin <mmaksym@google.com> Date: Mon Sep 28 13:03:53 2020 -0400 Merge branch 'gdt-promises-main' of github.com:firebase/firebase-ios-sdk into gdt-promises-main commit 27595267e716d9cb07a011f542d78455af2a53ae Merge: 17a65e58c 38be2cc8c Author: Maksym Malyhin <mmaksym@google.com> Date: Mon Sep 28 13:03:28 2020 -0400 Merge remote-tracking branch 'origin/master' into gdt-promises-main commit d7518049885ab82e164fcc7a05941fe89952bf42 Author: Maksym Malyhin <mmaksym@google.com> Date: Thu Sep 24 15:48:02 2020 -0400 GDTCORStorage: promise API wrapper (#6555) commit 17a65e58c5e62befcc660b70c564564447d30613 Merge: eadc50297 0c6dd55ad Author: Maksym Malyhin <mmaksym@google.com> Date: Thu Sep 24 10:24:29 2020 -0400 Merge remote-tracking branch 'origin/master' into gdt-promises-main commit eadc502973bb6632bd3ba04527b509820be99e7e Author: Maksym Malyhin <mmaksym@google.com> Date: Thu Sep 24 10:03:48 2020 -0400 GDTCCTUploader: use NSOperationQueue to coordinate uploads (#6536) * File rename GDTCCTUploader -> GDTCCTUploadOperation * GDTCCTUploader: use operation queue to coordinate uploads * Try to rename original file to improve diff * File headers and TODOs * merge errors * More detailed and useful integration tests (#4) * [WIP] decode request in integration tests * Integration tests - validate all events payloads are sent * Fix SPM * Clean storage before tests * style * Cleanup and comments. * More comments * Validate log source(mappingID) * Fix FBLPromises.h import * cleanup .gitignore * fix .gitignore * Cleanup and comments (#6) * Strongify references in block * Don't hardcode redirect URL. * Update/remove outdated TODOs. Comments and API docs. * GDTCCTUploaderTest: respect next requet wait time for all target except high priority ones * Fix flaky tests, disable redundant tests * Respect Retry-After header (#7) * [WIP] Retry-After header support * GDTCCTUploaderTest: tests for Retry-After and failure cases * Cleanup * Finish background task. * revert generate_project.sh * style * Fix analyzer warning * statusCode: update comments; stricter validation * Remove crashlytics exception from next request wait time policy * GDTCCTUploaderTest: reduce not necessary timeouts to seepd up tests * Bump version to 8.3.0 * Changelog * Bump GoogleUtilities version * API docs and comments * scripts/style.sh
191 lines
8.3 KiB
Ruby
191 lines
8.3 KiB
Ruby
Pod::Spec.new do |s|
|
|
s.name = 'GoogleDataTransport'
|
|
s.version = '8.3.0'
|
|
s.summary = 'Google iOS SDK data transport.'
|
|
|
|
s.description = <<-DESC
|
|
Shared library for iOS SDK data transport needs.
|
|
DESC
|
|
|
|
s.homepage = 'https://developers.google.com/'
|
|
s.license = { :type => 'Apache', :file => 'LICENSE' }
|
|
s.authors = 'Google, Inc.'
|
|
s.source = {
|
|
:git => 'https://github.com/google/GoogleDataTransport.git',
|
|
:tag => 'CocoaPods-' + s.version.to_s
|
|
}
|
|
|
|
ios_deployment_target = '9.0'
|
|
osx_deployment_target = '10.12'
|
|
tvos_deployment_target = '10.0'
|
|
watchos_deployment_target = '6.0'
|
|
|
|
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
|
|
|
|
# To develop or run the tests, >= 1.8.0 must be installed.
|
|
s.cocoapods_version = '>= 1.4.0'
|
|
|
|
s.prefix_header_file = false
|
|
|
|
s.source_files = ['GoogleDataTransport/GDTCORLibrary/**/*',
|
|
'GoogleDataTransport/GDTCCTLibrary/**/*']
|
|
s.public_header_files = 'GoogleDataTransport/GDTCORLibrary/Public/GoogleDataTransport/*.h'
|
|
s.ios.frameworks = 'SystemConfiguration', 'CoreTelephony'
|
|
s.osx.frameworks = 'SystemConfiguration', 'CoreTelephony'
|
|
s.tvos.frameworks = 'SystemConfiguration'
|
|
|
|
s.libraries = ['z']
|
|
|
|
s.dependency 'GoogleUtilities/Environment', '~> 7.2'
|
|
s.dependency 'nanopb', '~> 2.30907.0'
|
|
s.dependency 'PromisesObjC', '~> 1.2'
|
|
|
|
header_search_paths = {
|
|
'HEADER_SEARCH_PATHS' => '"${PODS_TARGET_SRCROOT}/"'
|
|
}
|
|
|
|
s.pod_target_xcconfig = {
|
|
'GCC_C_LANGUAGE_STANDARD' => 'c99',
|
|
'CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY' => 'YES',
|
|
'GCC_PREPROCESSOR_DEFINITIONS' =>
|
|
# The nanopb pod sets these defs, so we must too. (We *do* require 16bit
|
|
# (or larger) fields, so we'd have to set at least PB_FIELD_16BIT
|
|
# anyways.)
|
|
'PB_FIELD_32BIT=1 PB_NO_PACKED_STRUCTS=1 PB_ENABLE_MALLOC=1 GDTCOR_VERSION=' + s.version.to_s,
|
|
}.merge(header_search_paths)
|
|
|
|
common_test_sources = ['GoogleDataTransport/GDTCORTests/Common/**/*.{h,m}']
|
|
|
|
# Test app specs
|
|
if ENV['GDT_DEV'] && ENV['GDT_DEV'] == '1' then
|
|
s.app_spec 'TestApp' do |app_spec|
|
|
app_spec.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
|
|
app_spec.source_files = [
|
|
'GoogleDataTransport/GDTTestApp/*.swift',
|
|
'GoogleDataTransport/GDTCORLibrary/Internal/GDTCORRegistrar.h',
|
|
'GoogleDataTransport/GDTCORLibrary/Internal/GDTCORUploader.h',
|
|
'GoogleDataTransport/GDTCORTests/Common/Categories/GDTCORFlatFileStorage+Testing.h',
|
|
'GoogleDataTransport/GDTCORTests/Unit/Helpers/*.[hm]',
|
|
'GoogleDataTransport/GDTTestApp/Bridging-Header.h',
|
|
]
|
|
|
|
app_spec.ios.resources = ['GoogleDataTransport/GDTTestApp/ios/*.storyboard']
|
|
app_spec.macos.resources = ['GoogleDataTransport/GDTTestApp/macos/*.storyboard']
|
|
app_spec.tvos.resources = ['GoogleDataTransport/GDTTestApp/tvos/*.storyboard']
|
|
app_spec.info_plist = {
|
|
'UILaunchStoryboardName' => 'Main',
|
|
'UIMainStoryboardFile' => 'Main',
|
|
'NSMainStoryboardFile' => 'Main'
|
|
}
|
|
|
|
app_spec.pod_target_xcconfig = {
|
|
'SWIFT_OBJC_BRIDGING_HEADER' => '$(PODS_TARGET_SRCROOT)/GoogleDataTransport/GDTTestApp/Bridging-Header.h'
|
|
}
|
|
end
|
|
end
|
|
|
|
# Unit test specs
|
|
s.test_spec 'Tests-Unit' do |test_spec|
|
|
test_spec.scheme = { :code_coverage => true }
|
|
test_spec.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
|
|
test_spec.requires_app_host = false
|
|
test_spec.source_files = ['GoogleDataTransport/GDTCORTests/Unit/**/*.{h,m}'] + common_test_sources
|
|
test_spec.pod_target_xcconfig = header_search_paths
|
|
end
|
|
|
|
s.test_spec 'Tests-Lifecycle' do |test_spec|
|
|
test_spec.scheme = { :code_coverage => true }
|
|
test_spec.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
|
|
test_spec.requires_app_host = false
|
|
test_spec.source_files = ['GoogleDataTransport/GDTCORTests/Lifecycle/**/*.{h,m}'] + common_test_sources
|
|
test_spec.pod_target_xcconfig = header_search_paths
|
|
end
|
|
|
|
# Integration test specs
|
|
s.test_spec 'Tests-Integration' do |test_spec|
|
|
test_spec.scheme = { :code_coverage => true }
|
|
test_spec.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
|
|
test_spec.requires_app_host = false
|
|
test_spec.source_files = ['GoogleDataTransport/GDTCORTests/Integration/**/*.{h,m}'] + common_test_sources
|
|
test_spec.pod_target_xcconfig = header_search_paths
|
|
test_spec.dependency 'GCDWebServer'
|
|
end
|
|
|
|
# Monkey test specs TODO(mikehaney24): Uncomment when travis is running >= cocoapods-1.8.0
|
|
if ENV['GDT_DEV'] && ENV['GDT_DEV'] == '1' then
|
|
s.test_spec 'Tests-Monkey' do |test_spec|
|
|
test_spec.scheme = { :code_coverage => true }
|
|
test_spec.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
|
|
test_spec.requires_app_host = true
|
|
test_spec.app_host_name = 'GoogleDataTransport/TestApp'
|
|
test_spec.dependency 'GoogleDataTransport/TestApp'
|
|
test_spec.source_files = ['GoogleDataTransport/GDTCORTests/Monkey/**/*.{swift}']
|
|
test_spec.info_plist = {
|
|
'GDT_MONKEYTEST' => '1'
|
|
}
|
|
end
|
|
end
|
|
|
|
# CCT Tests follow
|
|
if ENV['GDT_DEV'] && ENV['GDT_DEV'] == '1' then
|
|
s.app_spec 'CCTTestApp' do |app_spec|
|
|
app_spec.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
|
|
app_spec.source_files = 'GoogleDataTransport/GDTCCTTestApp/**/*.swift'
|
|
app_spec.ios.resources = ['GoogleDataTransport/GDTCCTTestApp/ios/*.storyboard']
|
|
app_spec.macos.resources = ['GoogleDataTransport/GDTCCTTestApp/macos/*.storyboard']
|
|
app_spec.tvos.resources = ['GoogleDataTransport/GDTCCTTestApp/tvos/*.storyboard']
|
|
app_spec.dependency 'SwiftProtobuf'
|
|
app_spec.info_plist = {
|
|
'UILaunchStoryboardName' => 'Main',
|
|
'UIMainStoryboardFile' => 'Main',
|
|
'NSMainStoryboardFile' => 'Main'
|
|
}
|
|
end
|
|
end
|
|
|
|
common_cct_test_sources = ['GoogleDataTransport/GDTCCTTests/Common/**/*.{h,m}']
|
|
|
|
# Test specs
|
|
s.test_spec 'CCT-Tests-Unit' do |test_spec|
|
|
test_spec.scheme = { :code_coverage => true }
|
|
test_spec.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
|
|
test_spec.requires_app_host = false
|
|
test_spec.source_files = ['GoogleDataTransport/GDTCCTTests/Unit/**/*.{h,m}'] + common_cct_test_sources + common_test_sources
|
|
test_spec.resources = ['GoogleDataTransport/GDTCCTTests/Data/**/*']
|
|
test_spec.pod_target_xcconfig = header_search_paths
|
|
test_spec.dependency 'GCDWebServer'
|
|
end
|
|
|
|
s.test_spec 'CCT-Tests-Integration' do |test_spec|
|
|
test_spec.scheme = { :code_coverage => true }
|
|
test_spec.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
|
|
test_spec.requires_app_host = false
|
|
test_spec.source_files = [
|
|
'GoogleDataTransport/GDTCCTTests/Integration/**/*.{h,m}',
|
|
'GoogleDataTransport/GDTCCTTests/Unit/TestServer/GDTCCTTestServer.{h,m}',
|
|
'GoogleDataTransport/GDTCORTests/Common/Categories/GDTCORFlatFileStorage+Testing.{h,m}'
|
|
] + common_cct_test_sources
|
|
test_spec.resources = ['GoogleDataTransport/GDTCCTTests/Data/**/*']
|
|
test_spec.pod_target_xcconfig = header_search_paths
|
|
test_spec.dependency 'GCDWebServer'
|
|
end
|
|
|
|
# Monkey test specs, only enabled for development.
|
|
if ENV['GDT_DEV'] && ENV['GDT_DEV'] == '1' then
|
|
s.test_spec 'CCT-Tests-Monkey' do |test_spec|
|
|
test_spec.scheme = { :code_coverage => true }
|
|
test_spec.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
|
|
test_spec.requires_app_host = true
|
|
test_spec.app_host_name = 'GoogleDataTransport/CCTTestApp'
|
|
test_spec.dependency 'GoogleDataTransport/CCTTestApp'
|
|
test_spec.source_files = ['GoogleDataTransport/GDTCCTTests/Monkey/**/*.{swift}'] + common_cct_test_sources
|
|
test_spec.info_plist = {
|
|
'GDT_MONKEYTEST' => '1'
|
|
}
|
|
end
|
|
end
|
|
end
|