赛马林 "The executable was signed with invalid entitlements"
Xamarin "The executable was signed with invalid entitlements"
我想在 iPhone 上测试我创建的 iOS 应用程序。构建成功,但当 xamarin studio 尝试通过 USB 将文件传输到我的 iPhone 时,我收到以下错误:
VerifyingApplication: 70%
PercentComplete: 40
Status: VerifyingApplication
ApplicationVerificationFailed: Failed to verify code signature of /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.yNZx88/extracted/<APPName>.app : 0xe8008016 (The executable was signed with invalid entitlements.)
error MT1006: Could not install the application '/Users/<NAME>/Projects/<APPName>/<APPName>/bin/iPhone/Debug/device-builds/iphone8.2-10.2.1/<APPNamr>.app' on the device '<DEVICEName>': Your code signing/provisioning profiles are not correctly configured. Probably you have an entitlement not supported by your current provisioning profile, or your device is not part of the current provisioning profile. Please check the iOS Device Log for details (error: 0xe8008016).
--- inner exception
Xamarin.Installation.FailedInstallException: Your code signing/provisioning profiles are not correctly configured. Probably you have an entitlement not supported by your current provisioning profile, or your device is not part of the current provisioning profile. Please check the iOS Device Log for details (error: 0xe8008016)
[...]
Application could not be uploaded to the device.
我是 xamarin 的新手,不知道该怎么做。苹果开发者账户可用,证书和配置文件已创建。 phone 添加到设备列表并创建标识符。
谁能帮帮我?
更新:
首先,确保 Mac 的 Xcode 和 Visual Studio 都更新到最新版本。如果更新 Xcode,请打开它。登录。如果它询问“是否安装额外的必需组件?”,请选择“安装”。然后重新打开更新后的VS。
使用 Mac 和 Xcode 的更新 Visual Studio,您可能会在启动到 [=94 时出现的“部署到设备”选项卡中获得所需的所有信息=](来自 VS)调试 | iPhone 您应用的版本。滚动到该选项卡的底部,查找类似以下的消息:
ApplicationVerificationFailed: Failed to verify code signature of ... (The executable was signed with invalid entitlements.)
... Your code signing/provisioning profiles are not correctly configured. Probably you have an entitlement not supported by your current provisioning profile, or your device is not part of the current provisioning profile. Please check the iOS Device Log for details (error: 0xe8008016).
在某些情况下,下面的说明不会比上面的说明提供更多有用的详细信息。例如,我没有看到(即使在 iOS 设备日志中)哪个 授权失败;我必须通过比较我的应用程序在 info.plist
中签入的权利与我正在使用的证书来解决上述问题。如有疑问,请尝试取消选中 info.plist
中的所有权利。再次部署。 (显然,任何需要授权的功能都无法使用,但至少您可以验证您是否能够在没有该错误消息的情况下进行部署。)
原回答:
(关于对问题的评论)您需要的不是 Xcode 中的日志 - 这些是 crash 日志。这里需要的是在Xamarin/View/Pads/"Device Log"。 安装应用程序时,消息将滚动 。
在 开始安装之前打开设备日志面板 - 它是来自您的phone 的消息的动态显示。 Select 你的 phone 从 pad 左上角的下拉列表中。 (任何时候,点击pad右上角的橡皮擦图标,清除旧消息。)
如果有很多消息滚动,则单击 i-inside-blue-circle 图标(工具提示“显示消息”)(取消select 它)以隐藏信息消息。确保 x-in-red-circle 图标(工具提示“显示错误”)是 selected.
安装失败后,将“select全部/复制/粘贴”到文本编辑器中。搜索安装失败。在它之前应该有一些提供更多信息的行。具体来说,它将阐明这两种可能性中的哪一种是问题所在:1) entitlements 或 2) 关于 device.
我敢打赌它的权利。您需要隔离导致问题的权利。您在使用 推送通知 吗? iCloud?这些可能是罪魁祸首。或者可能是 privacy 相关权利之一 - 确保您遵循最新 iOS 版本的当前说明:iOS 10 中添加了新的隐私设置,然后12,然后是 13 (IIRC)。
查看Entitlements.plist
的源代码。在远离项目的地方保存一份副本。以空白(空)开始Entitlements.plist
。 [添加一个具有该名称的空文本文件,如果您的项目文件夹中没有它。]然后您可以部署到 phone 吗?
当然,您将无法使用您需要的权利,虽然这是空白,但您应该能够启动应用程序的第一个屏幕,或者至少有一些 Apple 对话框询问用户是否要允许..你需要的任何权利..
然后添加到Entitlements.plist
,直到无法部署。然后 Google 针对该特定问题 - 希望有解决方案。
另一种可能是您的配置文件缺少您要求的权利。返回 Apple 开发者网站,其中列出了您的证书和配置文件。 Select 省。您正在使用的配置文件。在“启用的服务”下,确保它列出了您正在使用的服务。
(某些 Apple 功能不需要特定的权利;如果有疑问,请创建一个新的配置文件,并仔细查看您正在使用的任何功能的所有权利选项。)
我的这个修复:
- 右键单击 IOS 项目并单击选项
- 如果您在自定义权利下看到:Info.plist 然后将其更改为 Entitlements.plist
- 重新编译工程并测试
如果您的规定在添加和设置 "Entitlements.plist"(例如 Icloud)之前有效,那么:
您需要从配置中删除 "Entitlements.plist"。
项目选项 > IOS 捆绑包签名 > 自定义授权(留空)。
我在尝试注册远程通知时遇到了这个问题iOS。我在 Xamarin.iOS 项目中的 Entitlements.plist 中设置了推送通知功能,但系统地收到此错误:
ApplicationVerificationFailed: Failed to verify code signature of /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.vvvwk7/extracted/company.MyApp.Ios.app : 0xe8008016 (The executable was signed with invalid entitlements.)
我的权利设置正确,但问题是我使用的是通配符开发配置文件,它在 Apple 开发人员门户中没有推送通知功能。
我不得不更改为开发配置文件,我在苹果开发者门户中设置了推送通知功能,这解决了我的问题。
在我的例子中,该应用程序在我的 iPhone 12 Pro 上 运行 正常,但是当我尝试 运行 它在旧的 iPad Air 上时,我得到了这个错误。原来我在 https://developer.apple.com/account/resources/identifiers/list 中有多个标识符,我在 iPad 中配置了错误的标识符。
一旦我使用另一个标识符为 https://developer.apple.com/account/resources/profiles/list 中的 iPad 创建了配置文件,错误就消失了。
总结一下
- 确保 https://developer.apple.com/account/resources/identifiers/list 中的标识符已为您 运行 正在使用的应用程序配置。 App ID 应与 Info.plist.
中的 Bundle Identifier 匹配
- 确保您的设备已在 https://developer.apple.com/account/resources/devices/list 中注册。当连接到 mac 运行ning Xcode 时,您的设备应该会自动添加到此处,但可以通过从 Xcode Window/Devices 和模拟器复制 UDID 来手动添加.
- 确保 https://developer.apple.com/account/resources/profiles/list 中有一个配置文件将上面的标识符和设备配对
我想在 iPhone 上测试我创建的 iOS 应用程序。构建成功,但当 xamarin studio 尝试通过 USB 将文件传输到我的 iPhone 时,我收到以下错误:
VerifyingApplication: 70%
PercentComplete: 40
Status: VerifyingApplication
ApplicationVerificationFailed: Failed to verify code signature of /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.yNZx88/extracted/<APPName>.app : 0xe8008016 (The executable was signed with invalid entitlements.)
error MT1006: Could not install the application '/Users/<NAME>/Projects/<APPName>/<APPName>/bin/iPhone/Debug/device-builds/iphone8.2-10.2.1/<APPNamr>.app' on the device '<DEVICEName>': Your code signing/provisioning profiles are not correctly configured. Probably you have an entitlement not supported by your current provisioning profile, or your device is not part of the current provisioning profile. Please check the iOS Device Log for details (error: 0xe8008016).
--- inner exception
Xamarin.Installation.FailedInstallException: Your code signing/provisioning profiles are not correctly configured. Probably you have an entitlement not supported by your current provisioning profile, or your device is not part of the current provisioning profile. Please check the iOS Device Log for details (error: 0xe8008016)
[...]
Application could not be uploaded to the device.
我是 xamarin 的新手,不知道该怎么做。苹果开发者账户可用,证书和配置文件已创建。 phone 添加到设备列表并创建标识符。
谁能帮帮我?
更新:
首先,确保 Mac 的 Xcode 和 Visual Studio 都更新到最新版本。如果更新 Xcode,请打开它。登录。如果它询问“是否安装额外的必需组件?”,请选择“安装”。然后重新打开更新后的VS。
使用 Mac 和 Xcode 的更新 Visual Studio,您可能会在启动到 [=94 时出现的“部署到设备”选项卡中获得所需的所有信息=](来自 VS)调试 | iPhone 您应用的版本。滚动到该选项卡的底部,查找类似以下的消息:
ApplicationVerificationFailed: Failed to verify code signature of ... (The executable was signed with invalid entitlements.)
... Your code signing/provisioning profiles are not correctly configured. Probably you have an entitlement not supported by your current provisioning profile, or your device is not part of the current provisioning profile. Please check the iOS Device Log for details (error: 0xe8008016).
在某些情况下,下面的说明不会比上面的说明提供更多有用的详细信息。例如,我没有看到(即使在 iOS 设备日志中)哪个 授权失败;我必须通过比较我的应用程序在 info.plist
中签入的权利与我正在使用的证书来解决上述问题。如有疑问,请尝试取消选中 info.plist
中的所有权利。再次部署。 (显然,任何需要授权的功能都无法使用,但至少您可以验证您是否能够在没有该错误消息的情况下进行部署。)
原回答:
(关于对问题的评论)您需要的不是 Xcode 中的日志 - 这些是 crash 日志。这里需要的是在Xamarin/View/Pads/"Device Log"。 安装应用程序时,消息将滚动 。
在 开始安装之前打开设备日志面板 - 它是来自您的phone 的消息的动态显示。 Select 你的 phone 从 pad 左上角的下拉列表中。 (任何时候,点击pad右上角的橡皮擦图标,清除旧消息。)
如果有很多消息滚动,则单击 i-inside-blue-circle 图标(工具提示“显示消息”)(取消select 它)以隐藏信息消息。确保 x-in-red-circle 图标(工具提示“显示错误”)是 selected.
安装失败后,将“select全部/复制/粘贴”到文本编辑器中。搜索安装失败。在它之前应该有一些提供更多信息的行。具体来说,它将阐明这两种可能性中的哪一种是问题所在:1) entitlements 或 2) 关于 device.
我敢打赌它的权利。您需要隔离导致问题的权利。您在使用 推送通知 吗? iCloud?这些可能是罪魁祸首。或者可能是 privacy 相关权利之一 - 确保您遵循最新 iOS 版本的当前说明:iOS 10 中添加了新的隐私设置,然后12,然后是 13 (IIRC)。
查看Entitlements.plist
的源代码。在远离项目的地方保存一份副本。以空白(空)开始Entitlements.plist
。 [添加一个具有该名称的空文本文件,如果您的项目文件夹中没有它。]然后您可以部署到 phone 吗?
当然,您将无法使用您需要的权利,虽然这是空白,但您应该能够启动应用程序的第一个屏幕,或者至少有一些 Apple 对话框询问用户是否要允许..你需要的任何权利..
然后添加到Entitlements.plist
,直到无法部署。然后 Google 针对该特定问题 - 希望有解决方案。
另一种可能是您的配置文件缺少您要求的权利。返回 Apple 开发者网站,其中列出了您的证书和配置文件。 Select 省。您正在使用的配置文件。在“启用的服务”下,确保它列出了您正在使用的服务。
(某些 Apple 功能不需要特定的权利;如果有疑问,请创建一个新的配置文件,并仔细查看您正在使用的任何功能的所有权利选项。)
我的这个修复:
- 右键单击 IOS 项目并单击选项
- 如果您在自定义权利下看到:Info.plist 然后将其更改为 Entitlements.plist
- 重新编译工程并测试
如果您的规定在添加和设置 "Entitlements.plist"(例如 Icloud)之前有效,那么:
您需要从配置中删除 "Entitlements.plist"。
项目选项 > IOS 捆绑包签名 > 自定义授权(留空)。
我在尝试注册远程通知时遇到了这个问题iOS。我在 Xamarin.iOS 项目中的 Entitlements.plist 中设置了推送通知功能,但系统地收到此错误:
ApplicationVerificationFailed: Failed to verify code signature of /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.vvvwk7/extracted/company.MyApp.Ios.app : 0xe8008016 (The executable was signed with invalid entitlements.)
我的权利设置正确,但问题是我使用的是通配符开发配置文件,它在 Apple 开发人员门户中没有推送通知功能。 我不得不更改为开发配置文件,我在苹果开发者门户中设置了推送通知功能,这解决了我的问题。
在我的例子中,该应用程序在我的 iPhone 12 Pro 上 运行 正常,但是当我尝试 运行 它在旧的 iPad Air 上时,我得到了这个错误。原来我在 https://developer.apple.com/account/resources/identifiers/list 中有多个标识符,我在 iPad 中配置了错误的标识符。
一旦我使用另一个标识符为 https://developer.apple.com/account/resources/profiles/list 中的 iPad 创建了配置文件,错误就消失了。
总结一下
- 确保 https://developer.apple.com/account/resources/identifiers/list 中的标识符已为您 运行 正在使用的应用程序配置。 App ID 应与 Info.plist. 中的 Bundle Identifier 匹配
- 确保您的设备已在 https://developer.apple.com/account/resources/devices/list 中注册。当连接到 mac 运行ning Xcode 时,您的设备应该会自动添加到此处,但可以通过从 Xcode Window/Devices 和模拟器复制 UDID 来手动添加.
- 确保 https://developer.apple.com/account/resources/profiles/list 中有一个配置文件将上面的标识符和设备配对