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 ?