Wednesday 15 August 2018

Some errors encountered with app dev.

iOS:

Fonts:

Just a note, if you ever add new fonts to a react project, make sure you search the whole project for the old font, there are cache files that contain references to it.

Also delete the contents of the ios/build directory and make sure each font filename is the same as the actual font's name, Eg "hello-world.ttf" cannot have an actual font name of 'hello world'.


React-Native:

The app does not see my code changes:

Either run the following commands or create an alias for them:

This command clears all your watchman roots, repeat until the roots show as empty:
watchman watch-del-all (repeat until roots are cleared '[]')

This will clear npm cache, meaning no pesky npm installs to get it all working again:
npm cache clean --force use that to clear out node cache

alias uncache-react="watchman watch-del-all;watchman watch-del-all;npm cache clean --force"





Build a release from react-native command:

react-native run-android --variant=release



Checking if in DEV mode in the app:

if (__DEV__) {
  do stuff
}

Devlog 8: AI and Radar explanation.