多个命令会产生‘/Users/gan/Library/Developer/Xcode/DerivedData/xx-fpgsryfzwqufgxcplcdfxrycppjh/Build/Products/Debug-iphonesimulator/xx.app/Info.plist’

目标‘xx’(项目‘xx’)具有从‘/USERS/GAN/DOWNLOADS/xx/Info.plist’到‘/Users/gan/Library/Developer/Xcode/DerivedData/x-xfpgsryfzwqufgxcplcdfxrycppjh/Build/Products/Debug-iphonesimulator/xx.app/Info.plist’的复制命令 目标‘xx’(项目‘xx’)具有带有输出‘/Users/gan/Library/Developer/Xcode/DerivedData/xx-fpgsryfzwqufgxcplcdfxrycppjh/Build/Products/Debug-iphonesimulator/xx.app/Info.plist’的进程命令

enter image description here

文件内容为:

<?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>

在我删除构建规则设置中的Info.plist后,它出现以下错误: *由于未捕获异常‘GADInvalidInitializationException’而终止应用程序,原因:‘Google Mobile Adds SDK初始化时没有应用程序ID.Google AdMob发布者,请按照https://googlemobileadssdk.page.link/admob-ios-update-plist中的说明设置有效的应用程序ID.Google AdManager发布者,请遵循https://googlemobileadssdk.page.link/ad-manager-ios-update-plist.'中的说明

这是我的代码:

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()
        }
    }
}

推荐答案

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. enter image description here

Ios相关问答推荐

自定义alert 未执行任何操作

与iPadOS中带有扣件的模式相似的组件是什么?

当包含UITextView的inputAccessoryView显示键盘时,iOS UITableView内容会出现UINavigationBar奇怪的错误

如何通过S定义的对象设置删除基于块的观察者的测试?

带有RadStudio 11.3/12的Mac Mini M2(Sonoma 14.2.1)上的PAServer-测试连接按钮有效,但部署不起作用

NSHashTable要求任何MyCustomProtocolAnyObject都是类类型

发生错误.请稍后重试.在 App Store 连接中

@Query与SwiftData数据列表绑定

在 SwiftUI 中放置全局 NavigationPath 的位置

如何在 SwiftUI 中只显示一次随机数组的项目?

如何在 SwiftUI 上制作可点击的map route?

缺少推送通知权利

如何设置imageView的圆角半径?

'+entityForName: nil 不是合法的 NSManagedObjectContext 参数 - 核心数据

如何在 OS X 或 iOS(不使用格式塔)中确定运行时的操作系统版本?

从 NSUserDefaults 字典 iOS 中删除所有键

Xcode:此时无法安装此应用程序.

NSPredicate 用于测试 NULL 和空白字符串

iOS UITextView 或 UILabel 带有可点击的动作链接

UIView - 加载视图时如何获得通知?