react-native: iOS unable to archive [RN 0.63.2] - Target 'React-Core.common-AccessibilityResources' has create directory command with output
Description
I am unable to archive the project for release.
React Native version:
System:
OS: macOS 10.15.3
CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
Memory: 5.95 GB / 16.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 8.9.4 - /usr/local/bin/node
Yarn: Not Found
npm: 6.9.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.8.4 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 13.5, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
Android SDK:
API Levels: 23, 25, 26, 27, 28, 29
Build Tools: 26.0.2, 26.0.3, 27.0.2, 27.0.3, 28.0.2, 28.0.3, 29.0.2
System Images: android-28 | Google Play Intel x86 Atom, android-P | Google APIs Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 4.0 AI-193.6911.18.40.6626763
Xcode: 11.5/11E608c - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_172 - /usr/bin/javac
Python: 2.7.14 - /usr/local/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.13.1 => 16.13.1
react-native: 0.63.2 => 0.63.2
npmGlobalPackages:
*react-native*: Not Found
Steps To Reproduce
Archive a RN project at 0.63.2
with new build system
in xCode 11.5 after upgrading from RN 0.61.x
or lower.
Error encountered:
Multiple commands produce '/Users/.../Library/Developer/Xcode/DerivedData/...-ajoyscixyrdigdfuscjixbqjltzi/Build/Intermediates.noindex/ArchiveIntermediates/.../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AccessibilityResources.bundle':
1) Target 'React-Core.common-AccessibilityResources' has create directory command with output '/Users/.../Library/Developer/Xcode/DerivedData/...-ajoyscixyrdigdfuscjixbqjltzi/Build/Intermediates.noindex/ArchiveIntermediates/.../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AccessibilityResources.bundle'
2) Target 'React-Core.common-CoreModulesHeaders-AccessibilityResources' has create directory command with output '/Users/.../Library/Developer/Xcode/DerivedData/...-ajoyscixyrdigdfuscjixbqjltzi/Build/Intermediates.noindex/ArchiveIntermediates/.../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AccessibilityResources.bundle'
Current Workaround:
Remove target in your Podfile
. It should look something like this (react-native 0.63.2
):
Note: ONLY remove React-Core.common-AccessibilityResources
target 'yourapp' do
# your pods go here
config = use_native_modules!
use_react_native!(:path => config["reactNativePath"])
# Enables Flipper.
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable these next few lines.
use_flipper!
post_install do |installer|
flipper_post_install(installer)
installer.pods_project.targets.each do |target|
if target.name == "React-Core.common-AccessibilityResources"
target.remove_from_project
end
end
end
end
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 32
- Comments: 44
5 rebuild your project
I faced the same issue when doing Product -> Archive:
I tried to remove pods related to AccessibilityResources. But then I get this problem:
and running ‘pod install’ just restores deleted pods back.
I managed to fix the issue by moving reference to react-native-permissions package inside target block in Podfile:
and now Archive completes successfully!
I had a couple of days attending this problem but I’m still getting same error or related error after testing different “solutions”
My project contains a Notification Extension and I’m getting this issue but instead to have it related with main target, i have the related with the extension.
Following Current Workaround provided on issue description, I’m getting this error on my Notification Extension:
error: Resource "/Users/angeeeld/Library/Developer/Xcode/DerivedData/..../BuildProductsPath/Release-iphoneos/React-Core.common/AccessibilityResources.bundle" not found. Run 'pod install' to update the copy resources script.
Any idea how to address the issue?
Meanwhile, I will continue on my research, if I found something, I won’t hesitate on let you know.
Check your Podfiles. When you enter Build Phases -> Copy Pods Resources You should have(React-Core, not React-Core.common):
I also have Permissions Notification pod added above config, use_react_native!:
one solution if you use multiple targets, you need use use_react_native! at all targets, so the pod won’t generate duplicate targets.
react native 0.63 add one target “AccessibilityResources” which run copy bundle resources if duplicate targets, the errors occurs.
before
[
](url)
after
having the same issue on RN 0.66.3. Tried some solutions here and none works. Here is the error when archiving:
Hi, I wanted to know where you find “React-Core.common-AccessibilityResources”, I think I don’t have this one that’s why I have this error:
error: Resource "/Users/cedricjung/Library/Developer/Xcode/DerivedData/decouverto-asvavlxsbksyvhgovxmjpnlracmz/Build/Intermediates.noindex/ArchiveIntermediates/decouverto/BuildProductsPath/Release-iphoneos/React-Core/AccessibilityResources.bundle" not found. Run 'pod install' to update the copy resources script.
@sbin1211 how to you access to this menu ?
@AngeeelD did you found any answer ? @tp26610 's answer is not possible for me as I do not use OneSignal. Thank you all !
No this didn’t work, I already tried it.
Try: $ pod deintegrate $ pod install
Thanks! Worked for me!
This solution helped me!
I figured out what causes problems with multiple targets for me. It’s very silly but the same as people commented before, it’s very possible that something is typed wrong in the pod file, so I found
use_native_modules!()
line of code that is repeated 😬Before:
Now (removed
use_native_modules!()
):This fixes all doubled dependencies from pods. Hope this helps you, just look precisely at the podfile 😃
Had this issue on new Mac with M1 and react-native 0.64.0. I had to use combination of moving these two lines and adding use_react_native! under all targets.
If it not works for you, then try doing: -> pod cache clean --all -> pod update. Thats clears up things for me and helped to work.
Also experiencing the same issue, after following the recommended solutions above. I’ve lost 4 hours, and the archive process continues to fail on what appears to be the final steps due to this same error.
Also tried looking for all other
React-Core.common
throughout the project files, and the only other one is in reference to the headers. I tried removing that one, just in case it fixed the issue, but not such luck. Something still seems to be referencing React-Core.common, but I can’t find what it is.EDIT: It may just be my specific use case, but I realized I’d forgot to correctly update the podfile. The upgrade helper at https://react-native-community.github.io/upgrade-helper/?from=0.62.2&to=0.63.3 makes some notable changes to the podfile, primarily stripping out a lot of the individual packages, and replacing it with 2-3 lines of code.
After changing this, I managed to successfully archive my project (though I now have a somewhat related issue with RCTUserDefaults, though that’s out of the scope of this ticket).