From 0713373e40cf7f67f78f42665a5abc7861617927 Mon Sep 17 00:00:00 2001 From: Yasien Mac Mini Date: Thu, 19 Jun 2025 11:18:08 +0200 Subject: [PATCH] Config iOS ads --- Frontend/ios/Podfile.lock | 15 +++++++++++++++ Frontend/ios/Runner.xcodeproj/project.pbxproj | 18 ++++++++++++++++++ Frontend/ios/Runner/Info.plist | 2 ++ Frontend/lib/mih_config/mih_env.dart | 18 +++++++++--------- 4 files changed, 44 insertions(+), 9 deletions(-) diff --git a/Frontend/ios/Podfile.lock b/Frontend/ios/Podfile.lock index ef183a27..eca87e34 100644 --- a/Frontend/ios/Podfile.lock +++ b/Frontend/ios/Podfile.lock @@ -47,6 +47,13 @@ PODS: - geolocator_apple (1.2.0): - Flutter - FlutterMacOS + - Google-Mobile-Ads-SDK (12.2.0): + - GoogleUserMessagingPlatform (>= 1.1) + - google_mobile_ads (6.0.0): + - Flutter + - Google-Mobile-Ads-SDK (~> 12.2.0) + - webview_flutter_wkwebview + - GoogleUserMessagingPlatform (3.0.0) - local_auth_darwin (0.0.1): - Flutter - FlutterMacOS @@ -84,6 +91,7 @@ DEPENDENCIES: - flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`) - flutter_tts (from `.symlinks/plugins/flutter_tts/ios`) - geolocator_apple (from `.symlinks/plugins/geolocator_apple/darwin`) + - google_mobile_ads (from `.symlinks/plugins/google_mobile_ads/ios`) - local_auth_darwin (from `.symlinks/plugins/local_auth_darwin/darwin`) - mobile_scanner (from `.symlinks/plugins/mobile_scanner/darwin`) - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) @@ -98,6 +106,8 @@ SPEC REPOS: trunk: - DKImagePickerController - DKPhotoGallery + - Google-Mobile-Ads-SDK + - GoogleUserMessagingPlatform - SDWebImage - SwiftyGif @@ -118,6 +128,8 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/flutter_tts/ios" geolocator_apple: :path: ".symlinks/plugins/geolocator_apple/darwin" + google_mobile_ads: + :path: ".symlinks/plugins/google_mobile_ads/ios" local_auth_darwin: :path: ".symlinks/plugins/local_auth_darwin/darwin" mobile_scanner: @@ -148,6 +160,9 @@ SPEC CHECKSUMS: flutter_native_splash: 35ddbc7228eafcb3969dcc5f1fbbe27c1145a4f0 flutter_tts: b88dbc8655d3dc961bc4a796e4e16a4cc1795833 geolocator_apple: ab36aa0e8b7d7a2d7639b3b4e48308394e8cef5e + Google-Mobile-Ads-SDK: 1dfb0c3cb46c7e2b00b0f4de74a1e06d9ea25d67 + google_mobile_ads: 535223588a6791b7a3cc3513a1bc7b89d12f3e62 + GoogleUserMessagingPlatform: f8d0cdad3ca835406755d0a69aa634f00e76d576 local_auth_darwin: 553ce4f9b16d3fdfeafce9cf042e7c9f77c1c391 mobile_scanner: 9157936403f5a0644ca3779a38ff8404c5434a93 path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564 diff --git a/Frontend/ios/Runner.xcodeproj/project.pbxproj b/Frontend/ios/Runner.xcodeproj/project.pbxproj index 5bb64111..c9660c5a 100644 --- a/Frontend/ios/Runner.xcodeproj/project.pbxproj +++ b/Frontend/ios/Runner.xcodeproj/project.pbxproj @@ -198,6 +198,7 @@ 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, CD2265EBFCCA7833EF5BB6D4 /* [CP] Embed Pods Frameworks */, + DB0F489F4E77F5797F339DD3 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -361,6 +362,23 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; + DB0F489F4E77F5797F339DD3 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ diff --git a/Frontend/ios/Runner/Info.plist b/Frontend/ios/Runner/Info.plist index d82416a0..9a4bd087 100644 --- a/Frontend/ios/Runner/Info.plist +++ b/Frontend/ios/Runner/Info.plist @@ -2,6 +2,8 @@ + GADApplicationIdentifier + ca-app-pub-4781880856775334~6935644635 CADisableMinimumFrameDurationOnPhone CFBundleDevelopmentRegion diff --git a/Frontend/lib/mih_config/mih_env.dart b/Frontend/lib/mih_config/mih_env.dart index 53b5bb44..827c6441 100644 --- a/Frontend/lib/mih_config/mih_env.dart +++ b/Frontend/lib/mih_config/mih_env.dart @@ -18,15 +18,15 @@ abstract class AppEnviroment { case Enviroment.dev: { //================= Android Dev Urls ================= - baseApiUrl = "http://10.0.2.2:8080"; - baseFileUrl = "http://10.0.2.2:9000"; - baseAiUrl = "http://10.0.2.2:11434"; - bannerAdUnitId = 'ca-app-pub-3940256099942544/9214589741'; + // baseApiUrl = "http://10.0.2.2:8080"; + // baseFileUrl = "http://10.0.2.2:9000"; + // baseAiUrl = "http://10.0.2.2:11434"; + // bannerAdUnitId = 'ca-app-pub-3940256099942544/9214589741'; //================= Web & iOS Dev Urls ================= - // baseApiUrl = "http://localhost:8080"; - // baseFileUrl = "http://localhost:9000"; - // baseAiUrl = "http://localhost:11434"; - // bannerAdUnitId = 'ca-app-pub-3940256099942544/2435281174'; + baseApiUrl = "http://localhost:8080"; + baseFileUrl = "http://localhost:9000"; + baseAiUrl = "http://localhost:11434"; + bannerAdUnitId = 'ca-app-pub-3940256099942544/2435281174'; break; } case Enviroment.prod: @@ -36,7 +36,7 @@ abstract class AppEnviroment { baseAiUrl = "https://ai.mzansi-innovation-hub.co.za"; bannerAdUnitId = Platform.isAndroid ? 'ca-app-pub-4781880856775334/8868663088' // Android - : 'Inset-iOS-Unit-Id'; // iOS + : 'ca-app-pub-4781880856775334/6640324682'; // iOS //fingerPrintPluginKey = 'h5X7a5j14iUZCobI1ZeX'; break; }