From d96c7fd793c8a5344127c838d2b6c9d4f17e790a Mon Sep 17 00:00:00 2001 From: pcfba <111909874+pcfba@users.noreply.github.com> Date: Thu, 22 May 2025 15:19:20 -0700 Subject: [PATCH] ODM2 open beta (#92) * ODM2 open beta * Add deprecation warning to dummy.m in GoogleAppMeasurementOnDeviceConversionWrapper/ and GoogleAppMeasurementWithoutAdIdSupportWrapper/ * Comment out warning's for now --- GoogleAppMeasurementCoreWrapper/dummy.m | 17 +++++ .../include/dummy.h | 18 +++++ .../dummy.m | 17 +++++ .../include/dummy.h | 18 +++++ .../dummy.m | 2 + .../dummy.m | 2 + Package.swift | 65 ++++++++++++++++++- 7 files changed, 138 insertions(+), 1 deletion(-) create mode 100644 GoogleAppMeasurementCoreWrapper/dummy.m create mode 100644 GoogleAppMeasurementCoreWrapper/include/dummy.h create mode 100644 GoogleAppMeasurementIdentitySupportWrapper/dummy.m create mode 100644 GoogleAppMeasurementIdentitySupportWrapper/include/dummy.h diff --git a/GoogleAppMeasurementCoreWrapper/dummy.m b/GoogleAppMeasurementCoreWrapper/dummy.m new file mode 100644 index 0000000..f340cb7 --- /dev/null +++ b/GoogleAppMeasurementCoreWrapper/dummy.m @@ -0,0 +1,17 @@ +/* + * 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. + */ + +// Swift Package Manager needs at least one source file. diff --git a/GoogleAppMeasurementCoreWrapper/include/dummy.h b/GoogleAppMeasurementCoreWrapper/include/dummy.h new file mode 100644 index 0000000..4fe40eb --- /dev/null +++ b/GoogleAppMeasurementCoreWrapper/include/dummy.h @@ -0,0 +1,18 @@ +/* + * 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. + */ + +// Swift Package Manager needs at least one header to prevent a warning. See +// https://github.com/firebase/firebase-ios-sdk/pull/6504. diff --git a/GoogleAppMeasurementIdentitySupportWrapper/dummy.m b/GoogleAppMeasurementIdentitySupportWrapper/dummy.m new file mode 100644 index 0000000..f340cb7 --- /dev/null +++ b/GoogleAppMeasurementIdentitySupportWrapper/dummy.m @@ -0,0 +1,17 @@ +/* + * 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. + */ + +// Swift Package Manager needs at least one source file. diff --git a/GoogleAppMeasurementIdentitySupportWrapper/include/dummy.h b/GoogleAppMeasurementIdentitySupportWrapper/include/dummy.h new file mode 100644 index 0000000..4fe40eb --- /dev/null +++ b/GoogleAppMeasurementIdentitySupportWrapper/include/dummy.h @@ -0,0 +1,18 @@ +/* + * 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. + */ + +// Swift Package Manager needs at least one header to prevent a warning. See +// https://github.com/firebase/firebase-ios-sdk/pull/6504. diff --git a/GoogleAppMeasurementOnDeviceConversionWrapper/dummy.m b/GoogleAppMeasurementOnDeviceConversionWrapper/dummy.m index 2e503fe..a532a24 100644 --- a/GoogleAppMeasurementOnDeviceConversionWrapper/dummy.m +++ b/GoogleAppMeasurementOnDeviceConversionWrapper/dummy.m @@ -15,3 +15,5 @@ */ // Swift Package Manager needs at least one source file. + +// #warning "GoogleAppMeasurementOnDeviceConversion is deprecated. Use GoogleAdsOnDeviceConversion instead." diff --git a/GoogleAppMeasurementWithoutAdIdSupportWrapper/dummy.m b/GoogleAppMeasurementWithoutAdIdSupportWrapper/dummy.m index f340cb7..a15dc9e 100644 --- a/GoogleAppMeasurementWithoutAdIdSupportWrapper/dummy.m +++ b/GoogleAppMeasurementWithoutAdIdSupportWrapper/dummy.m @@ -15,3 +15,5 @@ */ // Swift Package Manager needs at least one source file. + +// #warning "GoogleAppMeasurementWithoutAdIdSupport is deprecated. Use GoogleAppMeasurementCore instead." diff --git a/Package.swift b/Package.swift index 3d9c155..8cfd444 100644 --- a/Package.swift +++ b/Package.swift @@ -25,10 +25,20 @@ let package = Package( name: "GoogleAppMeasurement", targets: ["GoogleAppMeasurementTarget"] ), + .library( + name: "GoogleAppMeasurementCore", + targets: ["GoogleAppMeasurementCoreTarget"] + ), + .library( + name: "GoogleAppMeasurementIdentitySupport", + targets: ["GoogleAppMeasurementIdentitySupportTarget"] + ), + // Deprecated. Use GoogleAppMeasurementCore instead. .library( name: "GoogleAppMeasurementWithoutAdIdSupport", targets: ["GoogleAppMeasurementWithoutAdIdSupportTarget"] ), + // Deprecated. Use GoogleAdsOnDeviceConversion instead. .library( name: "GoogleAppMeasurementOnDeviceConversion", targets: ["GoogleAppMeasurementOnDeviceConversionTarget"] @@ -45,10 +55,63 @@ let package = Package( url: "https://github.com/firebase/nanopb.git", "2.30910.0" ..< "2.30911.0" ), + .package( + name: "GoogleAdsOnDeviceConversion", + url: "https://github.com/googleads/google-ads-on-device-conversion-ios-sdk", + "1.3.0" ..< "3.0.0" + ), ], targets: [ .target( name: "GoogleAppMeasurementTarget", + dependencies: [ + .target( + name: "GoogleAppMeasurementIdentitySupport", + condition: .when(platforms: [.iOS, .macCatalyst, .macOS, .tvOS]) + ), + .target( + name: "GoogleAppMeasurement", + condition: .when(platforms: [.iOS, .macCatalyst, .macOS, .tvOS]) + ), + + .product(name: "GULAppDelegateSwizzler", package: "GoogleUtilities"), + .product(name: "GULMethodSwizzler", package: "GoogleUtilities"), + .product(name: "GULNSData", package: "GoogleUtilities"), + .product(name: "GULNetwork", package: "GoogleUtilities"), + .product(name: "nanopb", package: "nanopb"), + .product(name: "GoogleAdsOnDeviceConversion", package: "GoogleAdsOnDeviceConversion"), + ], + path: "GoogleAppMeasurementWrapper", + linkerSettings: [ + .linkedLibrary("sqlite3"), + .linkedLibrary("c++"), + .linkedLibrary("z"), + .linkedFramework("StoreKit"), + ] + ), + .target( + name: "GoogleAppMeasurementCoreTarget", + dependencies: [ + .target( + name: "GoogleAppMeasurement", + condition: .when(platforms: [.iOS, .macCatalyst, .macOS, .tvOS]) + ), + .product(name: "GULAppDelegateSwizzler", package: "GoogleUtilities"), + .product(name: "GULMethodSwizzler", package: "GoogleUtilities"), + .product(name: "GULNSData", package: "GoogleUtilities"), + .product(name: "GULNetwork", package: "GoogleUtilities"), + .product(name: "nanopb", package: "nanopb"), + ], + path: "GoogleAppMeasurementCoreWrapper", + linkerSettings: [ + .linkedLibrary("sqlite3"), + .linkedLibrary("c++"), + .linkedLibrary("z"), + .linkedFramework("StoreKit"), + ] + ), + .target( + name: "GoogleAppMeasurementIdentitySupportTarget", dependencies: [ .target( name: "GoogleAppMeasurementIdentitySupport", @@ -64,7 +127,7 @@ let package = Package( .product(name: "GULNetwork", package: "GoogleUtilities"), .product(name: "nanopb", package: "nanopb"), ], - path: "GoogleAppMeasurementWrapper", + path: "GoogleAppMeasurementIdentitySupportWrapper", linkerSettings: [ .linkedLibrary("sqlite3"), .linkedLibrary("c++"),