9 ms·
It is a best case scenario when you can build the entire app in React without any native code. I’ve been charged with building a large Swift framework for a Rea
by valuearb 6y ago
It is a best case scenario when you can build the entire app in React without any native code. I’ve been charged with building a large Swift framework for a React Native app, and key bugs were nearly insoluble.
- devxpy 6y agoAre the swift parts needed for the UI work, or platform specific functionality?
- valuearb 6y agoBoth, was a camera module that did encrypted photos.
- bsaul 6y agoCould you give us examples of what those key bugs looked like ?
- valuearb 6y agoOne in particular. The swift code was responsible for the camera module. Testers reported if they quickly took lots of photos the UI would freeze. Hard to duplicate, so I spent a lot of tome making sure none of my code blocked main thread. This went on for months. I didn’t know React Native and wasn’t given tine to Lear it, but RN engineers assured me it wasn’t a problem in their code. I even had trouble building the RN app for testing. I’d get it to build for one version, then a couple weeks later the project changed in some way that refused to build again. Typically when they added new libraries I think. Finally we had a team meeting and I worked on big with lead RN engineer, and he said oh wait. The camera module sent a lot of notifications as images were taken, processed and uploaded. RN basically was locking up main thread trying to deal with all those notifications. The schism between native and RN code makes it hard to track down bugs that cross over. We eventually decided to dump it and go native just to get our productivity back. In our case our UI was simple enough RN really wasn’t a benefit.
- htkibar 6y ago> I didn’t know React Native and wasn’t given tine to Lear it, but RN engineers assured me it wasn’t a problem in their code. Seems like the issue is right here.