0

I'm creating first react-native dependency for both android and iOS. I have done coding part for android but now I'm stuck in iOS. Where to write code for my library and how to test.

1 Answers1

0

React Native uses CocoaPods to manage iOS project dependencies and most React Native libraries follow this same convention.

Run pod install in our ios directory in order to link it to our native iOS project. A shortcut for doing this without switching to the ios directory is to run npx pod-install. Once this is complete, re-build the app binary to start using your new library: npx react-native run-ios.

For testing the code you could use Jest testing framework. go onto the ReactNative for more guidance.

  • I used **create-react-naitve-module** to build my own dependency but not able to find where i write code for ios is it in example/ios or /ios – user7537695 Aug 12 '20 at 12:40
  • Apple's IDE (Integrated Development Environment) for both Mac and iOS apps is Xcode. It's free and you can download it from from Apple's site. Xcode is the graphical interface you'll use to write apps. Included with it is also everything you need to write code for iOS 8 with Apple's new Swift programming language. – Nqobile Ndlovu Aug 12 '20 at 13:03