我正在尝试将
pod'SalesforceSDKCore' pod 'MobileSync'
添加到我的 iOS 项目中,但安装 pod 后,在构建项目后出现以下错误。
错误详细信息:
rsync error: some files could not be transferred (code 23) at /AppleInternal/Library/BuildRoots/ce725a5f-c761-11ee-]a4ecb6ef2fd8d87b/Library/Caches/com.apple.xbs/Sources/rsync/rsync/main.c(996) [sender=2.6.9]Command PhaseScriptExecution failed with a nonzero exit code
按照 https://trailhead.salesforce.com/content/learn/modules/mobile_sdk_native_ios/mobilesdk_ios_cocoapods
中的说明添加了 pod# needs to be first
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
pod 'SalesforceSDKCore'
pod 'MobileSync'
尝试将这些行添加到您的 PodFile 中
Cocoapods 现在存在问题,因为 Xcode 14.3 现在在框架的符号链接中使用相对路径。
要么等待 Cocoapods 版本 1.12.1 的发布,要么在 Pods-APPNAME-frameworks.sh 文件中进行以下简单更改:
更换:
if [ -L "${source}" ]; then
echo "Symlinked..."
source="$(readlink "${source}")"
fi
与:
if [ -L "${source}" ]; then
echo "Symlinked..."
source="$(readlink -f "${source}")"
fi
请注意添加了 -f。
也尝试更新你的cocoapods版本
sudo gem install cocoapods