英文:
Archive Failing in Xcode 14.3 update While using CocoaPods
问题
我正在尝试创建我的项目存档,但失败了,出现以下错误:
sync --delete -av --filter P .*.?????? --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "../../../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Alamofire.framework" "/[AppPath]/Build/Intermediates.noindex/ArchiveIntermediates/QA/InstallationBuildProductsLocation/Applications/[APP NAME].app/Frameworks"
building file list ... rsync: link_stat "/[APP_PATH]../../../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Alamofire.framework" failed: No such file or directory (2)
done
sent 29 bytes received 20 bytes 98.00 bytes/sec
total size is 0 speedup is 0.00
rsync error: some files could not be transferred (code 23) at /AppleInternal/Library/BuildRoots/9e200cfa-7d96-11ed-886f-a23c4f261b56/Library/Caches/com.apple.xbs/Sources/rsync/rsync/main.c(996) [sender=2.6.9]
Command PhaseScriptExecution failed with a nonzero exit code
- MacBook:M1 MacBook Pro
- MacOS:Ventura 13.2.1
- Xcode版本:14.3
- Pods版本:1.12.0
以下是我的PODFILE:
# Uncomment the next line to define a global platform for your project
platform :ios, '13.0'
target '[APP NAME]' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
pod 'Moya', '~> 14.0.0'
pod 'Moya/RxSwift',' ~> 14.0.0'
pod 'Eureka'
pod 'SwiftSignalRClient'
pod 'Kingfisher'
#pod 'FMPhotoPicker', '~> 1.3.0'
pod 'iOSDropDown'
#Material TextFields
pod 'MaterialComponents/TextControls+OutlinedTextAreas'
pod 'MaterialComponents/TextControls+OutlinedTextFields'
pod 'Blueprints'
pod 'PhoneNumberKit'
pod 'Firebase/Analytics'
pod 'Firebase/Crashlytics'
pod 'FirebaseMessaging'
pod 'FittedSheets'
post_install do |installer|
installer.generated_projects.each do |project|
project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
end
end
end
end
end
我还注意到,如果我通过软件包管理器添加依赖项,我的存档会成功,但如果我使用CocoaPods,应用程序存档会失败。
英文:
I am trying to make an archive of my project but it fails, giving following error:
sync --delete -av --filter P .*.?????? --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "../../../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Alamofire.framework" "/[AppPath]/Build/Intermediates.noindex/ArchiveIntermediates/QA/InstallationBuildProductsLocation/Applications/[APP NAME].app/Frameworks"
building file list ... rsync: link_stat "/[APP_PATH]../../../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Alamofire.framework" failed: No such file or directory (2)
done
sent 29 bytes received 20 bytes 98.00 bytes/sec
total size is 0 speedup is 0.00
rsync error: some files could not be transferred (code 23) at /AppleInternal/Library/BuildRoots/9e200cfa-7d96-11ed-886f-a23c4f261b56/Library/Caches/com.apple.xbs/Sources/rsync/rsync/main.c(996) [sender=2.6.9]
Command PhaseScriptExecution failed with a nonzero exit code
- MacBook: M1 Macbook Pro
- MacOS: Ventura 13.2.1
- Xcode Version: 14.3
- Pods version: 1.12.0
Following is my PODFILE:
# Uncomment the next line to define a global platform for your project
platform :ios, '13.0'
target '[APP NAME]' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
pod 'Moya', '~> 14.0.0'
pod 'Moya/RxSwift',' ~> 14.0.0'
pod 'Eureka'
pod 'SwiftSignalRClient'
pod 'Kingfisher'
#pod 'FMPhotoPicker', '~> 1.3.0'
pod 'iOSDropDown'
#Material TextFields
pod 'MaterialComponents/TextControls+OutlinedTextAreas'
pod 'MaterialComponents/TextControls+OutlinedTextFields'
pod 'Blueprints'
pod 'PhoneNumberKit'
pod 'Firebase/Analytics'
pod 'Firebase/Crashlytics'
pod 'FirebaseMessaging'
pod 'FittedSheets'
post_install do |installer|
installer.generated_projects.each do |project|
project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
end
end
end
end
end
I have also note that if I add my dependencies via package manager my archvive is successful but in case if I use CocoaPods App Archive fails
答案1
得分: 4
这已在 CocoaPods 1.12.1 中修复。
在更新 CocoaPods 后,还需要在项目中更新您的 Pods。
如果仍然不起作用,请尝试以下操作:
pod deintegrate
pod install
英文:
This has been fixed in cocoa pods 1.12.1.
After updating cocoa pods, also update your pods in the project.
If it still does not work, try this:
pod deintegrate
pod install
答案2
得分: 2
- 第一步
将下面的代码添加到你的 Podfile 中。('11.0' 取决于你的应用程序,适当修改)
post_install do |installer|
installer.generated_projects.each do |project|
project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
end
end
end
end
- 第二步
重新安装 Pods。
pod deintegrate
pod install
- 第三步
- 打开位于项目文件夹中的 'Pods-[Your App Name]-frameworks.sh' 文件。
- 找到代码
source="$(readlink "${source}")"
。 - 在上述代码中插入 '-f',如
source="$(readlink -f "${source}")"
。
- 第四步(如果你使用 Firebase Crashlytics)
- 在 Xcode 中打开位于以下路径的 'BuildPhases' 面板。
'Targets > [Your App Name] > BuildPhases' - 将 'Firebase Crashlytics' 移动到顺序的末尾。
Build Phases
英文:
- First
Add below code to your Podfile. ('11.0' depends on your app. change it appropriately.)
post_install do |installer|
installer.generated_projects.each do |project|
project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
end
end
end
end
- Second
Reinstall the pods.
pod deintegrate
pod install
- Third
- Open the file 'Pods-[Your App Name]-frameworks.sh' located in your project folder.
- Find the code
source="$(readlink "${source}")"
- Insert '-f' to the above code like
source="$(readlink -f "${source}")"
- Fourth(If you use Firebase crashlytics.)
- Open the 'BuildPhases' pannel with this path in Xcode.
'Targets> [Your App Name] > BuildPhases' - Move 'Firebase crashlytics' to the end of the order.
Build Phases
(In my case, the order of Build Phases was changed by Xcode 14.3, which caused a problem.
So, You should confirm the Firebase Crashlytics shell command is at the end of the order)
答案3
得分: -1
根据此问题,在更新 CocoaPods 后,我必须在我的 Podfile 中添加以下内容。请确保再次运行 'pod install':
post_install do |installer|
installer.pods_project.targets.each do |target|
# 修复 libarclite_xxx.a 文件未找到的问题。
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
end
end
end
英文:
As per this issue, I had to add the following to my Podfile after updating cocoapods. Be sure to run 'pod install' again:
post_install do |installer|
installer.pods_project.targets.each do |target|
# Fix libarclite_xxx.a file not found.
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
end
end
end
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论