The operation couldn’t be completed.
操作无法完成:更新开发者账号
Xcode --> Preferences --> Accounts --> Apple ID 左下角加号➕ --> Add Apple ID --> 输入对应的该项目所用到的开发者账号和密码–>登录,再去点击 Download Manual Profiles 下载手动配置文件
cannot be found: '…/node_modules/react-native/third-party/glog-0.3.4 || ‘config.h’ file not found
XCode升级到10,react-native运行报错: 进入到cd ./node_modules/react-native/third-party/glog-0.3.4 然后执行.sh 文件:…/…/scripts/ios-configure-glog.sh,查下check .h头文件的引用情况,然后建立关联关系即可解决
cd node_modules/react-native/third-party/glog-0.3.4/ && ../../scripts/ios-configure-glog.sh
cd node_modules/react-native/scripts && ./ios-install-third-party.sh
然后重启服务:npm start 或者clean project and build again
cannot be found: ’ /node_modules/react-native/Libraries/WebSocket/libfishhook.a’
XCode升级到10,react-native运行报错: 找到Libraries–> RCTWebSocket.xcodeproj(Build Phases) --> Link Binary With Libraries 点击减号去掉libfishhook.a引用—> 点击加号 再加回去即可
.h 文件未找到
项目 cd ios
pod install --verbose --no-repo-update
pod repo update CommentAssemblies && pod update --no-repo-update
pod update --no-repo-update 这条命令表示只根据本地目录更新库,不需要拉取远程
1、如果项目添加CocoaPods管理,有时候因为依赖关系或者版本问题不能编译,很有可能下载到我们本地报错。报错提示如下:
diff: /…/Podfile.lock: No such file or directory
diff: /Manifest.lock: No such file or directory
error: The sandbox is not in sync with the Podfile.lock. Run ‘pod install’ or update your CocoaPods installation.
解决方案: 删除lock文件,步骤:Build Phases -->Check Pods Manifest.lock—>删除
2、如果编译后提示 ‘xxx’ file not found:可能因为CocoaPods更新版本后,又是target问题
解决方案: 修改Podfile文件的内容 --> 终端输入命令:pod install
查看xcode版本命令行:xcodebuild -version
development cannot be enabled while your device is locked
运行找不到设备,手机未链接或重启Xcode即可;(重启ios手机 按住顶部按钮+主键10s会自动重启)
check if you have the right IPaddress in ‘RCTWebSocketExecutor.m’
失去链接,重新build一次即可
证书安装
symbol(s) not found for architecture arm64
一般是在引入第三方框架后,出现的编译错误
直接运行pod update, CocoaPods会把Podfile中所有的pod都更新到最新版本.(如果已经是最新版本了, 则不更新)
pod update
如何正确使用 pod install 和 pod update
1、pod install:在项目中第一次使用CocoaPods, 进行安装的时候使用这个命令.
在Podfile中增加或删除某个pod后, 也是使用这个命令
每次运行pod install命令, 下载并安装新的pod时, 它会为Podfile.lock文件中的每个pod写入已安装的版本. 此文件跟踪每个pod的已安装版本并锁定这些版本(.lock命名因此而来).
当运行pod install,它只解析Podfile.lock中尚未列在其中的pod的依赖库.
对于已经在Podfile.lock中列出的pod, Podfile.lock不会尝试检查是否有更新的版本.
对于尚未在Podfile.lock中列出的pod, 会搜索与Podfile匹配的版本或最新的版本.
注: 第一次运行pod install的时候, .xcworkspace项目和Pods目录还不存在, pod install命令也会创建.xcworkspace和Pods目录
2、pod update PODNAME, 它将会把指定的pod更新到最新版本,会忽略掉Podfile.lock中已经存在的版本
运行pod outdated:检查是否有更新pod的版本.