【问题标题】:Trouble with device debugging in Xcode10.3 "iPhone has denied the launch request. Internal launch error: process launch failed: Unspecified"Xcode10.3 中的设备调试问题“iPhone 已拒绝启动请求。内部启动错误:进程启动失败:未指定”
【发布时间】:2019-09-17 17:29:53
【问题描述】:

在真机调试时,出现如下问题。

Could not launch “MY-APP-NAME” iPhone has denied the launch request.
Internal launch error: process launch failed: Unspecified

error message

  • 使用 Xcode 10.3 和 Firebase 消息传递云。
  • 更改配置文件和捆绑 ID 后,会出现这种情况。
  • 这使用一年会员帐户Provisioning Profile for Development
  • 使用模拟器时不会出现问题。
  • 虽然我更改了:Product > Scheme > Edit Scheme > Run > Executable to Ask On Launch,但这不起作用。
  • 取消选中 Product > Scheme > Edit Scheme > Run > Debug executable 也不起作用。
  • rm -r ~/Library/MobileDevice/Provisioning\ Profiles/。没用。
  • rm -r ~/Library/Developer/CoreSimulator/Devices/。对我也不起作用。
  • 因为似乎是Provision Profile 的问题,所以我尝试修复。但是,我无法找到解决方案。
  • 当涉及到另一个新项目时,出现了同样的错误。
  • 另一台设备也出现此问题。
  • 控制台中显示的内容如下:
    • The process failed to exec
    • Unable to bootstrap process with bundleID MY-APP-NAME
    • Unable to get valid task name port right for pid 635
    • The request was denied by service delegate (SBMainWorkspace) for reason: Unspecified.
Bootstrap failed with error: <NSError: 0x280617810; domain:
BKSProcessErrorDomain; code: 1 (bootstrap-failed); reason: "Failed to start job">
Bootstrapping failed for <FBApplicationProcess: 0x16465a240;
MY-APP-NAME; pid: -1> with error: Error Domain=BKSProcessErrorDomain Code=1 "Unable to bootstrap process with bundleID MY-APP-BUNDLE-ID” UserInfo={NSLocalizedDescription=Unable to bootstrap process with bundleID MY-APP-NAME, BKSProcessExitReason=0, NSLocalizedFailureReason=Failed to start job, NSUnderlyingError=0x28061cb40 {Error Domain=NSPOSIXErrorDomain Code=3 "No such process" UserInfo={NSLocalizedFailureReason=The process failed to exec, NSLocalizedRecoverySuggestion=Consult /var/log/com.apple.xpc.launchd/launchd.log for more information, 
NSLocalizedDescription=Unable to get valid task name port right for pid 635}}, BSErrorCodeDescription=bootstrap-failed}
FBSSystemService][0x1555] Error handling open request for MY-APP-NAME: <NSError: 0x281674420; domain: FBSOpenApplicationServiceErrorDomain; code: 1 (RequestDenied); reason: "The request was denied by service delegate (SBMainWorkspace) for reason: Unspecified."> {
description = "The request to open "MY-APP-NAME" failed.";
failureReason = "The request was denied by service delegate (SBMainWorkspace) for reason: Unspecified.";
userInfo = {
    FBSOpenApplicationRequestID = <__NSCFNumber: 0xa56f4bb69cbc0302>;
}
underlyingError = <NSError: 0x281674450; domain: FBSOpenApplicationErrorDomain; code: 1 (Unspecified)> {
    description = "The operation couldn’t be completed.
    (FBSOpenApplicationErrorDomain error 1.)";
  };
}

【问题讨论】:

    标签: swift xcode swift4


    【解决方案1】:

    如果您在 Signing & Capabilities 选项卡下将团队设置为 个人团队,并且您没有看到任何错误。所以只剩下一件事了。

    1. 转到您的设备设置。
    2. 导航到将军。
    3. 转到设备管理。
    4. 信任开发者应用下指定的行。

    【讨论】:

      【解决方案2】:

      无论如何,我错过了一些信息......

      1) 如果您没有解锁设备,Xcode 会显示“拒绝”。 2)为什么是“MY-APP-NAME”?您是否设置了应用名称? 3) 你使用的是普通的 Swift 代码还是某种框架? 4)您购买了开发帐户吗?您是否使用证书/配置文件制作了所有东西?

      无论如何,我建议从 XCode 中创建一个普通的、普通的项目,而无需编写任何东西。 添加您的开发配置文件,它应该可以工作。

      【讨论】:

      • 感谢您的评论。1)如果我解锁了设备,这并没有解决 2)对不起,这应该与 bundleID 交替使用。 3)我正在使用带有 cocoapods 的框架。 4) 我的帐户已更改为购买帐户,这可能是原因。
      • 请修正应用名称,必须与应用商店中的应用匹配。
      • 它没有解决,即使我创建了一个新项目......你能想到可能导致这种情况的任何原因吗?
      【解决方案3】:

      确保调试未设置为使用分发配置文件 - 应设置为开发

      【讨论】:

        【解决方案4】:

        我通过删除所有与 Xcode 相关的认证解决了这个问题。我删除了所有与 Xcode 相关的文件,目的是清除所有内容。

        1. 打开Keychain Access
        2. 删除Apple Worldwide Developer Relations Certification Authority
        3. 删除iPhone Developer: NAME (*****)
        4. 删除iOS Developer: NAME (NAME)
        5. 在Keychain Access中搜索Xcode,删除所有能看到的项目(我记得这个↓)
          1. Xcode-Token
          2. Xcode-AlternateDSID
        6. 在Keychain Access中搜索iOS,删除所有能看到的项目
        7. 在钥匙串访问中搜索Developer,删除所有能看到的项目

        【讨论】:

          【解决方案5】:

          Apple 有时会升级开发者关系中级证书。它可能不会在钥匙串中更新。

          1. 删除所有旧证书
          2. 获取最新证书here 并安装

          参考:https://developer.apple.com/support/expiration/

          【讨论】:

            猜你喜欢
            • 1970-01-01
            • 2018-01-07
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            • 2012-12-20
            • 2012-10-21
            相关资源
            最近更新 更多