3

We recently upgraded all libraries in Our ReactNative App and we are using RN v0.59.8 and XCode v 10.3 (10G8), everything worked fine, we are able to build and run the app with development certificate and even distribution certificate with Adhoc profile.

However, when we tried to submit to the app store, after archive, the app is always listed under Other Items, rather than under iOS apps. the type of archive is always showing as Generic Xcode archive which is wrong.

when we checked why Validate and upload to app store buttons are disabled, we found apple technical document

as per the suggestion is given in the document, we followed the following steps:

  1. make skip install No for all static libraries under build settings
  2. move all header files from Headers build phase to Copy files build phase

the second step is a little tedious job because we have to manually do for all static libraries.

after doing so, we started getting plenty of compilation errors like Redefinition for MethodDescriptor in NativeModule.h

See errors -> enter image description here

there are more than 600+ errors of that kind. Kindly help me to resolve this issue

Here is my Pod File

 # Uncomment the next line to define a global platform for your project
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
#use_frameworks!
target 'SociallyGood' do
  # this is very important to have!
  rn_path = '../node_modules/react-native'
  rn_maps_path = '../node_modules/react-native-maps'
  pod 'yoga', path: "#{rn_path}/ReactCommon/yoga/yoga.podspec"
  pod 'React', path: rn_path, subspecs: [
    'ART',
    'Core',
    'RCTActionSheet',
    'RCTAnimation',
    'RCTGeolocation',
    'RCTImage',
    'RCTLinkingIOS',
    'RCTNetwork',
    'RCTSettings',
    'RCTText',
    'RCTVibration',
    'RCTWebSocket',
    'DevSupport'
  ]
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!
  # pod 'GoogleMaps'  # <~~ remove this line if you do not want to support GoogleMaps on iOS
  # Pods for SociallyGood

  pod 'react-native-maps', path: rn_maps_path
  pod 'react-native-google-maps', path: rn_maps_path  # If you need GoogleMaps support on iOS
  # pod 'GoogleAppMeasurement', '5.4'

  pod 'RNImageCropPicker', :path =>  '../node_modules/react-native-image-crop-picker'
  pod 'BVLinearGradient', :path => '../node_modules/react-native-linear-gradient'

  pod 'RNDeviceInfo', :path => '../node_modules/react-native-device-info'
  pod 'RNShare', :path => '../node_modules/react-native-share'

  pod 'react-native-splash-screen', :path => '../node_modules/react-native-splash-screen'

  pod 'RNGestureHandler', :path => '../node_modules/react-native-gesture-handler'

  pod 'GoogleSignIn', '~> 4.4.0'
  # pod 'GoogleUtilities', '~> 1.3'
  # pod 'GoogleAuthUtilities'
  # pod 'GoogleAppUtilities'
  pod 'FacebookSDK'
  pod 'FBSDKCoreKit', '~> 4.40.0'
  pod 'FBSDKLoginKit', '~> 4.40.0'
  pod 'FBSDKShareKit', '~> 4.40.0'

  # Required by RNFirebase
  pod 'Firebase/Core', '~> 5.20.2'
  pod 'Firebase/Auth', '~> 5.20.2'

  # very important to have, unless you removed React dependencies for Libraries 
  # and you rely on Cocoapods to manage it
  # pod 'RNGoogleSignin', :path => '../node_modules/react-native-google-signin'

  pod 'BugsnagReactNative', :path => '../node_modules/bugsnag-react-native'

  # pod 'react-native-maps', :path => '../node_modules/react-native-maps'

  # pod 'react-native-fbsdk', :path => '../node_modules/react-native-fbsdk'

  pod 'RNScreens', :path => '../node_modules/react-native-screens'

  pod 'react-native-webview', :path => '../node_modules/react-native-webview'

  post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.name == "React"
      target.remove_from_project
    end
  end
end

end
Sadanand
  • 1,080
  • 3
  • 13
  • 30

1 Answers1

2

I had this same struggle when trying to release my first RN app to the app store. My archived build always was listed under the "Other items"

It took me awhile to find an answer, but this is what I do now:

There is another way to upload your app build to the app store: by creating an .ipa file of your app, and uploading it through Application Loader in Xcode.

I don't remember all the resources I found that helped me figure this out, but this was one of them: How to build .ipa application for react-native-ios?

Essentially, after you do the Clean Build Folder, and then Build, you find the .app file in: ~/Library/Developer/Xcode/DerivedData//Build/Products/Release-iphoneos/

Create a new folder on your desktop named Payload (this name is case-sensitive)

Copy your .app file and paste the copy in this Payload folder.

Right click the folder and choose "Compress Payload"

When you save this, do not save it with the .zip extension, but instead save it with a .ipa extension.

This is now your .ipa file for your app, and you can upload this through Xcode Application Loader.

The upload process will tell you if there is anything wrong with your build, but if there is not, it will upload to the app store and you should be able to find it in App Store Connect in a few moments.

Hope this helps you and/or others!

Matthew Hall
  • 131
  • 1
  • 5