What Does expo generated .IPA contain?

Hi @wkozyra

1.) When we give expo build: ios, expo is generating an .IPA file. What actually that .IPA file contains?

2.) I have read a post saying (https://hackernoon.com/understanding-expo-for-react-native-7bf23054bbcd) that expo generated .IPA file actually contains assets and JS code bundle. Is that true?

- If true, does those files are saved in an encrypted format inside the .IPA bundle?

Thanks in advance.

  1. react-native + all unimodules available in managed workflow + few other libraries + compiled js bundle + assets. It’s a zip, you can unzip it.

  2. Yes, I don’t see how it would work if it didn’t contain those things.

does those files are saved in an encrypted format

IPA is signed, but not encrypted, js bundle is minified

@wkozyra

Since the .IPA contains all the necessary data for the app. If I don’t want my app to pull OTA updates from CDN. How to configure my app to work complete offline (using local bundles) without hitting any CDN (either expo CDN / own server).

How to configure the app to use only local bundled assets and JS bundle. I dont want CDN for my app. Is that is possible?

If yes how to configure my app.

  • disable ota updates in app.json
  • generate dist directory expo export
  • build using turtle-cli

You still need to host those files during build, but it can done on localhost. It needs https, so i ususaly use ngrok for that.

  • python -m http.server 8080 in project dir
  • ngrok http 8080
  • expo export --public-url https://f50801ca.ngrok.io/dist
  • turtle-cli build:android --public-url https://f50801ca.ngrok.io/dist/ios-index.json

@wkozyra

What is the need to host the files in a CDN (either expo CDN / local server). Because the .IPA itself contain those asset and JS build. Also I am disabling OTA updates. So no need to hit CDN to fetch any changes.

I don’t want to host the asset and JS bundle even on my own server. I want my app to load all app related data from the local .IPA bundle itself.

Is this is possible?

If not. Why can’t the app load these bundle from local without hitting any URL.

It’s used during build process, you can kill that server after ipa is created.

Not sure what you mean, there is no IPA during build process. IPA is a result of a build.

@wkozyra

Thanks for the reply.

Why it is needed to host the file on my localhost while building the app. Because whenever I build like that the imageUrl, iconUrl, bundleUrl will point to my localhost as below

As discussed in the documentation https://docs.expo.io/distribution/hosting-your-app/

index.json

{
  "name": "Host your app from github",
  "slug": "selfhosting-example",
  "privacy": "public",
  "sdkVersion": "32.0.0",
  "platforms": [
    "ios",
    "android"
  ],
  "version": "1.0.0",
  "orientation": "portrait",
  "icon": "./assets/icon.png",
  "splash": {
    "image": "./assets/splash.png",
    "resizeMode": "contain",
    "backgroundColor": "#ffffff",
    "imageUrl": "https://expo.github.io/self-hosting-example/assets/43ec0dcbe5a156bf9e650bb8c15e7af6"
  },
  "updates": {
    "fallbackToCacheTimeout": 0
  },
  "ios": {
    "supportsTablet": true
  },
  "locales": {},
  "iconUrl": "https://expo.github.io/self-hosting-example/assets/fa6577fecc0a7838f15a254577639984",
  "bundledAssets": [
    "asset_3a2ba31570920eeb9b1d217cabe58315.ttf",
    "asset_744ce60078c17d86006dd0edabcd59a7.ttf",
    "asset_140c53a7643ea949007aa9a282153849.ttf",
    "asset_6beba7e6834963f7f171d3bdd075c915.ttf",
    "asset_b06871f281fee6b241d60582ae9369b9.ttf",
    "asset_e20945d7c929279ef7a6f1db184a4470.ttf",
    "asset_b2e0fc821c6886fb3940f85a3320003e.ttf",
    "asset_d15c1216957060fac577af6151fb8cfe.ttf",
    "asset_a37b0c01c0baf1888ca812cc0508f6e2.ttf",
    "asset_73b8cff012825060b308d2162f31dbb2.ttf",
    "asset_d2285965fe34b05465047401b8595dd0.ttf",
    "asset_5cdf883b18a5651a29a4d1ef276d2457.ttf"
  ],
  "assetUrlOverride": "./assets",
  "publishedTime": "2019-01-28T23:29:57.195Z",
  "commitTime": "2019-01-28T23:29:57.195Z",
  "revisionId": "4MeMDyYXAa",
  "id": "@quinlanj/selfhosting-example",
  "bundleUrl": "https://expo.github.io/self-hosting-example/bundles/android-f44539cd480ad7a3cce899a597d95997.js",
  "platform": "android"
}

imageUrl, iconUrl, bundleUrl all these are point to URL where I hosted the static asset file.

As you said when I build the app on my local server. Then I kill the server after .ipa is created.
What will happen to the following imageUrl, iconUrl, bundleUrl in index.json

Since I dont have any OTA feature in my app. I don’t want my app to tie with any URL (even own server).

@wkozyra

Can you please explain the need to host the file during build.

@wkozyra

Can you please explain this. Why the build requires my static files to be hosted.

Thanks in advance.

Turtle-cli is just light wrapper around code that is deployed on our servers and because local python server is very easy to setup, there was never need to support local links.

Thanks for the support@wkozyra

@wkozyra

Can you please look into this thread - Best approach for enterprise ios standalone app?

Looking forward for your reply. Thank you.

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