question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[iOS] Images under `assetBundlePatters` not appearing on first-load-offline

See original GitHub issue

TL;TR

iOS standalone (image) assets are properly bundled but won’t show up offline (first).

See also: https://forums.expo.io/t/ios-standalone-assetbundlepatterns-regression/12103

Environment:

OS: macOS Sierra 10.12.6 Node: 10.7.0 Yarn: 1.9.2 npm: 6.2.0 Watchman: 4.9.0 Xcode: Xcode 9.2 Build version 9C40b Android Studio: 3.1 AI-173.4720617

Packages: (wanted => installed) expo: ^29.0.0 => 29.0.0 react: 16.3.1 => 16.3.1 react-native: https://github.com/expo/react-native/archive/sdk-29.0.0.tar.gz => 0.55.4

App target: iOS standalone

Steps to Reproduce

  1. configure assetBundlePatterns in app.json to bundle some image assets
  2. run exp build:ios -t simulator to create an iOS standalone simulator build
  3. wait for build to finish then download and unpack YourAppName.tar.gz
  4. start iOS simulator and run xcrun simctl install booted YourAppName.app
  5. disable internet connection
  6. start YourAppName inside iOS simulator
  7. your bundled images won’t show up

Expected Behavior

Bundled image assets should work offline (first). The same codebase works as expected for android standalone builds.

Actual Behavior

iOS bundled images won’t show up.

Reproducible Demo

Any recent iOS standalone build should face this issue.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
sukso96100commented, Aug 10, 2018

Hi, Was the fix rolled out for exp build service? I’m also experiencing this issue on Android.

This is what i expected to see on first run with the apk file built with exp build:android. screenshot_20180810-104456

And this is what i actually see at first run. screenshot_20180810-110743

If i stop by some other screens, then i can see the images like the screenshot. screenshot_20180810-111116

2reactions
sukso96100commented, Aug 13, 2018

@riwu I just tried a new build after adding two lines from this comment and it’s fixed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ios - React-Native Offline Bundle - Images not showing
Select myapp under the project navigator and then: under TARGETS: myappTests > Build Phases > Link Binary With Libraries press + select ...
Read more >
iOs and asset bundles? - Unity Forum
Hello, We recently created an app that downloads an assetbundle on firsh launch and stores it in Application.persistentDataPath.
Read more >
Using AssetBundles Natively - Unity - Manual
Loading a fully compressed (LZMA) bundle with this method will first decompress the bundle before loading it into memory.
Read more >
Load Area Target from AssetBundle saved on server
Can you be more clear on what feedback you'd like to pass on? Are you developing for native or Unity (for Android /...
Read more >
Understanding iOS Image Assets - MFractor
No matter how crudiest the UI could be, you'll probably need some icons or small image resources to compose your layouts. In this...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found