I’ve updated Xcode to 14.3 and suddenly I can’t “archive” my build but I can run it on my real devices/simulator.
I’ve rolled back to Xcode 14.2 and the “archive” works fine again and I was able to submit my app, but right now there are known issues with the latest Xcode.
opened 03:47AM - 07 Mar 23 UTC
closed 05:28PM - 03 Apr 23 UTC
<!--
WARNING: Please do not file issues for CocoaPods with projects
that use … React Native or Flutter. Please remove React Native or Flutter
in your sample app in order to properly demonstrate an issue with CocoaPods itself.
The integration between CocoaPods and React Native or Flutter
makes it very difficult for us to diagnose and fix issues.
Issues with React Native or Flutter will be closed.
Please file React Native issues at https://github.com/facebook/react-native
and Flutter issues at https://github.com/flutter/flutter.
-->
<!--
ℹ Please fill out this template when filing an issue.
All lines beginning with an ℹ symbol instruct you with
what info we expect.
Before you start, are you using the latest CocoaPods release?
A lot changes with Xcode releases that are not backwards compatible.
Not an issue about the CocoaPods command line app? Please file an issue in the appropriate repo - https://github.com/CocoaPods
Issues are for feature requests, and bugs; questions should go to Stack Overflow
Using CocoaPods <= 0.39: https://blog.cocoapods.org/Sharding/
Using Xcode 10.1: Requires CocoaPods 1.6.0 or above.
Issue with Nanaimo not loading:
Please run `[sudo] gem uninstall nanaimo` and remove all but the latest version.
Issues with `pod search`? Try deleting your cache `rm -rf ~/Library/Caches/CocoaPods`first.
-->
* [x] I've read and understood the [*CONTRIBUTING* guidelines and have done my best effort to follow](https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md).
# Report
## What did you do?
Archive an iOS app on Xcode Version 14.3 beta 2 (14E5207e)
## What did you expect to happen?
create an .ipa file
## What happened instead?
error below:
Xcode Version 14.3 beta 2 (14E5207e)
PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks /Users/***/Library/Developer/Xcode/DerivedData/***/Build/Intermediates.noindex/ArchiveIntermediates/Staging/IntermediateBuildFilesPath/**.build/Release-iphoneos/*.build/Script-887C37B6C54D972D35131B16.sh (in target '**' from project '**')
/bin/sh -c /Users/***/Library/Developer/Xcode/DerivedData/......./Script-887C37B6C54D972D35131B16.sh
Symlinked...
rsync --delete -av --filter P .*.?????? --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "../../../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Alamofire.framework" "/Users/***/Library/Developer/Xcode/DerivedData/***-fhmnysqlfziamdezcdnckgrfgtgn/Build/Intermediates.noindex/ArchiveIntermediates/Staging/InstallationBuildProductsLocation/Applications/***.app/Frameworks"
building file list ... rsync: link_stat "/Users/***/***App/iOSRelease/../../../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
Any solution for this issue?
none
## CocoaPods Environment
ℹ Please replace these two lines with the output of `pod env`.
e.g. via `pod env | pbcopy`
### Stack
```
CocoaPods : 1.11.3
Ruby : ruby 2.7.6p219 (2022-04-12 revision c9c2245c0a) [arm64-darwin21]
RubyGems : 3.1.6
Host : macOS 13.2.1 (22D68)
Xcode : 14.2 (14C18)
Git : git version 2.37.1 (Apple Git-137.1)
Ruby lib dir : /Users/***/.rbenv/versions/2.7.6/lib
Repositories : cocoapods - git - https://github.com/CocoaPods/Specs.git @ a8ba572ab530b5f51fddb18ce369c773d38522c7
MDLCocoapodSpecs - git - https://github.com/***/MDLCocoapodSpecs.git @ 67ff502c183138829b2aa3b9ec037ddb59bff66c
```
### Installation Source
```
Executable Path: /Users/***/.rbenv/versions/2.7.6/bin/pod
```
### Plugins
```
cocoapods-deintegrate : 1.0.5
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.1
cocoapods-trunk : 1.6.0
cocoapods-try : 1.2.0
```
### Podfile
```ruby
source 'git@github.com:****/MDLCocoapodSpecs.git'
source 'https://github.com/CocoaPods/Specs.git'
ensure_bundler! '~> 2.4.3'
project 'iOSRelease/****.xcodeproj', 'DebugStaging'=>:debug, 'DebugProduction'=>:debug
inhibit_all_warnings!
# Uncomment this line to define a global platform for your project
platform :ios, '13.0'
***
use_frameworks!
def shared_pods
****
end
target '****' do
shared_pods
app_test_shared_pods
config = use_native_modules!(".")
pod 'MMDrawerController', '~> 0.6.0'
****
pod 'Alamofire', '~> 5.6.2'
pod 'Polyline', '~> 5.1.0'
end
post_install do |installer_representation|
installer_representation.pods_project.targets.each do |target|
if ['****','IQShaker', '****'].include? target.name
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '5.0'
end
end
end
# Fixed iOS simulator Link error for arm64 architecture on xCode 12.* for Apple M1 chip?
# alse added on **** -> Build Settings -> Excluded architectures -> DebugStaging
installer_representation.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end
# Fixed XCode 14 signing pods issue
installer_representation.generated_projects.each do |project|
project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings["DEVELOPMENT_TEAM"] = "****"
end
end
end
#There was a code signing issue after use_frameworks, where each framework Provisioning Profile specifier was set to NO_SIGNING. This was breaking the build.
# The fix was to add the logic in pod file to go through each and explicitly set the PROVISIONING_PROFILE_SPECIFIER to ''
# Please refer: https://discuss.circleci.com/t/xcode-9-build-failures-due-to-code-signing-errors-in-pods/16713/2
installer_representation.pods_project.build_configurations.each do |config|
config.build_settings['PROVISIONING_PROFILE_SPECIFIER'] = ''
end
installer_representation.pods_project.targets.each do |target|
***
end
end
```
3 Likes
Yes, this looks like it’s a significant issue affecting the CocoaPods. It’s affecting several builds with Cordova, capacitor, and flutter.
At this moment we have to wait. A pull request has been made to solve this issue.
CocoaPods:master
← chrisvasselli:fix-xcode-14-3
opened 08:49AM - 23 Mar 23 UTC
🌈
Fixes the issue where archives fail when using Xcode 14.3. https://github.c… om/CocoaPods/CocoaPods/issues/11808
Xcode 14.3 is now using a relative path in its symlink for frameworks. Without the -f flag, this relative path would be evaluated relative to the working directory of the script being executed, instead of relative to the framework symlink itself. With the -f flag, it resolves that relative path and returns the full path to the source.
`bundle exec rake spec` failed, but it looks like maybe just because there were changes? Snapshot testing maybe? Also, it might make sense to add a test case to handle this scenario, but I don't know CocoaPods well enough to know what to add or where.
[rake.txt](https://github.com/CocoaPods/CocoaPods/files/11048739/rake.txt)
1 Like
update your cocoapods with
sudo gem install cocoapods
the issue has been fixed
we recommend using homebrew for installing CocoaPods, at least if using Apple Silicon computers as some dependencies don’t work well on Silicon chips when using gem install, so for updating you should do
brew update
brew upgrade cocoapods
1 Like
Thanks for the suggestion
Before executing the below steps I changed couple of pods deployment target to 12 !
Just updating cocoapods didn’t work for me. I had to change “Pods-App-frameworks.sh” file which is inside of Pods folder.
find it in “Pods → Targets Support Files → Pods-App → Pods-App-frameworks”
Replaced source=“$(readlink “${source}”)” with source=“$(readlink -f “${source}”)”
Just update CocoaPods and you’ll avoid having to do manual changes to files