'RNTMap was not found in the UIManager
I am following along the official documentation, copy and pasting the code provided there:
https://facebook.github.io/react-native/docs/0.56/native-components-ios
But I am still running into this error
does anyone know what the docs are missing to get this working?
Solution 1:[1]
This is happens because native module not compiled yet, simply execute react-native run-ios
in terminal while in project directory.
Note: For latest node version use: npx react-native run-ios
Solution 2:[2]
RNTMapManager.m must be created within the XCode project, the docs do not specify that. Open the XCode project and click File -> New -> File and create a new Cocoa Touch Class called "RNTMapManager". Then place the objective-c code within RNTMapManager.m. Rebuild the application and it should work!
Solution 3:[3]
- To be able to use native components make sure your project was ejected (expo eject)
- Once ejected open for example iOS project with XCode and create/add file from Xcode. This way it will update all the dependencies.
- Rebuild the project
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Ganpat |
Solution 2 | JPritchard9518 |
Solution 3 | Ursu Alexandr |