ios - How to deploy arbitrary resources for React Native with CodePush -


i'm using codepush deploy js bundle , couple of resources react-native ios app. instead of using react-native bundler collect static images project have build step copies folder called "static" release/assets. beside "static" folder als have other folders in release/assets contain images , videos wich use dynamically in app via uri (e.g. { uri: 'assets/images/myimage.jpg' }). when building app in xcode include assets folder in package.

from codepush documentation gather deploying release folder should update assets. doesn't.

i downloaded xcappdata via xcode , there can see, codepush downloaded , stored in /library/application support/codepush/[id]/release. still doesn't show in app.

any ideas? misunderstand the functionality of codepush?

as you've seen, when release directory codepush server via cli, round trip entire contents of end-user's devices when perform update check/synchronization. said, because file in update doesn't mean useable unfortunately.

the behavior you're seeing limitation of way image component resolves uris in react native. if use assets system specify "source" property (via require("image.png") call), file relative running js bundle. how codepush allows updating images, because long our plugin places "assets" folder next js bundle file on disk, <image> component naturally find them.

however, when specify object uri (as you're doing) value of "source" property, image component looks file relative binary on disk, , therefore, never placed codepush when update them.

because of this, codepush supports updating images loading via require syntax. i'll make sure update our docs clarify that. apologies confusion!


Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

Swift game error message -