1

I am currently having issues when attempting to archive my project in Xcode. The following error below appears when archiving:

Error

The link Xcode 12 Error: Multiple commands produce AccessibilityResources.bundle mentions to remove React-Core.common-AccessibilityResources from my target but I do not have this under my target. Can someone please assist?

I am using Xcode version 12.1.

This is what I have in the workspace settings:

enter image description here

Thank you.

I changed the derived data location but still getting the same error:

enter image description here

I am now seeing the below error after updating my Podfile.

Current error: enter image description here

Updated Podfile: enter image description here

AJDee
  • 147
  • 1
  • 14

1 Answers1

0

Have a try with the below solution.

Initially clean the build cache data with the below steps:

  1. You can go to File > Workspace Settings if you are in a workspace environment or File > Project Settings for a regular project environment.
  2. Then click over the little grey arrow under the Derived data section and select your project folder and close the workspace and Xcode then delete the project directory from the derived data directory.
  3. Open the workspace again in Xcode and clean and rebuild the project.

Also, make sure that you have applied pod install after the package installation.

Then, open workspace and set the active scheme as Any ios Device (arm64, armv7)

  1. Click on Project from top Xcode Menu
  2. Then select Archive.

Have a break till the Archive process completes.

Remove the below lines from PodFile:

use_flipper!()
post_install do |installer|
    flipper_post_install(installer)
end

and do pod install in ios directory.

Jignesh Mayani
  • 6,937
  • 1
  • 20
  • 36
  • Thanks for the quick response. Do I need to change the Derived Data from 'Default Location'? I'm unable to select my project folder when clicking the grey arrow. – AJDee Jul 06 '21 at 08:53
  • I changed the location to my project folder and followed your steps after but I am still getting the same error. – AJDee Jul 06 '21 at 10:33
  • @AJDee, Do you use the flipper ? – Jignesh Mayani Jul 06 '21 at 10:38
  • I don't know what that is. I'm fairly new to Xcode but I don't think I'm using that. – AJDee Jul 06 '21 at 11:48
  • Okay!, Can you share PodFile code in ios directory? – Jignesh Mayani Jul 06 '21 at 12:08
  • Podfile added above. Thanks – AJDee Jul 06 '21 at 12:32
  • @AJDee, I have updated the answer please have a look – Jignesh Mayani Jul 06 '21 at 12:48
  • Unfortunately, updating the Podfile as above and running pod install didn't help. I am still seeing the same problem – AJDee Jul 06 '21 at 14:31
  • Can someone please assist with this? – AJDee Jul 06 '21 at 17:25
  • after making comments on those lines have you followed all the above steps for removing the derived data and re-build project again ? – Jignesh Mayani Jul 07 '21 at 04:32
  • I followed your steps above but I am still getting the same error. Please see my updated Podfile. Is this correct? – AJDee Jul 07 '21 at 06:45
  • You have not done it properly I have updated my answer please remove those lines and do pod install again and do a clean build and run again – Jignesh Mayani Jul 07 '21 at 07:09
  • Thanks. I am now having an issue where the error "...library not found for -lboringssl-grpc" appears when archiving. I have tried removing Firebase/Firestore from my Podfile and running pod install. That causes the error "...library not found for - ldoubleconversion". I have tried removing the quotes from the library search paths. That doesn't help. I'm definitely sure I'm opening the workspace and not the project. I really don't know what to do here. – AJDee Jul 08 '21 at 11:17
  • Any ideas on what I may need to do in order to fix this? I am completely stuck. Thanks – AJDee Jul 09 '21 at 07:18
  • I've noticed that if I set the Build System to New Build System Default in Workspace settings I still get the same error as before Multiple commands produce... AccessibilityResources.bundle....Changing this to Legacy gives me the "...library not found for -lboringssl-grpc..." error. Can someone please help here? – AJDee Jul 09 '21 at 07:51
  • I am now facing the error: Command PhaseScriptExecution failed with a nonzero exit code. This is after changing to New Build System Default and attempting to remove my initial error "Multiple commands produce... AccessibilityResources.bundle.." by updating my Podfile as above – AJDee Jul 09 '21 at 12:42
  • can you please attach the image of the error you are getting – Jignesh Mayani Jul 09 '21 at 12:43
  • Any ideas on what I may need to do here please? – AJDee Jul 10 '21 at 08:26
  • Anyone have any ideas on what may be causing this error? Thanks – AJDee Jul 12 '21 at 07:52
  • Which files can you see in the copy bundle resources in build phase of your ios project ? – Jignesh Mayani Jul 12 '21 at 08:40
  • All my screen js files I have created, the .storyboard file, the package.json and package-lock.json files, .xcworkspace file and .xcassets file. – AJDee Jul 12 '21 at 08:48
  • I removed the files package.json, package-lock.json and .xcworkspace but unfortunately that didn't resolve the issue. The same error popped up. I have changed the run script in Bundle React Native code and images to export NODE_BINARY=$(which node) before the .sh script but that didn't help. Still same error seeing. – AJDee Jul 12 '21 at 10:44
  • @AJDee, make sure you should only have the ios project-related files in the ios directory other might lead to major issues like you are facing now. – Jignesh Mayani Jul 12 '21 at 13:09
  • Thanks. I've removed all except storyboard and xcassets file but still seeing the same error after re-building. – AJDee Jul 12 '21 at 15:12
  • Have you also tried to delete the derived data ? – Jignesh Mayani Jul 13 '21 at 04:25
  • which file you are selecting while opening the project in xcode ? – Jignesh Mayani Jul 13 '21 at 06:10
  • I use command line 'open Project.xcworskspace' in the ios folder – AJDee Jul 13 '21 at 06:52
  • Okay that's perfect. – Jignesh Mayani Jul 13 '21 at 06:56
  • Could it be due to my xcode? Although, a new project seems to archive fine. – AJDee Jul 13 '21 at 07:34
  • May be but if you have made some changes at native level might also affect to you at the time of creating and running build – Jignesh Mayani Jul 13 '21 at 07:35
  • Have a try by creating a new project and moving the logic from the old app to the new app. – Jignesh Mayani Jul 13 '21 at 07:35