


The interoperability between Objective-C and Swift is generally quite good 1 - in fact, I’m amazed how well Apple was able to make the two languages work together given how different they are. The exception to the rule: when a particular subsystem reaches a tipping point - say, 60 % of it is written in Swift - it can make sense to transition the rest as well in order to minimize pains caused by mixing the two languages. We don’t rewrite existing code in Swift just for the sake of it, but only if a subsystem is due for a major overhaul anyway. We try to write new code in Swift, but about 75–80 % of the code base is still Objective-C. The lifecycle methods should be easy enough for you to figure out, but importing and calling obj-c libraries might require a bit of work.I’m currently working on a fairly large iOS app with a long history.

I haven’t used technique in production, so integrating other libraries in an open question for me. I started this work because I’m looking into turbo modules and objective-c is just too damn hard to understand to the untrained eye, so I’m expecting it will help me solve the mysteries of enabling Turbo Modules. You should now be able to compile your React Native application!Īs stated this doesn’t mean that your app is now running on Swift, but might make it easier for you to add functionality on the native side of things. If you try to build the application you will get some errors regarding missing swift dependencies, I can’t really explain why this is happening, but in order to solve it go to your project build setting’s and change the library search paths as follows:ĭelete the old entries and replace them with a single entry looking for the swift-5.2 librariesĪdd a new entry just like the one you left at the project level settings 5. #import #import #import #import #import #import #import 4.
