Build:ios not bundling the assets

#1

Hi guys,
I added the assetBundlePatterns attribute to app.json and upgraded expo SDK to 24.0.0. However, when I build:ios and open the IPA file, I don’t see the images bundled. I have pasted my app.json below. Could someone help take a look and see what I’m doing wrong? For the path, I have used variations including "./app/images/.png" “./app/images/**” and "./app/images/"
Thanks!

{
“expo”: {
“sdkVersion”: “24.0.0”,
“slug”: “MyApp”,
“name”: “MyApp”,
“icon”: “./app/images/appicon-ios.png”,
“version”: “2.0.0”,
“orientation”: “default”,
“ios”: {
“supportsTablet”: true,
“bundleIdentifier”: “org.myorg.MyApp”,
“buildNumber”: “2.0.0.2”
},
“android”: {
“package”: “org.myorg.MyApp”
},
“androidStatusBarColor”: “#334393”,
“androidStatusBar”: {
“barStyle”: “light-content”,
“backgroundColor”: “#334393
},
“loading”: {
“backgroundImage”: “./app/images/background.png”
},
“assetBundlePatterns”: [
"./app/images/*.png"
]
}
}

#2

Having the same issue on both generated apk and ipa files.
It actually used to work fine on SDK 24.
I’ve moved to SDK 25 and I can’t see the bundled assets in apk file.
Haven’t tested ipa file yet.
Typically I check the size of the files, this time the apk is way smaller than it should be.

I’ve used:

“assetBundlePatterns”: [
"./app/images/*"
]

and

“assetBundlePatterns”: [
"./app/images/**"
]

Same issue.

If anyone knows what to check, please let us know.
Thanks very much in advance

#3

In case this might help anyone else.

Here is how I resolved my problem:

  • I reduced the size of my assets

With SDK 24 my apk size was 49Mb.
With SDK 25, assets weren’t being bundled because the apk size was probably higher than 50Mb (which is Google apk size limit).

Now my apk size is 40Mb and the assets are bundled inside.
Unbundled, the size was 25Mb.

If you have too many assets which will make your apk size bigger than 50M, it’s possible that exp won’t bundle them together with your code.
This is the explanation I came up with.

Hope this helps anyone who comes across this issue.

closed #4

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.