Skip to content

Add User Messaging Platform iOS support #1412

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 30 commits into from
Aug 18, 2023
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
652bb7e
Add iOS files, copies of stubs for now.
jonsimantov Aug 3, 2023
246ab64
Format code.
jonsimantov Aug 3, 2023
8f54fad
Update cocoapod versions and add UMP pod.
jonsimantov Aug 3, 2023
22a684f
Merge branch 'feature_branch/ump-sdk' into feature/ump-sdk-ios
jonsimantov Aug 8, 2023
77384f5
Add iOS basics, also rename two enums.
jonsimantov Aug 9, 2023
6be9f7c
Fixes.
jonsimantov Aug 9, 2023
37b9d32
Format code.
jonsimantov Aug 10, 2023
3a46e8c
Merge branch 'feature/ump-sdk-ios' of https://github.com/firebase/fir…
jonsimantov Aug 10, 2023
c6d98d3
Fix compiler errors.
jonsimantov Aug 10, 2023
063d678
Add test flag for skipping on hardware.
jonsimantov Aug 11, 2023
7ea9f64
Fix iOS implementation and tests to match actual results.
jonsimantov Aug 15, 2023
68a1698
Format code and add general GMA tests back in.
jonsimantov Aug 15, 2023
08f5fa5
Merge branch 'feature_branch/ump-sdk' into feature/ump-sdk-ios
jonsimantov Aug 15, 2023
de1f488
Enable App Transparency for iOS app.
jonsimantov Aug 15, 2023
57f9399
Merge branch 'feature/ump-sdk-ios' of https://github.com/firebase/fir…
jonsimantov Aug 15, 2023
a730f83
Add debug device ID to test framework on iOS.
jonsimantov Aug 16, 2023
2438a12
Change tests that use debug IDs to work differently.
jonsimantov Aug 16, 2023
2cba298
Add debug ID to certain tests.
jonsimantov Aug 16, 2023
a705ec5
Format code.
jonsimantov Aug 16, 2023
d169883
Format code.
jonsimantov Aug 16, 2023
454bd7e
Add a mutex to prevent race condition.
jonsimantov Aug 16, 2023
47408f6
Update test to check race condition.
jonsimantov Aug 16, 2023
bdd4c57
Add include for lint
jonsimantov Aug 16, 2023
da70121
Update test name.
jonsimantov Aug 16, 2023
b85feb3
Remove user interaction flag from debug test.
jonsimantov Aug 16, 2023
453d3f8
Format code.
jonsimantov Aug 16, 2023
d7ee1e1
Remove UMP-only test mode.
jonsimantov Aug 16, 2023
a99c762
Remove unnecessary test stuff.
jonsimantov Aug 17, 2023
e147305
Fix assert.
jonsimantov Aug 17, 2023
7a03dd9
Fix stub to match iOS flow.
jonsimantov Aug 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion gma/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ set(android_SRCS

# Source files used by the iOS implementation.
set(ios_SRCS
src/stub/ump/consent_info_internal_stub.cc
src/ios/ump/consent_info_internal_ios.mm
src/ios/FADAdSize.mm
src/ios/FADAdView.mm
src/ios/FADInterstitialDelegate.mm
Expand Down Expand Up @@ -133,11 +133,13 @@ elseif(IOS)
firebase_gma
POD_NAMES
Google-Mobile-Ads-SDK
GoogleUserMessagingPlatform
)

# GMA expects the header files to be in a subfolder, so set up a symlink to
# accomplish that.
symlink_pod_headers(firebase_gma Google-Mobile-Ads-SDK GoogleMobileAds)
symlink_pod_headers(firebase_gma GoogleUserMessagingPlatform UserMessagingPlatform)

if (FIREBASE_XCODE_TARGET_FORMAT STREQUAL "frameworks")
set_target_properties(firebase_gma PROPERTIES
Expand Down
2 changes: 2 additions & 0 deletions gma/integration_test/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>NSUserTrackingUsageDescription</key>
<string>This identifier will be used to deliver personalized ads to you.</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
Expand Down
1 change: 1 addition & 0 deletions gma/integration_test/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use_frameworks! :linkage => :static
target 'integration_test' do
pod 'Firebase/CoreOnly', '10.13.0'
pod 'Google-Mobile-Ads-SDK', '10.9.0'
pod 'GoogleUserMessagingPlatform', '2.1.0'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any changes need to be done to the update scripts so this gets updated automatically?

end

post_install do |installer|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
D640F3172819C85800AC956E /* empty.swift in Sources */ = {isa = PBXBuildFile; fileRef = D640F3162819C85800AC956E /* empty.swift */; };
D66B16871CE46E8900E5638A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D66B16861CE46E8900E5638A /* LaunchScreen.storyboard */; };
D67D355822BABD2200292C1D /* gtest-all.cc in Sources */ = {isa = PBXBuildFile; fileRef = D67D355622BABD2100292C1D /* gtest-all.cc */; };
D686A3292A8B16F20034845A /* AppTrackingTransparency.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D686A3282A8B16F20034845A /* AppTrackingTransparency.framework */; };
D6C179E922CB322900C2651A /* ios_app_framework.mm in Sources */ = {isa = PBXBuildFile; fileRef = D6C179E722CB322900C2651A /* ios_app_framework.mm */; };
D6C179EA22CB322900C2651A /* ios_firebase_test_framework.mm in Sources */ = {isa = PBXBuildFile; fileRef = D6C179E822CB322900C2651A /* ios_firebase_test_framework.mm */; };
D6C179EE22CB323300C2651A /* firebase_test_framework.cc in Sources */ = {isa = PBXBuildFile; fileRef = D6C179EC22CB323300C2651A /* firebase_test_framework.cc */; };
Expand All @@ -39,6 +40,7 @@
D66B16861CE46E8900E5638A /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
D67D355622BABD2100292C1D /* gtest-all.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "gtest-all.cc"; path = "external/googletest/src/googletest/src/gtest-all.cc"; sourceTree = "<group>"; };
D67D355722BABD2100292C1D /* gtest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = gtest.h; path = external/googletest/src/googletest/include/gtest/gtest.h; sourceTree = "<group>"; };
D686A3282A8B16F20034845A /* AppTrackingTransparency.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppTrackingTransparency.framework; path = System/Library/Frameworks/AppTrackingTransparency.framework; sourceTree = SDKROOT; };
D6C179E722CB322900C2651A /* ios_app_framework.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ios_app_framework.mm; path = src/ios/ios_app_framework.mm; sourceTree = "<group>"; };
D6C179E822CB322900C2651A /* ios_firebase_test_framework.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ios_firebase_test_framework.mm; path = src/ios/ios_firebase_test_framework.mm; sourceTree = "<group>"; };
D6C179EB22CB323300C2651A /* firebase_test_framework.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = firebase_test_framework.h; path = src/firebase_test_framework.h; sourceTree = "<group>"; };
Expand All @@ -53,6 +55,7 @@
buildActionMask = 2147483647;
files = (
529226D81C85F68000C89379 /* CoreGraphics.framework in Frameworks */,
D686A3292A8B16F20034845A /* AppTrackingTransparency.framework in Frameworks */,
529226DA1C85F68000C89379 /* UIKit.framework in Frameworks */,
529226D61C85F68000C89379 /* Foundation.framework in Frameworks */,
);
Expand Down Expand Up @@ -85,6 +88,7 @@
529226D41C85F68000C89379 /* Frameworks */ = {
isa = PBXGroup;
children = (
D686A3282A8B16F20034845A /* AppTrackingTransparency.framework */,
529226D51C85F68000C89379 /* Foundation.framework */,
529226D71C85F68000C89379 /* CoreGraphics.framework */,
529226D91C85F68000C89379 /* UIKit.framework */,
Expand Down
Loading