Multiple commands produce ‘/Users/gan/Library/Developer/Xcode/DerivedData/xx-fpgsryfzwqufgxcplcdfxrycppjh/Build/Products/Debug-iphonesimulator/xx.app/Info.plist’
Target ‘xx’ (project ‘xx’) has copy command from ‘/Users/gan/Downloads/xx/Info.plist’ to ‘/Users/gan/Library/Developer/Xcode/DerivedData/x-xfpgsryfzwqufgxcplcdfxrycppjh/Build/Products/Debug-iphonesimulator/xx.app/Info.plist’
Target ‘xx’ (project ‘xx’) has process command with output ‘/Users/gan/Library/Developer/Xcode/DerivedData/xx-fpgsryfzwqufgxcplcdfxrycppjh/Build/Products/Debug-iphonesimulator/xx.app/Info.plist’
The file content is:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="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 removed the Info.plist in the build rule settings, it has this error:
*** Terminating app due to uncaught exception ‘GADInvalidInitializationException’, reason: ‘The Google Mobile Ads SDK was initialized without an application ID. Google AdMob publishers, follow instructions at https://googlemobileadssdk.page.link/admob-ios-update-plist to set a valid application ID. Google Ad Manager publishers, follow instructions at https://googlemobileadssdk.page.link/ad-manager-ios-update-plist
This is my code:
import SwiftUI
import GoogleMobileAds
class AppDelegate: NSObject, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
GADMobileAds.sharedInstance().start(completionHandler: nil)
return true
}
}
@main
struct CatAPIProjectApp: App {
@UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
2
Answers
Solved by just remove this file, there was an original Info.plist in the project, we can't see the file, just edit in the "Info" configuration, press "+" to add.
The
Multiple commands produce ... info.plist
means there are duplicateinfo.plist
files in the target. So there are two main reason and solutions for this:Uncheck
add to target
for one of them if they are using a identicalinfo.plist
If don’t identical, Merge them into a one single file.
Note that in the newer Xcode projects, the file behind the
info.plist
is hidden and you need to change the configuration of it by selecting the project file -> selecting the target -> and theInfo
section:You can also fallback to using a file by adding it to the project and changing the default settings for the path to it: