Gank is on the lookout for a solution from a good supply:
Learn how to add admob in my iOS app
A number of instructions produce ‘/Customers/gan/Library/Developer/Xcode/DerivedData/xx-fpgsryfzwqufgxcplcdfxrycppjh/Construct/Merchandise/Debug-iphonesimulator/xx.app/Information.plist’
Goal ‘xx’ (challenge ‘xx’) has copy command from ‘/Customers/gan/Downloads/xx/Information.plist’ to ‘/Customers/gan/Library/Developer/Xcode/DerivedData/x-xfpgsryfzwqufgxcplcdfxrycppjh/Construct/Merchandise/Debug-iphonesimulator/xx.app/Information.plist’
Goal ‘xx’ (challenge ‘xx’) has course of command with output ‘/Customers/gan/Library/Developer/Xcode/DerivedData/xx-fpgsryfzwqufgxcplcdfxrycppjh/Construct/Merchandise/Debug-iphonesimulator/xx.app/Information.plist’
The file content material is:
<?xml model=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE plist PUBLIC “-//Apple//DTD PLIST 1.0//EN” “http://www.apple.com/DTDs/PropertyList-1.0.dtd”>
<plist model=”1.0″>
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>GADApplicationIdentifier</key>
<string>ca-app-pub-3940256099942544~1458002511</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>SKAdNetworkItems</key>
<array>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>cstr6suwn9.skadnetwork</string>
</dict>
</array>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<true/>
</dict>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UILaunchScreen</key>
<dict/>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
After I eliminated the Information.plist within the construct rule settings, it has this error:
*** Terminating app attributable to uncaught exception ‘GADInvalidInitializationException’, cause: ‘The Google Cell Advertisements SDK was initialized with out an utility ID. Google AdMob publishers, observe directions at https://googlemobileadssdk.web page.hyperlink/admob-ios-update-plist to set a legitimate utility ID. Google Advert Supervisor publishers, observe directions at https://googlemobileadssdk.web page.hyperlink/ad-manager-ios-update-plist.’
That is my code:
import SwiftUI
import GoogleMobileAds
class AppDelegate: NSObject, UIApplicationDelegate {
func utility(_ utility: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
GADMobileAds.sharedInstance().begin(completionHandler: nil)
return true
}
}
@most important
struct CatAPIProjectApp: App {
@UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
var physique: some Scene {
WindowGroup {
ContentView()
}
}
}