1

I used to compile my React Native app with Xcode 12 correctly but I had to compile for iOS 15, so upgrade Xcode 12 to 13.1.

I had a lot of errors and tried a few solutions without success.

I tried to begin from scratch :

git clone myProject

npm install

cd ios pod install

Try to archive with Xcode 13.1 (13A1030d)

I got this error :

/Users/sroques/Dropbox/INFOPROGIS/Clients/new tecnilud/appli-tecnilud/ios/Pods/Pods.xcodeproj The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.0.99.

I change iOS deployment target to 9.0 and try to archive again

I got this error :

xxx/ios/Pods/Headers/Private/Flipper-Folly/folly/synchronization/DistributedMutex-inl.h:1051:5: 'atomic_notify_one' is unavailable

I found this post : Xcode throws 'atomic_notify_one<unsigned long>' is unavailable

I cannot find use_flipper!({ 'Flipper' => '0.96.0', 'Flipper-Folly' => '~> 2.6', 'Flipper-RSocket' => '~> 1.4' }) line on my Podfile, but I tried to change this :

def add_flipper_pods!(versions = {})
versions['Flipper'] ||= '~> 0.33.1'
versions['DoubleConversion'] ||= '1.1.7'
versions['Flipper-Folly'] ||= '~> 2.1'
versions['Flipper-Glog'] ||= '0.3.6'
versions['Flipper-PeerTalk'] ||= '~> 0.0.4'
versions['Flipper-RSocket'] ||= '~> 1.0'

to that :

def add_flipper_pods!(versions = {})
versions['Flipper'] ||= '~> 0.96.0'
versions['DoubleConversion'] ||= '1.1.7'
versions['Flipper-Folly'] ||= '~> 2.6'
versions['Flipper-Glog'] ||= '0.3.6'
versions['Flipper-PeerTalk'] ||= '~> 0.0.4'
versions['Flipper-RSocket'] ||= '~> 1.4'

I tried to archive again and I got this error :

XXX/ios/Pods/Headers/Private/Flipper-Folly/folly/synchronization/DistributedMutex-inl.h:1051:5: 'atomic_notify_one' is unavailable

I deleted pods folder and Podfile.lock

Tried pod install again

Tried to archive again and I got 3 errors :

XXX/node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm:331:34: Cannot initialize a parameter of type 'NSArray<id> *' with an rvalue of type 'NSArray *'


XXX/node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm:776:79: Cannot initialize a parameter of type 'NSArray *' with an lvalue of type 'NSArray<id> *__strong'


XXX/node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm:827:69: Cannot initialize a parameter of type 'NSArray<id> *' with an lvalue of type 'NSArray *__strong'

I found this post : https://developer.apple.com/forums/thread/679043?login=true&page=1#694098022

I made changed proposed by Apple, but it doesn't resolve my problem. Now, I have those errors as replied to Apple :

xxx/node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm:671:20: Incompatible pointer types assigning to 'NSArray *' from 'NSArray *'

AND

xxx/node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm:673:20: Incompatible pointer types assigning to 'NSArray *' from 'NSArray *'

Could you tell me how I can fix this error, or what am I doing wrong please ?

Gregoire Ducharme
  • 1,095
  • 12
  • 24

1 Answers1

0

In my case this link and information below help me so much, and solve my problem

react-native-cli: 2.0.1 react-native: 0.65.1 xcode: 13 macos Monterey: 12.0.1

at all, being the problem $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME).

Would it be better to just have Podfile to delete the problematic LIBRARY_SEARCH_PATHS if Xcode is new enough? I don't have 12.5 or any other to confirm, but will see what I can do to verify.

Yes, can confirm that $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME) in LIBRARY_SEARCH_PATH was a problem(Xcode 13, RN 0.66). After removing it my project was finally built successfully

F.Phi
  • 1
  • Thanks F.Phi for your answer. So you had the same issue and resolved it by deleting a file in /usr/lib/swift-5.0/. In my case, I have 3 files and one folder : libswiftCreateML.dylib, libswiftDemande.dylib, libswiftRemoteMirrorML.dylib and CreateMLInternal. Witch one have I to delete ? – Stéphane ROQUES Nov 10 '21 at 07:10