diff --git a/CoreOnly/Tests/FirebasePodTest/FirebasePodTest/AppDelegate.swift b/CoreOnly/Tests/FirebasePodTest/FirebasePodTest/AppDelegate.swift index 34b270afbea..5c11e8d0e0c 100644 --- a/CoreOnly/Tests/FirebasePodTest/FirebasePodTest/AppDelegate.swift +++ b/CoreOnly/Tests/FirebasePodTest/FirebasePodTest/AppDelegate.swift @@ -15,7 +15,7 @@ import Firebase // Verify that the following Firebase Swift APIs can be found. -import FirebaseAnalyticsSwift +import FirebaseAnalytics import FirebaseFirestoreSwift import FirebaseInAppMessaging import UIKit diff --git a/CoreOnly/Tests/FirebasePodTest/Podfile b/CoreOnly/Tests/FirebasePodTest/Podfile index 8817eb931b5..d5c3822537b 100644 --- a/CoreOnly/Tests/FirebasePodTest/Podfile +++ b/CoreOnly/Tests/FirebasePodTest/Podfile @@ -11,7 +11,6 @@ target 'FirebasePodTest' do pod 'Firebase', :path => '../../../' pod 'FirebaseABTesting', :path => '../../../' - pod 'FirebaseAnalyticsSwift', :path => '../../../' pod 'FirebaseAppDistribution', :path => '../../../' pod 'FirebaseAuth', :path => '../../../' pod 'FirebaseCore', :path => '../../../' diff --git a/Dangerfile b/Dangerfile index 87b999c2c86..7b8bfac5803 100644 --- a/Dangerfile +++ b/Dangerfile @@ -108,12 +108,10 @@ has_license_changes = didModify(["LICENSE"]) ## Product directories @has_analytics_changes = hasChangesIn([ "FirebaseAnalyticsOnDeviceConversionWrapper", - "FirebaseAnalyticsSwift", "FirebaseAnalyticsWithoutAdIdSupportWrapper", "FirebaseAnalyticsWrapper" ]) || didModify([ "FirebaseAnalytics.podspec", - "FirebaseAnalyticsSwift.podspec", "FirebaseAnalyticsOnDeviceConversion.podspec", "GoogleAppMeasurement.podspec", "GoogleAppMeasurementOnDeviceConversion.podspec" diff --git a/FirebaseAnalytics/README.md b/FirebaseAnalytics/README.md index a4df212b27a..463a809f334 100644 --- a/FirebaseAnalytics/README.md +++ b/FirebaseAnalytics/README.md @@ -1,2 +1,111 @@ -This directory open sources select files from the Firebase Analytics SDK. Note -that there is no open source infrastructure to build or package them. +# Firebase Analytics SDK + +Introduce a manual screen view event logging API that enable developers to log individual views in SwiftUI lifecycle. + +## Code Samples + +### Before +```swift + +struct ContentView: View { + var body: some View { + Text("Hello, world!") + // Logging screen name with class and a custom parameter. + .onAppear { + Analytics.logEvent(AnalyticsEventScreenView, + parameters: [AnalyticsParameterScreenName: "main_content", + AnalyticsParameterScreenClass: "ContentView", + "my_custom_param": 5]) + } + + // OR Logging screen name only. + .onAppear { + Analytics.logEvent(AnalyticsEventScreenView, + parameters: [AnalyticsParameterScreenName: "main_content"]) + } + } +} + +``` + +### After +```swift +struct ContentView: View { + var body: some View { + Text("Hello, world!") + // Logging screen name with class and a custom parameter. + .analyticsScreen(name: "main_content", + class: "ContentView", + extraParameters: ["my_custom_param": 5]) + + // OR Logging screen name only, class and extra parameters are optional. + .analyticsScreen(name: "main_content") + } +} +``` +An example that demonstrates how the custom event logging API and manual screen view event logging API can make the code more efficient and reduce the number of lines required for event logging. + +### Before (Without APIs) + +```swift +struct ContentView: View { + var body: some View { + VStack { + Text("Welcome to our App!") + .padding() + Button("Click Me!") { + // Logging a custom event when the button is clicked. + Analytics.logEvent("button_clicked", parameters: nil) + } + } + .onAppear { + // Logging the screen view event when the ContentView appears. + Analytics.logEvent(AnalyticsEventScreenView, parameters: [AnalyticsParameterScreenName: "main_content"]) + } + } +} +``` + +### After (With APIs) + +```swift +struct ContentView: View { + var body: some View { + VStack { + Text("Welcome to our App!") + .padding() + Button("Click Me!") { + // Directly using Firebase's logEvent method to log the button click. + Analytics.logEvent("button_clicked", parameters: nil) + } + } + // Using the new manual screen view event logging API to log the screen view. + .analyticsScreen(name: "main_content") + } +} + + +// Introducing a manual screen view event logging API. +extension View { + func analyticsScreen(name: String, class screenClass: String? = nil, extraParameters: [String: Any]? = nil) -> some View { + onAppear { + var params: [String: Any] = [AnalyticsParameterScreenName: name] + if let screenClass { + params[AnalyticsParameterScreenClass] = screenClass + } + if let extraParameters { + params.merge(extraParameters) { _, new in new } + } + Analytics.logEvent(AnalyticsEventScreenView, parameters: params) + } + } +} +``` + +In this example, by leveraging the custom event logging API and manual screen view event logging API, we achieve a significant reduction in code complexity for event tracking: + +1. **Before:** In the previous implementation, event logging for button clicks and screen views required separate blocks of code, leading to redundant lines of code throughout the +app. This redundancy made the codebase less efficient and harder to maintain. + +2. **After:** By adopting the event logging API and manual screen view event logging API, we now condense the event tracking logic into just a few lines of code. This streamlined +approach improves the overall code efficiency and enhances code readability. diff --git a/FirebaseAnalytics/Analytics+SwiftUI.swift b/FirebaseAnalytics/Sources/Analytics+SwiftUI.swift similarity index 100% rename from FirebaseAnalytics/Analytics+SwiftUI.swift rename to FirebaseAnalytics/Sources/Analytics+SwiftUI.swift diff --git a/FirebaseAnalytics/Sources/README.md b/FirebaseAnalytics/Sources/README.md new file mode 100644 index 00000000000..a4df212b27a --- /dev/null +++ b/FirebaseAnalytics/Sources/README.md @@ -0,0 +1,2 @@ +This directory open sources select files from the Firebase Analytics SDK. Note +that there is no open source infrastructure to build or package them. diff --git a/FirebaseAnalyticsSwift/Tests/ObjCAPI/ObjCAPITests.m b/FirebaseAnalytics/Tests/ObjCAPI/ObjCAPITests.m similarity index 100% rename from FirebaseAnalyticsSwift/Tests/ObjCAPI/ObjCAPITests.m rename to FirebaseAnalytics/Tests/ObjCAPI/ObjCAPITests.m diff --git a/FirebaseAnalyticsSwift/Tests/SwiftUnit/AnalyticsAPITests.swift b/FirebaseAnalytics/Tests/SwiftUnit/AnalyticsAPITests.swift similarity index 99% rename from FirebaseAnalyticsSwift/Tests/SwiftUnit/AnalyticsAPITests.swift rename to FirebaseAnalytics/Tests/SwiftUnit/AnalyticsAPITests.swift index 1d6a454f771..ab5c52b069f 100644 --- a/FirebaseAnalyticsSwift/Tests/SwiftUnit/AnalyticsAPITests.swift +++ b/FirebaseAnalytics/Tests/SwiftUnit/AnalyticsAPITests.swift @@ -21,7 +21,6 @@ import StoreKit import SwiftUI import FirebaseAnalytics -import FirebaseAnalyticsSwift import SwiftUI final class AnalyticsAPITests { diff --git a/FirebaseAnalyticsSwift.podspec b/FirebaseAnalyticsSwift.podspec deleted file mode 100644 index 4fb8790af9d..00000000000 --- a/FirebaseAnalyticsSwift.podspec +++ /dev/null @@ -1,60 +0,0 @@ -Pod::Spec.new do |s| - s.name = 'FirebaseAnalyticsSwift' - s.version = '10.19.0' - s.summary = 'Swift Extensions for Firebase Analytics' - - s.description = <<-DESC -Firebase Analytics is a free, out-of-the-box analytics solution that inspires actionable insights based on app usage and user engagement. - DESC - - s.homepage = 'https://firebase.google.com/features/analytics/' - 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.static_framework = true - s.swift_version = '5.3' - - ios_deployment_target = '13.0' - osx_deployment_target = '10.15' - tvos_deployment_target = '13.0' - - s.ios.deployment_target = ios_deployment_target - s.osx.deployment_target = osx_deployment_target - s.tvos.deployment_target = tvos_deployment_target - - s.cocoapods_version = '>= 1.12.0' - s.prefix_header_file = false - - s.source_files = [ - 'FirebaseAnalyticsSwift/Sources/*.swift', - ] - - s.dependency 'FirebaseAnalytics', '~> 10.17' - - s.test_spec 'swift-unit' do |swift_unit_tests| - swift_unit_tests.platforms = { - :ios => ios_deployment_target, - :osx => osx_deployment_target, - :tvos => tvos_deployment_target - } - swift_unit_tests.source_files = [ - 'FirebaseAnalyticsSwift/Tests/SwiftUnit/**/*.swift', - ] - end - - s.test_spec 'objc-api-coverage' do |objc_api_tests| - objc_api_tests.platforms = { - :ios => ios_deployment_target, - :osx => osx_deployment_target, - :tvos => tvos_deployment_target - } - objc_api_tests.source_files = [ - 'FirebaseAnalyticsSwift/Tests/ObjCAPI/*.[hm]', - ] - end -end diff --git a/FirebaseAnalyticsSwift/CHANGELOG.md b/FirebaseAnalyticsSwift/CHANGELOG.md deleted file mode 100644 index 2630b7d1dfb..00000000000 --- a/FirebaseAnalyticsSwift/CHANGELOG.md +++ /dev/null @@ -1,18 +0,0 @@ -# 10.17.0 -- [deprecated] All of the public API from `FirebaseAnalyticsSwift` can now - be accessed through the `FirebaseAnalytics` module. Therefore, - `FirebaseAnalyticsSwift` has been deprecated, and will be removed in a - future release. See https://firebase.google.com/docs/ios/swift-migration for - migration instructions. - -# 9.0.0 -- [added] **Breaking change:** `FirebaseAnalyticsSwift` has exited beta and is - now generally available for use. - -# 7.9.0-beta -- Initial public beta release. Introduces new SwiftUI friendly APIs for - screen tracking. To use, add `pod 'FirebaseAnalyticsSwift', '~> 7.9-beta'` to the Podfile or - add the `FirebaseAnalyticsSwift-Beta` framework in Swift Package Manager, then - and `import FirebaseAnalyticsSwift` to the source. Please provide feedback about - these new APIs and suggestions about other potential Swift extensions to - https://github.com/firebase/firebase-ios-sdk/issues. diff --git a/FirebaseAnalyticsSwift/README.md b/FirebaseAnalyticsSwift/README.md deleted file mode 100644 index 5c605d01774..00000000000 --- a/FirebaseAnalyticsSwift/README.md +++ /dev/null @@ -1,111 +0,0 @@ -# Firebase Analytics Swift SDK - -Introduce a manual screen view event logging API that enable developers to log individual views in SwiftUI lifecycle. - -## Code Samples - -### Before -```swift - -struct ContentView: View { - var body: some View { - Text("Hello, world!") - // Logging screen name with class and a custom parameter. - .onAppear { - Analytics.logEvent(AnalyticsEventScreenView, - parameters: [AnalyticsParameterScreenName: "main_content", - AnalyticsParameterScreenClass: "ContentView", - "my_custom_param": 5]) - } - - // OR Logging screen name only. - .onAppear { - Analytics.logEvent(AnalyticsEventScreenView, - parameters: [AnalyticsParameterScreenName: "main_content"]) - } - } -} - -``` - -### After -```swift -struct ContentView: View { - var body: some View { - Text("Hello, world!") - // Logging screen name with class and a custom parameter. - .analyticsScreen(name: "main_content", - class: "ContentView", - extraParameters: ["my_custom_param": 5]) - - // OR Logging screen name only, class and extra parameters are optional. - .analyticsScreen(name: "main_content") - } -} -``` -An example that demonstrates how the custom event logging API and manual screen view event logging API can make the code more efficient and reduce the number of lines required for event logging. - -### Before (Without APIs) - -```swift -struct ContentView: View { - var body: some View { - VStack { - Text("Welcome to our App!") - .padding() - Button("Click Me!") { - // Logging a custom event when the button is clicked. - Analytics.logEvent("button_clicked", parameters: nil) - } - } - .onAppear { - // Logging the screen view event when the ContentView appears. - Analytics.logEvent(AnalyticsEventScreenView, parameters: [AnalyticsParameterScreenName: "main_content"]) - } - } -} -``` - -### After (With APIs) - -```swift -struct ContentView: View { - var body: some View { - VStack { - Text("Welcome to our App!") - .padding() - Button("Click Me!") { - // Directly using Firebase's logEvent method to log the button click. - Analytics.logEvent("button_clicked", parameters: nil) - } - } - // Using the new manual screen view event logging API to log the screen view. - .analyticsScreen(name: "main_content") - } -} - - -// Introducing a manual screen view event logging API. -extension View { - func analyticsScreen(name: String, class screenClass: String? = nil, extraParameters: [String: Any]? = nil) -> some View { - onAppear { - var params: [String: Any] = [AnalyticsParameterScreenName: name] - if let screenClass { - params[AnalyticsParameterScreenClass] = screenClass - } - if let extraParameters { - params.merge(extraParameters) { _, new in new } - } - Analytics.logEvent(AnalyticsEventScreenView, parameters: params) - } - } -} -``` - -In this example, by leveraging the custom event logging API and manual screen view event logging API, we achieve a significant reduction in code complexity for event tracking: - -1. **Before:** In the previous implementation, event logging for button clicks and screen views required separate blocks of code, leading to redundant lines of code throughout the -app. This redundancy made the codebase less efficient and harder to maintain. - -2. **After:** By adopting the event logging API and manual screen view event logging API, we now condense the event tracking logic into just a few lines of code. This streamlined -approach improves the overall code efficiency and enhances code readability. diff --git a/FirebaseAnalyticsSwift/Sources/FirebaseAnalyticsSwift.swift b/FirebaseAnalyticsSwift/Sources/FirebaseAnalyticsSwift.swift deleted file mode 100644 index 2265ffb90f5..00000000000 --- a/FirebaseAnalyticsSwift/Sources/FirebaseAnalyticsSwift.swift +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#warning( - "All of the public API from `FirebaseAnalyticsSwift` can now be accessed through the `FirebaseAnalytics` module. Therefore, the `FirebaseAnalyticsSwift` module is deprecated and will be removed in the future. See https://firebase.google.com/docs/ios/swift-migration for migration instructions." -) diff --git a/FirebaseRemoteConfigSwift/Apps/SwiftUISample/Podfile b/FirebaseRemoteConfigSwift/Apps/SwiftUISample/Podfile index f05705b3d6a..8eabe1d0127 100644 --- a/FirebaseRemoteConfigSwift/Apps/SwiftUISample/Podfile +++ b/FirebaseRemoteConfigSwift/Apps/SwiftUISample/Podfile @@ -9,7 +9,6 @@ target 'SwiftUISample' do # Comment the next line if you don't want to use dynamic frameworks use_frameworks! pod 'FirebaseAnalytics' - pod 'FirebaseAnalyticsSwift' pod 'FirebaseCore', :path => '../../../' pod 'FirebaseCoreInternal', :path => '../../../' pod 'FirebaseInstallations', :path => '../../../' diff --git a/FirebaseRemoteConfigSwift/Apps/SwiftUISample/SwiftUISample/ContentView.swift b/FirebaseRemoteConfigSwift/Apps/SwiftUISample/SwiftUISample/ContentView.swift index b6adf994946..53d70eb2262 100644 --- a/FirebaseRemoteConfigSwift/Apps/SwiftUISample/SwiftUISample/ContentView.swift +++ b/FirebaseRemoteConfigSwift/Apps/SwiftUISample/SwiftUISample/ContentView.swift @@ -15,7 +15,6 @@ */ import FirebaseAnalytics -import FirebaseAnalyticsSwift import FirebaseRemoteConfig import FirebaseRemoteConfigSwift import SwiftUI diff --git a/IntegrationTesting/ClientApp/ClientApp.xcodeproj/project.pbxproj b/IntegrationTesting/ClientApp/ClientApp.xcodeproj/project.pbxproj index a8b8c6918a0..6b2732ae373 100644 --- a/IntegrationTesting/ClientApp/ClientApp.xcodeproj/project.pbxproj +++ b/IntegrationTesting/ClientApp/ClientApp.xcodeproj/project.pbxproj @@ -30,7 +30,6 @@ EA5A629F2A99498500F5711A /* objc-header-import-test.m in Sources */ = {isa = PBXBuildFile; fileRef = EA05C7DF29F0911400D1014F /* objc-header-import-test.m */; }; EA7DF54329EF20B9005664A7 /* swift-import-test.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA7DF54229EF20B9005664A7 /* swift-import-test.swift */; }; EA7DF58329EF3326005664A7 /* FirebaseAnalytics in Frameworks */ = {isa = PBXBuildFile; productRef = EA7DF58229EF3326005664A7 /* FirebaseAnalytics */; }; - EA7DF58729EF3326005664A7 /* FirebaseAnalyticsSwift in Frameworks */ = {isa = PBXBuildFile; productRef = EA7DF58629EF3326005664A7 /* FirebaseAnalyticsSwift */; }; EA7DF58929EF3326005664A7 /* FirebaseAnalyticsWithoutAdIdSupport in Frameworks */ = {isa = PBXBuildFile; productRef = EA7DF58829EF3326005664A7 /* FirebaseAnalyticsWithoutAdIdSupport */; }; EA7DF58B29EF3326005664A7 /* FirebaseAppCheck in Frameworks */ = {isa = PBXBuildFile; productRef = EA7DF58A29EF3326005664A7 /* FirebaseAppCheck */; }; EA7DF58D29EF3326005664A7 /* FirebaseAppDistribution-Beta in Frameworks */ = {isa = PBXBuildFile; platformFilter = ios; productRef = EA7DF58C29EF3326005664A7 /* FirebaseAppDistribution-Beta */; }; @@ -58,7 +57,6 @@ EAA0A9BC2AD84E0900C28FCD /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = EAA0A9BB2AD84E0900C28FCD /* Preview Assets.xcassets */; }; EAA0A9C12AD84E5600C28FCD /* FirebaseInAppMessaging-Beta in Frameworks */ = {isa = PBXBuildFile; productRef = EAA0A9C02AD84E5600C28FCD /* FirebaseInAppMessaging-Beta */; }; EAA0A9C52AD84E5D00C28FCD /* FirebaseAnalytics in Frameworks */ = {isa = PBXBuildFile; productRef = EAA0A9C42AD84E5D00C28FCD /* FirebaseAnalytics */; }; - EAA0A9C72AD84E5D00C28FCD /* FirebaseAnalyticsSwift in Frameworks */ = {isa = PBXBuildFile; productRef = EAA0A9C62AD84E5D00C28FCD /* FirebaseAnalyticsSwift */; }; EAA0A9C82AD84E6A00C28FCD /* swift-import-test.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAA0A9A82AD84C2A00C28FCD /* swift-import-test.swift */; }; EAA0A9C92AD84E7000C28FCD /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = EA1269B729EDF98A00D79E66 /* Assets.xcassets */; }; EAA0A9CA2AD84E7000C28FCD /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA1269B329EDF98800D79E66 /* AppDelegate.swift */; }; @@ -100,7 +98,6 @@ EA7DF59529EF3326005664A7 /* FirebaseDatabase in Frameworks */, EA7DF5A329EF3327005664A7 /* FirebaseFunctionsCombine-Community in Frameworks */, EA7DF59B29EF3326005664A7 /* FirebaseFirestore in Frameworks */, - EA7DF58729EF3326005664A7 /* FirebaseAnalyticsSwift in Frameworks */, EA0BC0FF29F06D5B005B8AEE /* FirebaseAnalyticsOnDeviceConversion in Frameworks */, EA7DF58329EF3326005664A7 /* FirebaseAnalytics in Frameworks */, EA7DF59F29EF3327005664A7 /* FirebaseFirestoreSwift in Frameworks */, @@ -141,7 +138,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - EAA0A9C72AD84E5D00C28FCD /* FirebaseAnalyticsSwift in Frameworks */, EABBCF6F2B45B46500232BAF /* FirebaseAuthCombine-Community in Frameworks */, EABBCF6D2B45B44100232BAF /* FirebaseAuth in Frameworks */, DE305B702B7BE0B5000595B3 /* FirebaseStorage in Frameworks */, @@ -312,7 +308,6 @@ name = ClientApp; packageProductDependencies = ( EA7DF58229EF3326005664A7 /* FirebaseAnalytics */, - EA7DF58629EF3326005664A7 /* FirebaseAnalyticsSwift */, EA7DF58829EF3326005664A7 /* FirebaseAnalyticsWithoutAdIdSupport */, EA7DF58A29EF3326005664A7 /* FirebaseAppCheck */, EA7DF58C29EF3326005664A7 /* FirebaseAppDistribution-Beta */, @@ -389,7 +384,6 @@ packageProductDependencies = ( EAA0A9C02AD84E5600C28FCD /* FirebaseInAppMessaging-Beta */, EAA0A9C42AD84E5D00C28FCD /* FirebaseAnalytics */, - EAA0A9C62AD84E5D00C28FCD /* FirebaseAnalyticsSwift */, EABBCF6C2B45B44100232BAF /* FirebaseAuth */, EABBCF6E2B45B46500232BAF /* FirebaseAuthCombine-Community */, DE305B6F2B7BE0B5000595B3 /* FirebaseStorage */, @@ -1032,10 +1026,6 @@ isa = XCSwiftPackageProductDependency; productName = FirebaseAnalytics; }; - EA7DF58629EF3326005664A7 /* FirebaseAnalyticsSwift */ = { - isa = XCSwiftPackageProductDependency; - productName = FirebaseAnalyticsSwift; - }; EA7DF58829EF3326005664A7 /* FirebaseAnalyticsWithoutAdIdSupport */ = { isa = XCSwiftPackageProductDependency; productName = FirebaseAnalyticsWithoutAdIdSupport; @@ -1124,10 +1114,6 @@ isa = XCSwiftPackageProductDependency; productName = FirebaseAnalytics; }; - EAA0A9C62AD84E5D00C28FCD /* FirebaseAnalyticsSwift */ = { - isa = XCSwiftPackageProductDependency; - productName = FirebaseAnalyticsSwift; - }; EABBCF6C2B45B44100232BAF /* FirebaseAuth */ = { isa = XCSwiftPackageProductDependency; productName = FirebaseAuth; diff --git a/IntegrationTesting/ClientApp/Podfile b/IntegrationTesting/ClientApp/Podfile index c3816149071..e2abd6876dd 100644 --- a/IntegrationTesting/ClientApp/Podfile +++ b/IntegrationTesting/ClientApp/Podfile @@ -39,7 +39,6 @@ target 'ClientApp-CocoaPods-iOS13' do use_frameworks! pod 'FirebaseAnalytics' # Binary pods don't work with `:path`. - pod 'FirebaseAnalyticsSwift', :path => '../../' # Requires iOS 13.0+ pod 'FirebaseAuth', :path => '../../' # Requires iOS 13.0+ pod 'FirebaseAuthInterop', :path => '../../' pod 'FirebaseInAppMessaging', :path => '../../' diff --git a/IntegrationTesting/ClientApp/Shared-iOS13+/swift-import-test.swift b/IntegrationTesting/ClientApp/Shared-iOS13+/swift-import-test.swift index 3a969a50203..d738f429a9e 100644 --- a/IntegrationTesting/ClientApp/Shared-iOS13+/swift-import-test.swift +++ b/IntegrationTesting/ClientApp/Shared-iOS13+/swift-import-test.swift @@ -13,7 +13,6 @@ // limitations under the License. import FirebaseAnalytics -import FirebaseAnalyticsSwift import FirebaseAuth #if SWIFT_PACKAGE import FirebaseAuthCombineSwift diff --git a/Package.swift b/Package.swift index a40f52e3c95..3da098725da 100644 --- a/Package.swift +++ b/Package.swift @@ -41,10 +41,6 @@ let package = Package( name: "FirebaseAnalyticsOnDeviceConversion", targets: ["FirebaseAnalyticsOnDeviceConversionTarget"] ), - .library( - name: "FirebaseAnalyticsSwift", - targets: ["FirebaseAnalyticsSwiftTarget"] - ), .library( name: "FirebaseAuth", targets: ["FirebaseAuth"] @@ -324,26 +320,15 @@ let package = Package( url: "https://dl.google.com/firebase/ios/swiftpm/10.27.0/FirebaseAnalytics.zip", checksum: "0d5e3c63e34a5e0a8f782641ca128b3bb3be74b1eb58f55a9a4b40064cd84e88" ), - .target( - name: "FirebaseAnalyticsSwiftTarget", - dependencies: [.target(name: "FirebaseAnalyticsSwift", - condition: .when(platforms: [.iOS, .macCatalyst, .macOS, .tvOS]))], - path: "SwiftPM-PlatformExclude/FirebaseAnalyticsSwiftWrap" - ), - .target( - name: "FirebaseAnalyticsSwift", - dependencies: ["FirebaseAnalyticsWrapper"], - path: "FirebaseAnalyticsSwift/Sources" - ), .testTarget( name: "AnalyticsSwiftUnit", - dependencies: ["FirebaseAnalyticsSwift"], - path: "FirebaseAnalyticsSwift/Tests/SwiftUnit" + dependencies: ["FirebaseAnalytics"], + path: "FirebaseAnalytics/Tests/SwiftUnit" ), .testTarget( name: "AnalyticsObjCAPI", - dependencies: ["FirebaseAnalyticsSwift"], - path: "FirebaseAnalyticsSwift/Tests/ObjCAPI" + dependencies: ["FirebaseAnalytics"], + path: "FirebaseAnalytics/Tests/ObjCAPI" ), .target( @@ -1208,7 +1193,6 @@ let package = Package( "FirebaseAppCheck", "FirebaseABTesting", "FirebaseAnalytics", - "FirebaseAnalyticsSwift", .target(name: "FirebaseAppDistribution", condition: .when(platforms: [.iOS])), "FirebaseAuthCombineSwift", @@ -1238,7 +1222,6 @@ let package = Package( .testTarget( name: "analytics-import-test", dependencies: [ - "FirebaseAnalyticsSwiftTarget", "FirebaseAnalyticsWrapper", "Firebase", ], diff --git a/SwiftPM-PlatformExclude/FirebaseAnalyticsSwiftWrap/dummy.m b/SwiftPM-PlatformExclude/FirebaseAnalyticsSwiftWrap/dummy.m deleted file mode 100644 index 11635a1a714..00000000000 --- a/SwiftPM-PlatformExclude/FirebaseAnalyticsSwiftWrap/dummy.m +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#import -#if TARGET_OS_WATCH -#warning "Firebase Analytics does not support the watchOS platform" -#endif diff --git a/SwiftPM-PlatformExclude/FirebaseAnalyticsSwiftWrap/include/dummy.h b/SwiftPM-PlatformExclude/FirebaseAnalyticsSwiftWrap/include/dummy.h deleted file mode 100644 index 6a0a2f41a9c..00000000000 --- a/SwiftPM-PlatformExclude/FirebaseAnalyticsSwiftWrap/include/dummy.h +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Prevent a missing umbrella header warning. diff --git a/SwiftPMTests/analytics-import-test/analytics-import.swift b/SwiftPMTests/analytics-import-test/analytics-import.swift index 7470f5a9871..f505a46767b 100644 --- a/SwiftPMTests/analytics-import-test/analytics-import.swift +++ b/SwiftPMTests/analytics-import-test/analytics-import.swift @@ -15,7 +15,6 @@ import FirebaseAnalytics import XCTest #if canImport(SwiftUI) - import FirebaseAnalyticsSwift import SwiftUI #endif diff --git a/scripts/api_diff_report/icore_module.py b/scripts/api_diff_report/icore_module.py index f6dc2a030f3..3c782b23e2f 100644 --- a/scripts/api_diff_report/icore_module.py +++ b/scripts/api_diff_report/icore_module.py @@ -25,7 +25,6 @@ 'FirebaseABTesting', 'FirebaseAnalytics', # Not buildable from source 'FirebaseAnalyticsOnDeviceConversion', # Not buildable. - 'FirebaseAnalyticsSwift', 'FirebaseAppCheck', 'FirebaseAppDistribution', 'FirebaseAuth',