#100DaysOfCode: Day 13

Author: Ho Yin Cheng

/

Created: January 8, 2018

Series: devlog

Devlog for day 13 of my #100DaysOfCode coding challenge.

Checklist

Daily Requirements

Extra Tasks

Progress Report

Today I tried to integrate react-native-detect-new-photo into my project and failed. It was expected since it’s a one off repository with sparse instructions and hadn’t been updated in a while. All big signs of an unreliable module. Doubly so since it’s a native module. There were two main issues:

  1. Permissions: After a bunch of debugging, I found out that the reason for crashes on iOS were because you need to have NSPhotoLibraryUsageDescription defined in your Info.plist file. I never got around to testing Android but I suspect you’ll need to define the proper permissions in your AndroidManifest.xml file.
  2. It’s not built for the latest version of React Native (quite clear as the commits say it’s built for 0.40). When you run it on the latest versions (ex: 0.50+), it will not work because it’s using a deprecated iOS method: sendAppEventWithName. The documentation was finally updated for the new way of writing bridge code back in Dec of 2017, but I gave up on updating the code as it was taking too long (went over my self imposed time limit of 1hr).

For now, I’ll continue integrating other modules that I need. Once I have a large enough time block, I’ll tackle writing my own updated version of this module (perhaps forking it) and publishing it on Github. I won’t abandon the project if it works as that is one of my pet peeves.


Copyright © 2011-2020 Ho Yin Cheng