diff --git a/packages/google_mobile_ads/CHANGELOG.md b/packages/google_mobile_ads/CHANGELOG.md index 295d13144..999332e13 100644 --- a/packages/google_mobile_ads/CHANGELOG.md +++ b/packages/google_mobile_ads/CHANGELOG.md @@ -1,3 +1,7 @@ +## Next Version +* Adds `MediationExtras` class to include parameters when using mediation through the implementation of `FlutterMediationExtras` in Android and `FlutterMediationExtras` in iOS +* Deprecates `MediationNetworkExtrasProvider` and `FLTMediationNetworkExtrasProvider`. + ## 4.0.0 * The minimum supported Flutter version is now 3.7.0. * Removes `visibility_detector` as a dependency, and the workaround added in diff --git a/packages/google_mobile_ads/example/ios/Runner.xcodeproj/project.pbxproj b/packages/google_mobile_ads/example/ios/Runner.xcodeproj/project.pbxproj index 4c0a8be68..f569e2fff 100644 --- a/packages/google_mobile_ads/example/ios/Runner.xcodeproj/project.pbxproj +++ b/packages/google_mobile_ads/example/ios/Runner.xcodeproj/project.pbxproj @@ -9,8 +9,6 @@ /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 3D7E269FA8038A55BBCBF250 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A2AB4EE7241D0927BB957D65 /* Pods_Runner.framework */; }; - 588A95C9AF0A9F291BFBAA5B /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 86606948223BE74D544C6A9E /* Pods_RunnerTests.framework */; }; 8FC897F52411A9F100415930 /* NativeAdView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8FC897F42411A9F100415930 /* NativeAdView.xib */; }; 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; @@ -39,6 +37,8 @@ 9E61AA6029BBE8FD00801A83 /* FLTNativeTemplateStyleTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 9E61AA5B29BBE8FD00801A83 /* FLTNativeTemplateStyleTest.m */; }; 9E61AA6129BBE8FD00801A83 /* FLTNativeTemplateFontStyleTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 9E61AA5C29BBE8FD00801A83 /* FLTNativeTemplateFontStyleTest.m */; }; 9E61AA6229BBE8FD00801A83 /* FLTNativeTemplateColorTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 9E61AA5D29BBE8FD00801A83 /* FLTNativeTemplateColorTest.m */; }; + E7EC341DA38281D318B68F59 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABFEEFD40A5836BA5CE4CED /* Pods_RunnerTests.framework */; }; + EC458009CFDD712E60CD5DFA /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C36B11FB68242AEF96E5F4EE /* Pods_Runner.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -65,17 +65,15 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 11876BBEFD14DE336FDF468C /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 33B3F49066B06106D1C77620 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; + 36476A5EA323BF096F719E17 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 41FDEFDDDE2EF7FC7A8F36B5 /* Pods-google_mobile_ads_exampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-google_mobile_ads_exampleTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-google_mobile_ads_exampleTests/Pods-google_mobile_ads_exampleTests.release.xcconfig"; sourceTree = ""; }; 44F3DED22B745BEE004D7117 /* FLTMediationExtras.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FLTMediationExtras.h; path = ../../ios/Classes/FLTMediationExtras.h; sourceTree = ""; }; - 49D53C9BFB8E1019F721B2A9 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 86606948223BE74D544C6A9E /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 8FC897F42411A9F100415930 /* NativeAdView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NativeAdView.xib; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; @@ -156,11 +154,10 @@ 9EF4E6FE26392B230007E4FE /* FLTGoogleMobileAdsCollection_Internal.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = FLTGoogleMobileAdsCollection_Internal.m; path = ../../ios/Classes/FLTGoogleMobileAdsCollection_Internal.m; sourceTree = ""; }; 9EF4E6FF26392B230007E4FE /* FLTMobileAds_Internal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FLTMobileAds_Internal.h; path = ../../ios/Classes/FLTMobileAds_Internal.h; sourceTree = ""; }; 9EFEAB4E29B0019F000A063B /* GoogleMobileAds.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = GoogleMobileAds.xcframework; path = "Pods/Google-Mobile-Ads-SDK/Frameworks/GoogleMobileAdsFramework/GoogleMobileAds.xcframework"; sourceTree = ""; }; - A2AB4EE7241D0927BB957D65 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - B4B811D89E676EBD37E2E206 /* libPods-google_mobile_ads_exampleTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-google_mobile_ads_exampleTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - C0B22AB9B287C9F711EAAF48 /* Pods-google_mobile_ads_exampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-google_mobile_ads_exampleTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-google_mobile_ads_exampleTests/Pods-google_mobile_ads_exampleTests.debug.xcconfig"; sourceTree = ""; }; - CE82265EF05E2A9632B25E60 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; - F74051031B69F8124E38352E /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + A39531425632C3A3DC4383CB /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + C36B11FB68242AEF96E5F4EE /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + C98800EC19862BF9ED4482C9 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + FABFEEFD40A5836BA5CE4CED /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -168,7 +165,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 3D7E269FA8038A55BBCBF250 /* Pods_Runner.framework in Frameworks */, + EC458009CFDD712E60CD5DFA /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -176,24 +173,23 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 588A95C9AF0A9F291BFBAA5B /* Pods_RunnerTests.framework in Frameworks */, + E7EC341DA38281D318B68F59 /* Pods_RunnerTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 07A52D07C2C05D9527204891 /* Pods */ = { + 1FB91A3DF4B2659B8F27FED3 /* Pods */ = { isa = PBXGroup; children = ( - CE82265EF05E2A9632B25E60 /* Pods-Runner.debug.xcconfig */, - F74051031B69F8124E38352E /* Pods-Runner.release.xcconfig */, - C0B22AB9B287C9F711EAAF48 /* Pods-google_mobile_ads_exampleTests.debug.xcconfig */, - 41FDEFDDDE2EF7FC7A8F36B5 /* Pods-google_mobile_ads_exampleTests.release.xcconfig */, - 49D53C9BFB8E1019F721B2A9 /* Pods-RunnerTests.debug.xcconfig */, - 11876BBEFD14DE336FDF468C /* Pods-RunnerTests.release.xcconfig */, + C98800EC19862BF9ED4482C9 /* Pods-Runner.debug.xcconfig */, + A39531425632C3A3DC4383CB /* Pods-Runner.release.xcconfig */, + 33B3F49066B06106D1C77620 /* Pods-RunnerTests.debug.xcconfig */, + 36476A5EA323BF096F719E17 /* Pods-RunnerTests.release.xcconfig */, ); name = Pods; + path = Pods; sourceTree = ""; }; 5B6AAA352BAC85BF7DD68C46 /* Frameworks */ = { @@ -202,9 +198,8 @@ 9EFEAB4E29B0019F000A063B /* GoogleMobileAds.xcframework */, 9EB9FE57280F853D00DDBB4F /* UserMessagingPlatform.xcframework */, 9EA7213525BB6464008D57E3 /* GoogleMobileAds.xcframework */, - B4B811D89E676EBD37E2E206 /* libPods-google_mobile_ads_exampleTests.a */, - A2AB4EE7241D0927BB957D65 /* Pods_Runner.framework */, - 86606948223BE74D544C6A9E /* Pods_RunnerTests.framework */, + C36B11FB68242AEF96E5F4EE /* Pods_Runner.framework */, + FABFEEFD40A5836BA5CE4CED /* Pods_RunnerTests.framework */, ); name = Frameworks; sourceTree = ""; @@ -250,8 +245,8 @@ 97C146F01CF9000F007C117D /* Runner */, 9E61AA1729BBE51900801A83 /* RunnerTests */, 97C146EF1CF9000F007C117D /* Products */, - 07A52D07C2C05D9527204891 /* Pods */, 5B6AAA352BAC85BF7DD68C46 /* Frameworks */, + 1FB91A3DF4B2659B8F27FED3 /* Pods */, ); sourceTree = ""; }; @@ -390,15 +385,15 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - 2C1A4E9A6849F7CC6B679EA5 /* [CP] Check Pods Manifest.lock */, + 7C9D7ED7E0B6542BE1F8DAB4 /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - 49DB53F11513926D17758C29 /* [CP] Copy Pods Resources */, - D336851A73EADA4508A711A0 /* [CP] Embed Pods Frameworks */, + 4CD3829E4C81C1F16D0DEBF9 /* [CP] Embed Pods Frameworks */, + F81A0C673F4DDD6F4EFE5D7F /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -413,11 +408,11 @@ isa = PBXNativeTarget; buildConfigurationList = 9E61AA1E29BBE51900801A83 /* Build configuration list for PBXNativeTarget "RunnerTests" */; buildPhases = ( - F0309092BBFE54C4077DB91D /* [CP] Check Pods Manifest.lock */, + 11BD8991DA54123BE51F8F61 /* [CP] Check Pods Manifest.lock */, 9E61AA1229BBE51900801A83 /* Sources */, 9E61AA1329BBE51900801A83 /* Frameworks */, 9E61AA1429BBE51900801A83 /* Resources */, - 3C1065414114FFC1A695F30C /* [CP] Embed Pods Frameworks */, + 167426ED05719818DF1200F5 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -490,24 +485,46 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 2C1A4E9A6849F7CC6B679EA5 /* [CP] Check Pods Manifest.lock */ = { + 11BD8991DA54123BE51F8F61 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); + inputFileListPaths = ( + ); inputPaths = ( "${PODS_PODFILE_DIR_PATH}/Podfile.lock", "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; + 167426ED05719818DF1200F5 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-RunnerTests/Pods-RunnerTests-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/OCMock/OCMock.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OCMock.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RunnerTests/Pods-RunnerTests-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; @@ -523,40 +540,50 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed\n/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin\n"; }; - 3C1065414114FFC1A695F30C /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-RunnerTests/Pods-RunnerTests-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/OCMock/OCMock.framework", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OCMock.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RunnerTests/Pods-RunnerTests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 49DB53F11513926D17758C29 /* [CP] Copy Pods Resources */ = { + 4CD3829E4C81C1F16D0DEBF9 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh", - "${PODS_CONFIGURATION_BUILD_DIR}/google_mobile_ads/google_mobile_ads.bundle", + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/GoogleUtilities/GoogleUtilities.framework", + "${BUILT_PRODUCTS_DIR}/PromisesObjC/FBLPromises.framework", + "${BUILT_PRODUCTS_DIR}/nanopb/nanopb.framework", + "${BUILT_PRODUCTS_DIR}/webview_flutter_wkwebview/webview_flutter_wkwebview.framework", ); - name = "[CP] Copy Pods Resources"; + name = "[CP] Embed Pods Frameworks"; outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/google_mobile_ads.bundle", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleUtilities.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBLPromises.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/nanopb.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/webview_flutter_wkwebview.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 7C9D7ED7E0B6542BE1F8DAB4 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; 9740EEB61CF901F6004384FC /* Run Script */ = { @@ -574,50 +601,22 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\n"; }; - D336851A73EADA4508A711A0 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/GoogleUtilities/GoogleUtilities.framework", - "${BUILT_PRODUCTS_DIR}/PromisesObjC/FBLPromises.framework", - "${BUILT_PRODUCTS_DIR}/nanopb/nanopb.framework", - "${BUILT_PRODUCTS_DIR}/webview_flutter_wkwebview/webview_flutter_wkwebview.framework", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleUtilities.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBLPromises.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/nanopb.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/webview_flutter_wkwebview.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - F0309092BBFE54C4077DB91D /* [CP] Check Pods Manifest.lock */ = { + F81A0C673F4DDD6F4EFE5D7F /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); - inputFileListPaths = ( - ); inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh", + "${PODS_CONFIGURATION_BUILD_DIR}/google_mobile_ads/google_mobile_ads.bundle", ); + name = "[CP] Copy Pods Resources"; outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/google_mobile_ads.bundle", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -856,7 +855,7 @@ }; 9E61AA1C29BBE51900801A83 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 49D53C9BFB8E1019F721B2A9 /* Pods-RunnerTests.debug.xcconfig */; + baseConfigurationReference = 33B3F49066B06106D1C77620 /* Pods-RunnerTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; @@ -882,7 +881,7 @@ }; 9E61AA1D29BBE51900801A83 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 11876BBEFD14DE336FDF468C /* Pods-RunnerTests.release.xcconfig */; + baseConfigurationReference = 36476A5EA323BF096F719E17 /* Pods-RunnerTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; diff --git a/packages/google_mobile_ads/example/ios/RunnerTests/FLTGoogleMobileAdsReaderWriterTest.m b/packages/google_mobile_ads/example/ios/RunnerTests/FLTGoogleMobileAdsReaderWriterTest.m index b59e2f313..01abb92b6 100644 --- a/packages/google_mobile_ads/example/ios/RunnerTests/FLTGoogleMobileAdsReaderWriterTest.m +++ b/packages/google_mobile_ads/example/ios/RunnerTests/FLTGoogleMobileAdsReaderWriterTest.m @@ -21,6 +21,7 @@ #import "FLTGoogleMobileAdsCollection_Internal.h" #import "FLTGoogleMobileAdsPlugin.h" #import "FLTGoogleMobileAdsReaderWriter_Internal.h" +#import "FLTMediationExtras.h" #import "FLTMobileAds_Internal.h" #import "FLTNativeTemplateColor.h" #import "FLTNativeTemplateFontStyle.h" @@ -35,6 +36,9 @@ @interface FLTTestAdSizeFactory : FLTAdSizeFactory @property(readonly) GADAdSize testAdSize; @end +@interface _FlutterMediationExtras : NSObject +@end + @implementation FLTGoogleMobileAdsReaderWriterTest { FlutterStandardMessageCodec *_messageCodec; FLTGoogleMobileAdsReaderWriter *_readerWriter; @@ -260,6 +264,8 @@ - (void)testEncodeDecodeFluidAdSize { } - (void)testEncodeDecodeAdRequest { + id mediationExtras = [[_FlutterMediationExtras alloc] init]; + mediationExtras.extras = @{@"test_key": @"test_value"}; FLTAdRequest *request = [[FLTAdRequest alloc] init]; request.keywords = @[ @"apple" ]; request.contentURL = @"banana"; @@ -268,6 +274,8 @@ - (void)testEncodeDecodeAdRequest { request.neighboringContentURLs = contentURLs; request.mediationExtrasIdentifier = @"identifier"; request.adMobExtras = @{@"key" : @"value"}; + NSArray> *mediationExtrasArray = @[mediationExtras]; + request.mediationExtras = mediationExtrasArray; NSData *encodedMessage = [_messageCodec encode:request]; FLTAdRequest *decodedRequest = [_messageCodec decode:encodedMessage]; @@ -279,9 +287,12 @@ - (void)testEncodeDecodeAdRequest { @"identifier"); XCTAssertEqualObjects(decodedRequest.adMobExtras, @{@"key" : @"value"}); XCTAssertEqualObjects(decodedRequest.requestAgent, @"request-agent"); + XCTAssertEqualObjects(decodedRequest.mediationExtras[0].extras, @{@"test_key": @"test_value"}); } - (void)testEncodeDecodeGAMAdRequest { + id mediationExtras = [[_FlutterMediationExtras alloc] init]; + mediationExtras.extras = @{@"test_key": @"test_value"}; FLTGAMAdRequest *request = [[FLTGAMAdRequest alloc] init]; request.keywords = @[ @"apple" ]; request.contentURL = @"banana"; @@ -293,6 +304,8 @@ - (void)testEncodeDecodeGAMAdRequest { request.pubProvidedID = @"pub-id"; request.mediationExtrasIdentifier = @"identifier"; request.adMobExtras = @{@"key" : @"value"}; + NSArray> *mediationExtrasArray = @[mediationExtras]; + request.mediationExtras = mediationExtrasArray; NSData *encodedMessage = [_messageCodec encode:request]; FLTGAMAdRequest *decodedRequest = [_messageCodec decode:encodedMessage]; @@ -309,6 +322,7 @@ - (void)testEncodeDecodeGAMAdRequest { @"identifier"); XCTAssertEqualObjects(decodedRequest.adMobExtras, @{@"key" : @"value"}); XCTAssertEqualObjects(decodedRequest.requestAgent, @"request-agent"); + XCTAssertEqualObjects(decodedRequest.mediationExtras[0].extras, @{@"test_key": @"test_value"}); } - (void)testEncodeDecodeRewardItem { @@ -780,3 +794,13 @@ - (GADAdSize)currentOrientationAnchoredAdaptiveBannerAdSizeWithWidth: return GADAdSizeFromCGSize(CGSizeMake(width.doubleValue, 0)); } @end + +@implementation _FlutterMediationExtras + +@synthesize extras; + +- (id _Nonnull)getMediationExtras { + return OCMProtocolMock(@protocol(GADAdNetworkExtras)); +} + +@end diff --git a/packages/google_mobile_ads/ios/Classes/FLTAd_Internal.h b/packages/google_mobile_ads/ios/Classes/FLTAd_Internal.h index 3691554a2..d26e3881d 100644 --- a/packages/google_mobile_ads/ios/Classes/FLTAd_Internal.h +++ b/packages/google_mobile_ads/ios/Classes/FLTAd_Internal.h @@ -94,7 +94,7 @@ DEPRECATED_MSG_ATTRIBUTE("Use mediationExtras instead."); @property NSDictionary *_Nullable adMobExtras; @property NSString *_Nonnull requestAgent; -@property NSArray *_Nullable mediationExtras; +@property NSArray> *_Nullable mediationExtras; - (GADRequest *_Nonnull)asGADRequest:(NSString *_Nonnull)adUnitId; @end diff --git a/packages/google_mobile_ads/ios/Classes/FLTGoogleMobileAdsPlugin.h b/packages/google_mobile_ads/ios/Classes/FLTGoogleMobileAdsPlugin.h index 4a3f2a79d..4227d2ceb 100644 --- a/packages/google_mobile_ads/ios/Classes/FLTGoogleMobileAdsPlugin.h +++ b/packages/google_mobile_ads/ios/Classes/FLTGoogleMobileAdsPlugin.h @@ -67,14 +67,14 @@ mediationNetworkExtrasProvider registry: (id _Nonnull) - registry; + registry __deprecated; /* * Unregisters any FLTMediationNetworkExtrasProvider that was associated with * the FLTGoogleMobileAdsPlugin in registry. */ + (void)unregisterMediationNetworkExtrasProvider: - (id _Nonnull)registry; + (id _Nonnull)registry __deprecated; /** * Adds a `FLTNativeAdFactory` used to create a `GADNativeAdView`s from a Native diff --git a/packages/google_mobile_ads/ios/Classes/FLTGoogleMobileAdsReaderWriter_Internal.m b/packages/google_mobile_ads/ios/Classes/FLTGoogleMobileAdsReaderWriter_Internal.m index e662f698d..24572e60f 100644 --- a/packages/google_mobile_ads/ios/Classes/FLTGoogleMobileAdsReaderWriter_Internal.m +++ b/packages/google_mobile_ads/ios/Classes/FLTGoogleMobileAdsReaderWriter_Internal.m @@ -400,7 +400,10 @@ - (void)writeValue:(id)value { [self writeValue:request.adMobExtras]; [self writeValue:request.mediationExtras]; } else if ([value conformsToProtocol:@protocol(FlutterMediationExtras)]) { - // Left empty since there's no need to write it back to the dart layer + [self writeByte:FLTAdmobFieldMediationExtras]; + NSObject *fltExtras = value; + [self writeValue:NSStringFromClass([fltExtras class])]; + [self writeValue:fltExtras.extras]; } else if ([value isKindOfClass:[FLTRewardItem class]]) { [self writeByte:FLTAdMobFieldRewardItem]; FLTRewardItem *item = value; diff --git a/packages/google_mobile_ads/ios/Classes/FLTMediationExtras.h b/packages/google_mobile_ads/ios/Classes/FLTMediationExtras.h index 966f6c654..398d612a4 100644 --- a/packages/google_mobile_ads/ios/Classes/FLTMediationExtras.h +++ b/packages/google_mobile_ads/ios/Classes/FLTMediationExtras.h @@ -22,7 +22,7 @@ @protocol FlutterMediationExtras // Pair of key-values to be stored received from the dart layer. -@property NSMutableDictionary *_Nullable extras; +@property NSDictionary *_Nullable extras; /** * Parses the values in @c extras to the required protocol to append Mediation diff --git a/packages/google_mobile_ads/ios/Classes/FLTMediationNetworkExtrasProvider.h b/packages/google_mobile_ads/ios/Classes/FLTMediationNetworkExtrasProvider.h index bc436c565..fafb93001 100644 --- a/packages/google_mobile_ads/ios/Classes/FLTMediationNetworkExtrasProvider.h +++ b/packages/google_mobile_ads/ios/Classes/FLTMediationNetworkExtrasProvider.h @@ -19,6 +19,7 @@ * An implementation of this protocol can be passed to FLTGoogleMobileAdsPlugin * using registerMediationNetworkExtrasProvider */ +__attribute__ ((deprecated)) @protocol FLTMediationNetworkExtrasProvider @required