首页 > 解决方案 > 应用程序在 Xcode 模拟器上运行,但在连接我的手机时显示错误

问题描述

我无法在我的 iPhone XR 上运行该应用程序,但同一个应用程序在模拟器中完美运行,没有错误。这些是 Xcode 在尝试在我的手机上运行时显示的错误。应用名称是HelloWorld

Showing Recent Errors Only
Failed to register bundle identifier. The app identifier "test.HelloWorld" cannot be registered to your development team because it is not available. Change your bundle identifier to a unique string to try again.

Showing Recent Messages
No profiles for 'test.HelloWorld' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'test.HelloWorld'.

我没有做任何与上述“开发团队设置”相关的事情。我该如何解决这个问题?

标签: swiftiphonexcode

解决方案


您需要在项目设置中更改捆绑标识符单击您的项目 > 选择您的目标 > 常规 > 捆绑标识符。每个应用程序都有一个唯一的包标识符,用于从其他应用程序中识别他们的应用程序。您现在使用的捆绑包 ID 已被其他人占用。真实设备需要配置文件,如果您拥有正确的捆绑 ID,则会自动为您制作配置文件。Bundle ID 的约定是 com.yournameorcompany.yourappname

刮刀


推荐阅读