ios - 无法打开,因为您没有查看权限 - React Native - Expo?

标签 ios xcode react-native expo

使用 expo eject 退出 Expo 项目后,并尝试使用 Xcode“11.7”和命令行“For iOS ”运行项目
我收到了这些错误,
笔记:

Android Works well after ejecting

iOS & Android Works well before Ejecting.


Xcode
Details

The file “MyApp” couldn’t be opened because you don’t have permission to view it.
Domain: NSCocoaErrorDomain
Code: 257
Failure Reason: You don’t have permission.
Recovery Suggestion: To view or change permissions, select the item in the Finder and choose File > Get Info.
User Info: {
    NSFilePath = "/Users/username/Library/Developer/Xcode/DerivedData/MyApp-bnfffrwsrhskljawuujrmpuwldgt/Build/Products/Debug-iphonesimulator/MyApp.app";
}
--
The operation couldn’t be completed. Permission denied
Domain: NSPOSIXErrorDomain
Code: 13
Failure Reason: Permission denied
--


System Information

macOS Version 10.14.6 (Build 18G95)
Xcode 11.7 (16142)
架构
Architectures
命令行

npx react-native run-ios

info Found Xcode workspace "MyApp.xcworkspace"
info Launching iPhone 11 (iOS 13.7)
info Building (using "xcodebuild -workspace MyApp.xcworkspace -configuration Debug -scheme MyApp -destination id=60F7E669-0AE4-4CF3-9BC8-17027D01B172")
success Successfully built the app
info Installing "/Users/username/Library/Developer/Xcode/DerivedData/MyApp-bnfffrwsrhskljawuujrmpuwldgt/Build/Products/Debug-iphonesimulator/MyApp.app"
An error was encountered processing the command (domain=IXUserPresentableErrorDomain, code=1):
This app could not be installed at this time.
Could not install at this time.
Failed to chmod /Users/username/Library/Developer/CoreSimulator/Devices/60F7E669-0AE4-4CF3-9BC8-17027D01B172/data/Bundle/Application/3C7513F0-9BFE-4C94-A722-7C1BE6898E54/MyApp.app/MyApp : No such file or directory
Underlying error (domain=MIInstallerErrorDomain, code=4):
        Failed to chmod /Users/username/Library/Developer/CoreSimulator/Devices/60F7E669-0AE4-4CF3-9BC8-17027D01B172/data/Bundle/Application/3C7513F0-9BFE-4C94-A722-7C1BE6898E54/MyApp.app/MyApp : No such file or directory
info Launching "com.MyApp"
error Failed to launch the app on simulator, An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain, code=1):
The request to open "com.MyApp" failed.
The request was denied by service delegate (SBMainWorkspace) for reason: NotFound ("Application "com.MyApp" is unknown to FrontBoard").
Underlying error (domain=FBSOpenApplicationErrorDomain, code=4):
        The operation couldn’t be completed. Application "com.MyApp" is unknown to FrontBoard.
        Application "com.MyApp" is unknown to FrontBoard.

最佳答案

  • 失败原因:你没有权限。

  • 首先请务必删除派生数据
    如果它不起作用,请更改 终端许可 .详细链接是 here

    可能你不需要这个,但以防万一:
    也许用 csrutil disable 禁用系统完整性保护为你工作。
    强烈建议您阅读 Apple document第一的。

    关于ios - 无法打开,因为您没有查看权限 - React Native - Expo?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65548746/

    相关文章:

    ios - 为什么升级到 0.63.3 后命令 'react-native run-ios' 构建失败?

    ios - 如何在 Swift 中使用只读属性来符合 Objective-C 协议(protocol)

    ios - 尝试用 nsmutablearray 呈现 uitableview

    objective-c - 无法触发 UITableView 委托(delegate)方法 "DidSelectRowAtIndexPath"

    ios - Clang 可空性警告以及如何处理它们

    ios - 将 Xcode 6.4 更新到 Xcode 7.0 后,NSData dataWithContentsOfURL 为空

    react-native - React Native Touchable 高亮显示,按下时打开链接。

    ios - 如何更改具有透明区域的UIIMAGE的色调?

    objective-c - UITableViewCell 文本推送到 viewController

    javascript - React Native Undefined 不是一个对象(评估'userData.id)