diff --git a/ClientApp/Podfile b/ClientApp/Podfile deleted file mode 100644 index 3a69069714f..00000000000 --- a/ClientApp/Podfile +++ /dev/null @@ -1,46 +0,0 @@ -source 'https://github.com/firebase/SpecsDev.git' -source 'https://github.com/firebase/SpecsStaging.git' -source 'https://cdn.cocoapods.org/' - -target 'ClientApp-CocoaPods' do - platform :ios, '11.0' - - use_frameworks! - - pod 'FirebaseCore', :path => '../' - pod 'FirebaseInstallations', :path => '../' - pod 'FirebaseAnalytics' # Binary pods don't work with `:path`. - pod 'FirebaseAnalyticsOnDeviceConversion', :path => '../' - pod 'FirebaseABTesting', :path => '../' - pod 'FirebaseAppCheck', :path => '../' - pod 'FirebaseRemoteConfig', :path => '../' - pod 'FirebaseRemoteConfigSwift', :path => '../' - pod 'FirebaseRemoteConfigInterop', :path => '../' - pod 'FirebaseAppDistribution', :path => '../' - pod 'FirebaseAuth', :path => '../' - pod 'FirebaseCrashlytics', :path => '../' - pod 'FirebaseDatabase', :path => '../' - pod 'FirebaseDatabaseSwift', :path => '../' - pod 'FirebaseDynamicLinks', :path => '../' - pod 'FirebaseFirestore', :path => '../' - pod 'FirebaseFirestoreSwift', :path => '../' - pod 'FirebaseFunctions', :path => '../' - pod 'FirebaseInAppMessaging', :path => '../' - pod 'FirebaseMessaging', :path => '../' - pod 'FirebasePerformance', :path => '../' - pod 'FirebaseStorage', :path => '../' - pod 'FirebaseMLModelDownloader', :path => '../' - pod 'Firebase', :path => '../' -end - -target 'ClientApp-CocoaPods-iOS13' do - platform :ios, '13.0' - - use_frameworks! - - pod 'FirebaseAnalytics' # Binary pods don't work with `:path`. - pod 'FirebaseAnalyticsSwift', :path => '../' # Requires iOS 13.0+ - pod 'FirebaseInAppMessaging', :path => '../' - pod 'FirebaseInAppMessagingSwift', :path => '../' # Requires iOS 13.0+ - -end diff --git a/CocoapodsIntegrationTest/TestEnvironments/Cocoapods_multiprojects_frameworks/Podfile b/CocoapodsIntegrationTest/TestEnvironments/Cocoapods_multiprojects_frameworks/Podfile deleted file mode 100644 index 9741e179cf3..00000000000 --- a/CocoapodsIntegrationTest/TestEnvironments/Cocoapods_multiprojects_frameworks/Podfile +++ /dev/null @@ -1,37 +0,0 @@ -source 'https://github.com/firebase/SpecsDev.git' -source 'https://github.com/firebase/SpecsStaging.git' -source 'https://cdn.cocoapods.org/' - -# Uncomment the next line to define a global platform for your project -platform :ios, '11.0' - -target 'CocoapodsIntegrationTest' do - # Comment the next line if you don't want to use dynamic frameworks - use_frameworks! - pod 'FirebaseABTesting', :path => '../' - pod 'FirebaseAppDistribution', :path => '../' - pod 'FirebaseAppCheckInterop', :path => '../' - pod 'FirebaseCore', :path => '../' - pod 'FirebaseCoreExtension', :path => '../' - pod 'FirebaseCoreInternal', :path => '../' - pod 'FirebaseCrashlytics', :path => '../' - pod 'FirebaseAuth', :path => '../' - pod 'FirebaseAuthInterop', :path => '../' - pod 'FirebaseDatabase', :path => '../' - pod 'FirebaseDynamicLinks', :path => '../' - pod 'FirebaseFirestore', :path => '../' - pod 'FirebaseFunctions', :path => '../' - pod 'FirebaseInAppMessaging', :path => '../' - pod 'FirebaseInstallations', :path => '../' - pod 'FirebaseMessaging', :path => '../' - pod 'FirebaseMessagingInterop', :path => '../' - pod 'FirebaseRemoteConfigInterop', :path => '../' - pod 'FirebasePerformance', :path => '../' - pod 'FirebaseStorage', :path => '../' -end - -# Using the new speed-enhancing features available with CocoaPods 1.7+ -# [sudo] gem install cocoapods --pre -install! 'cocoapods', - :generate_multiple_pod_projects => true, - :incremental_installation => true diff --git a/Crashlytics/Crashlytics/Controllers/FIRCLSRolloutsPersistenceManager.h b/Crashlytics/Crashlytics/Controllers/FIRCLSRolloutsPersistenceManager.h index 83c7f25ca8b..c84c4d34c70 100644 --- a/Crashlytics/Crashlytics/Controllers/FIRCLSRolloutsPersistenceManager.h +++ b/Crashlytics/Crashlytics/Controllers/FIRCLSRolloutsPersistenceManager.h @@ -16,7 +16,7 @@ @import FirebaseCrashlyticsSwift; #else // Swift Package Manager #import -#endif // Cocoapod +#endif // CocoaPods @interface FIRCLSRolloutsPersistenceManager : NSObject @@ -26,4 +26,5 @@ - (void)updateRolloutsStateToPersistenceWithRollouts:(NSData *_Nonnull)rollouts reportID:(NSString *_Nonnull)reportID; +- (void)debugLog:(NSString *_Nonnull)messages; @end diff --git a/Crashlytics/Crashlytics/Controllers/FIRCLSRolloutsPersistenceManager.m b/Crashlytics/Crashlytics/Controllers/FIRCLSRolloutsPersistenceManager.m index c0c0a38ed6b..21094df4281 100644 --- a/Crashlytics/Crashlytics/Controllers/FIRCLSRolloutsPersistenceManager.m +++ b/Crashlytics/Crashlytics/Controllers/FIRCLSRolloutsPersistenceManager.m @@ -18,11 +18,12 @@ #import "Crashlytics/Crashlytics/Helpers/FIRCLSLogger.h" #import "Crashlytics/Crashlytics/Models/FIRCLSFileManager.h" #import "Crashlytics/Crashlytics/Models/FIRCLSInternalReport.h" + #if SWIFT_PACKAGE @import FirebaseCrashlyticsSwift; #else // Swift Package Manager #import -#endif // Cocoapod +#endif // CocoaPods @interface FIRCLSRolloutsPersistenceManager : NSObject @property(nonatomic, readonly) FIRCLSFileManager *fileManager; @@ -58,4 +59,8 @@ - (void)updateRolloutsStateToPersistenceWithRollouts:(NSData *_Nonnull)rollouts [rolloutsFile writeData:newLineData]; }); } + +- (void)debugLog:(NSString *_Nonnull)messages { + FIRCLSDebugLog(messages); +} @end diff --git a/Crashlytics/Crashlytics/FIRCrashlytics.m b/Crashlytics/Crashlytics/FIRCrashlytics.m index 1e6e93e540f..85502b2a9d9 100644 --- a/Crashlytics/Crashlytics/FIRCrashlytics.m +++ b/Crashlytics/Crashlytics/FIRCrashlytics.m @@ -65,7 +65,7 @@ @import FirebaseCrashlyticsSwift; #else // Swift Package Manager #import -#endif // Cocoapod +#endif // CocoaPods #if TARGET_OS_IPHONE #import diff --git a/Crashlytics/Crashlytics/Handlers/FIRCLSException.mm b/Crashlytics/Crashlytics/Handlers/FIRCLSException.mm index 5a43a83834a..b92cd9848dd 100644 --- a/Crashlytics/Crashlytics/Handlers/FIRCLSException.mm +++ b/Crashlytics/Crashlytics/Handlers/FIRCLSException.mm @@ -279,7 +279,7 @@ void FIRCLSExceptionRecord(FIRCLSExceptionType type, // Create new report and copy into it the current state of custom keys and log and the sdk.log, // binary_images.clsrecord, and metadata.clsrecord files. - // also copy rollouts.clsrecord if applicable. + // Also copy rollouts.clsrecord if applicable. NSError *error = nil; BOOL copied = [fileManager.underlyingFileManager copyItemAtPath:currentReportPath toPath:newReportPath diff --git a/Crashlytics/Crashlytics/Rollouts/CrashlyticsRemoteConfigManager.swift b/Crashlytics/Crashlytics/Rollouts/CrashlyticsRemoteConfigManager.swift index b16396fe59c..d6d5cb16b82 100644 --- a/Crashlytics/Crashlytics/Rollouts/CrashlyticsRemoteConfigManager.swift +++ b/Crashlytics/Crashlytics/Rollouts/CrashlyticsRemoteConfigManager.swift @@ -18,6 +18,7 @@ import Foundation @objc(FIRCLSPersistenceLog) public protocol CrashlyticsPersistenceLog { func updateRolloutsStateToPersistence(rollouts: Data, reportID: String) + func debugLog(message: String) } @objc(FIRCLSRemoteConfigManager) @@ -49,7 +50,7 @@ public class CrashlyticsRemoteConfigManager: NSObject { _rolloutAssignment = normalizeRolloutAssignment(assignments: Array(rolloutsState.assignments)) lock.unlock() - // writring to persistence + // Writring to persistence if let rolloutsData = getRolloutsStateEncodedJsonData() { persistenceDelegate.updateRolloutsStateToPersistence( @@ -60,7 +61,7 @@ public class CrashlyticsRemoteConfigManager: NSObject { } /// Return string format: [{RolloutAssignment1}, {RolloutAssignment2}, {RolloutAssignment3}...] - /// This will get insert into each clsrcord for non-fatal events. + /// This will get inserted into each clsrcord for non-fatal events. /// Return a string type because later `FIRCLSFileWriteStringUnquoted` takes string as input @objc public func getRolloutAssignmentsEncodedJsonString() -> String? { let encodeData = getRolloutAssignmentsEncodedJsonData() @@ -68,8 +69,12 @@ public class CrashlyticsRemoteConfigManager: NSObject { return String(data: data, encoding: .utf8) } - // TODO(themisw): Hook into core logging functions - debugPrint("Failed to serialize rollouts", encodeData ?? "nil") + let debugInfo = encodeData?.debugDescription ?? "nil" + persistenceDelegate.debugLog(message: String( + format: "Failed to serialize rollouts: %@", + arguments: [debugInfo] + )) + return nil } } @@ -78,7 +83,10 @@ private extension CrashlyticsRemoteConfigManager { func normalizeRolloutAssignment(assignments: [RolloutAssignment]) -> [RolloutAssignment] { var validatedAssignments = assignments if assignments.count > CrashlyticsRemoteConfigManager.maxRolloutAssignments { - debugPrint("Rollouts excess the maximum number of assignments can pass to Crashlytics") + persistenceDelegate + .debugLog( + message: "Rollouts excess the maximum number of assignments can pass to Crashlytics" + ) validatedAssignments = Array(assignments[.. -#endif // Cocoapod +#endif // CocoaPods #import diff --git a/Crashlytics/UnitTests/FIRCLSRolloutsPersistenceManagerTests.m b/Crashlytics/UnitTests/FIRCLSRolloutsPersistenceManagerTests.m index 70e99939ea8..aec030d7538 100644 --- a/Crashlytics/UnitTests/FIRCLSRolloutsPersistenceManagerTests.m +++ b/Crashlytics/UnitTests/FIRCLSRolloutsPersistenceManagerTests.m @@ -23,7 +23,7 @@ @import FirebaseCrashlyticsSwift; #else // Swift Package Manager #import -#endif // Cocoapod +#endif // CocoaPods NSString *reportId = @"1234567"; diff --git a/FirebaseCrashlytics.podspec b/FirebaseCrashlytics.podspec index c7b05afcdef..e67e886b399 100644 --- a/FirebaseCrashlytics.podspec +++ b/FirebaseCrashlytics.podspec @@ -62,7 +62,7 @@ Pod::Spec.new do |s| s.dependency 'FirebaseCore', '~> 10.5' s.dependency 'FirebaseInstallations', '~> 10.0' s.dependency 'FirebaseSessions', '~> 10.5' - s.dependency 'FirebaseRemoteConfigInterop', '~> 10.20' + s.dependency 'FirebaseRemoteConfigInterop', '~> 10.23' s.dependency 'PromisesObjC', '~> 2.1' s.dependency 'GoogleDataTransport', '~> 9.2' s.dependency 'GoogleUtilities/Environment', '~> 7.8' diff --git a/FirebaseRemoteConfig.podspec b/FirebaseRemoteConfig.podspec index 200164e466e..9767a218a60 100644 --- a/FirebaseRemoteConfig.podspec +++ b/FirebaseRemoteConfig.podspec @@ -56,7 +56,7 @@ app update. s.dependency 'FirebaseInstallations', '~> 10.0' s.dependency 'GoogleUtilities/Environment', '~> 7.8' s.dependency 'GoogleUtilities/NSData+zlib', '~> 7.8' - s.dependency 'FirebaseRemoteConfigInterop', '~> 10.20' + s.dependency 'FirebaseRemoteConfigInterop', '~> 10.23' s.test_spec 'unit' do |unit_tests| unit_tests.scheme = { :code_coverage => true } diff --git a/FirebaseRemoteConfigInterop.podspec b/FirebaseRemoteConfigInterop.podspec index f2ce8cec9d6..86b86b24e6a 100644 --- a/FirebaseRemoteConfigInterop.podspec +++ b/FirebaseRemoteConfigInterop.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'FirebaseRemoteConfigInterop' - s.version = '10.20.0' + s.version = '10.23.0' s.summary = 'Interfaces that allow other Firebase SDKs to use Remote Config functionality.' s.description = <<-DESC @@ -21,7 +21,7 @@ Pod::Spec.new do |s| } s.swift_version = '5.3' - s.cocoapods_version = '>= 1.4.0' + s.cocoapods_version = '>= 1.12.0' s.prefix_header_file = false s.social_media_url = 'https://twitter.com/Firebase' diff --git a/IntegrationTesting/ClientApp/Podfile b/IntegrationTesting/ClientApp/Podfile index 7efd2cdd1ea..2a72d478739 100644 --- a/IntegrationTesting/ClientApp/Podfile +++ b/IntegrationTesting/ClientApp/Podfile @@ -17,6 +17,7 @@ target 'ClientApp-CocoaPods' do pod 'FirebaseAppCheck', :path => '../../' pod 'FirebaseRemoteConfig', :path => '../../' pod 'FirebaseRemoteConfigSwift', :path => '../../' + pod 'FirebaseRemoteConfigInterop', :path => '../../' pod 'FirebaseAppDistribution', :path => '../../' pod 'FirebaseAuth', :path => '../../' pod 'FirebaseCrashlytics', :path => '../../' diff --git a/IntegrationTesting/CocoapodsIntegrationTest/TestEnvironments/Cocoapods_multiprojects_frameworks/Podfile b/IntegrationTesting/CocoapodsIntegrationTest/TestEnvironments/Cocoapods_multiprojects_frameworks/Podfile index 03bfe2e2d04..e45e8cd4908 100644 --- a/IntegrationTesting/CocoapodsIntegrationTest/TestEnvironments/Cocoapods_multiprojects_frameworks/Podfile +++ b/IntegrationTesting/CocoapodsIntegrationTest/TestEnvironments/Cocoapods_multiprojects_frameworks/Podfile @@ -25,6 +25,7 @@ target 'CocoapodsIntegrationTest' do pod 'FirebaseInstallations', :path => '../../' pod 'FirebaseMessaging', :path => '../../' pod 'FirebaseMessagingInterop', :path => '../../' + pod 'FirebaseRemoteConfigInterop', :path => '../../' pod 'FirebasePerformance', :path => '../../' pod 'FirebaseStorage', :path => '../../' end