Ignite: what is the full process for loading a brand new ignite app in Expo?

Created on 26 May 2017  路  3Comments  路  Source: infinitered/ignite

Using 2.0.0-rc.1 and the latest boilerplate 2.0

did

ignite new CoolApp

did not install dev screens as I remember those use a native package

Tried to load that into Expo but no go.. ok np

did

exp convert

this deleted the node_modules folder and made some modifications to the package.json. In trying to reinstall with npm it ran into an error because for some reason I don't understand the original package.json has this in it

"ignite-ir-boilerplate": "file:/Volumes/Memories/Photos/2012/PictureBright/DEV/_IGNITE/IgniteNext/node_modules/ignite-ir-boilerplate",

I think you should be able to delete the node_modules and do npm i.. but maybe there's a good reason for the above

Ok so I manually created node_modules, copied the ignite-ir-boilerplate in, then ran npm install again.. ok this time it worked

next I followed the Expo instructions.. deleted the ios and android folders

added a main.js with

export default require('./index');

changed

"main": ""

to

"main": "main.js"

in the package.json

Changed the index.ios.js and index.android.js to add

import Expo from 'expo'

and replaced

AppRegistry.registerComponent('IgniteNext', () => App)
Expo.registerRootComponent(App)

and tried to run it in Expo again.. got a bit further but now it's complaining about

fontFamily 'Avenir-Book' is not a system font and has not been loaded through Exponent.Font.loadAsync.

- If you intended to use a system font, make sure you typed the name correctly and that it is supported by your device operating system.

- If this is a custom font, be sure to load it with Exponent.Font.loadAsync.

Now I've dealt with this issue before but before I try even further.. just wondering if there's an easier way?

I know I've seen posts boasting about "Expo" support and I know those refer to doing "ignite attach" on existing Expo projects.

But I just want to load the demos in Expo.. that shouldn't be hard should it?

Would be nice in the future if there was a flag when creating a new project to prepare it for Expo

Anyone else got it working yet?

Most helpful comment

@skellock thanks! I'll take a look! And maybe I'll add a PR to make it work with 2.0 once you release it

All 3 comments

I should add that the font error above appears to be only a warning. I can dismiss it and then I end up on a screen that shows the big red rocket and "Your app. Almost ready to launch"

But.. nothing else? Where are the demos? The Usage Examples I see mentioned on https://infinite.red/ignite? Maybe I misread and the only help available so far is in this repo's docs folder

Have a look at how I did it in this example.

Expo isn't officially supported because we have to change our dependencies to fit in with how they do things.

We're interested but we haven't had time.

@skellock thanks! I'll take a look! And maybe I'll add a PR to make it work with 2.0 once you release it

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rammmukul picture rammmukul  路  3Comments

skellock picture skellock  路  3Comments

GantMan picture GantMan  路  3Comments

orozcojair picture orozcojair  路  3Comments

GantMan picture GantMan  路  3Comments