Closed ericwlange closed 4 years ago
Ok I understand why this is not working correctly. The bundled resource file .liquidcore/ios_bundle/example.js
does not yet exist when the first pod install
is run. Resources are statically determined at pod installation time. So any time a new entry file is added, the bundler must be run and then pod install
again.
So the appropriate workaround is that any time you add a new entry file, you must:
$ npm run bundler -- --platform=ios
$ pod install
in that order. This way, the resource will get generated and then picked up by the pod install process. This is not necessary when editing the resource, only when adding it for the first time.
I updated README.md
to reflect this.
example.js
is not getting bundled into the app like it is supposed to.Workaround: Make sure you have enabled arbitrary loads so that you can read from unencrypted HTTP and run the development server (
npm run server
). The bundle should work in development mode.For release builds, you will need to copy the bundle in
<project-root>/.liquidcore/ios_bundle
into your project and refer to them by their resource URL rather than usingLCMicroService.bundle()
.I am working on this issue.