iOS

Issue #1

With some earlier versions of React Native, you may need to open Podfile in the ./ios directory, input one of the following two code snippets, then run pod install.

Option 1:

target 'YourApp' do
	
	# add this:
	use_modular_headers!
	pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec', :modular_headers => false
	pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec', :modular_headers => false
	pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec', :modular_headers => false

Option 2:

target 'YourApp' do
	
	# add this:
	pod 'primer-io-react-native', :path => '../node_modules/@primer-io/react-native', :modular_headers => true
	pod 'React-Core', :path => '../node_modules/react-native/', :modular_headers => true

More info related to this issue can be found here.

Issue #2

If you see the build error "Could not find or use auto-linked library 'swiftWebKit'", open ./ios/YourApp.xcworkspace in Xcode. Then proceed to add a Swift file in the project's root group directory (the yellow folder with the same name as your project). When prompted to create bridging header answer yes. Once done, rebuild the project.

More info (incl. visuals) on this issue can be found here.

Android

Issue #1

In some versions of React Native, the default minimum Android SDK version is lower than that of Primer's Android SDK. If you try running the app with this configuration you may see the following error:

Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 21 declared in library [:primer-io_react-native] [...] as the library might be using APIs not available in 16 [...]

To fix this error, open ./android/build.gradle and set minSdkVersion = 21 in the build script.