iOS minification causes HCP issues

Hello fellow meteorites :slight_smile:

I would like to ask for your help on the following issue I face.

We have an app in production with backend server, and building Android and iOS mobile FE.
The issue I’m having is that if I ‘run’ my app in iOS with ‘–production’ flag, it launches but it won’t get past the splash-screen.

meteor run ios-device --mobile-server https://<my-server> --production

If I don’t minify, the app runs normally

meteor run ios-device --mobile-server https://<my-server>

The server is already pre-built and serving from a different host.
Running on ‘android-device’ with or without --production option works like a charm…

My XCode console logs when I run with --production option:

2018-09-24 15:45:58.221082+0300 <myApp>[907:322035] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///private/var/mobile/Containers/Data/Application/0FD3...0FB/Library/Cookies/Cookies.binarycookies
2018-09-24 15:45:58.398749+0300 <myApp>[907:322035] Apache Cordova native platform version 4.5.3 is starting.
2018-09-24 15:45:58.400428+0300 <myApp>[907:322035] Multi-tasking -> Device: YES, App: YES
2018-09-24 15:45:58.430308+0300 <myApp>[907:322035] 

Started backup to iCloud! Please be careful.
Your application might be rejected by Apple if you store too much data.
For more information please read "iOS Data Storage Guidelines" at:
https://developer.apple.com/icloud/documentation/data-storage/
To disable web storage backup to iCloud, set the BackupWebStorage preference to "local" in the Cordova config.xml file
2018-09-24 15:45:58.704450+0300 <myApp>[907:322035] Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service
2018-09-24 15:45:58.708593+0300 <myApp>[907:322035] Could not signal service com.apple.WebKit.Networking: 113: Could not find specified service
2018-09-24 15:46:00.291822+0300 <myApp>[907:322035] CDVWKWebViewEngine will reload WKWebView if required on resume
2018-09-24 15:46:00.292066+0300 <myApp>[907:322035] Using WKWebView
2018-09-24 15:46:00.293949+0300 <myApp>[907:322035] [CDVTimer][console] 0.491023ms
2018-09-24 15:46:00.294610+0300 <myApp>[907:322035] [CDVTimer][handleopenurl] 0.465989ms
2018-09-24 15:46:00.305997+0300 <myApp>[907:322035] [CDVTimer][intentandnavigationfilter] 11.245012ms
2018-09-24 15:46:00.306405+0300 <myApp>[907:322035] [CDVTimer][gesturehandler] 0.257969ms
2018-09-24 15:46:00.308859+0300 <myApp>[907:322035] [CDVTimer][keyboard] 2.254009ms
2018-09-24 15:46:00.557870+0300 <myApp>[907:322035] Serving asset bundle version: 8cf...f6d9
[INFO] GCDWebServer started on port 12448 and reachable at http://localhost:12448/
2018-09-24 15:46:00.567979+0300 <myApp>[907:322035] [CDVTimer][webapplocalserver] 258.931041ms
2018-09-24 15:46:00.594555+0300 <myApp>[907:322035] [CDVTimer][statusbar] 26.409984ms
2018-09-24 15:46:00.643344+0300 <myApp>[907:322035] [CDVTimer][splashscreen] 48.614025ms
2018-09-24 15:46:00.648967+0300 <myApp>[907:322035] [CDVTimer][file] 5.437970ms
2018-09-24 15:46:00.649126+0300 <myApp>[907:322035] [CDVTimer][TotalPluginStartup] 355.768085ms

My XCode console output when I run without the --production flag.

2018-09-24 16:08:40.621777+0300 <myApp>[924:325951] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///private/var/mobile/Containers/Data/Application/63B...BFF/Library/Cookies/Cookies.binarycookies
2018-09-24 16:08:40.785717+0300 <myApp>[924:325951] Apache Cordova native platform version 4.5.3 is starting.
2018-09-24 16:08:40.787529+0300 <myApp>[924:325951] Multi-tasking -> Device: YES, App: YES
2018-09-24 16:08:40.814531+0300 <myApp>[924:325951] 

Started backup to iCloud! Please be careful.
Your application might be rejected by Apple if you store too much data.
For more information please read "iOS Data Storage Guidelines" at:
https://developer.apple.com/icloud/documentation/data-storage/
To disable web storage backup to iCloud, set the BackupWebStorage preference to "local" in the Cordova config.xml file
2018-09-24 16:08:41.069627+0300 <myApp>[924:325951] Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service
2018-09-24 16:08:41.073936+0300 <myApp>[924:325951] Could not signal service com.apple.WebKit.Networking: 113: Could not find specified service
2018-09-24 16:08:42.426019+0300 <myApp>[924:325951] CDVWKWebViewEngine will reload WKWebView if required on resume
2018-09-24 16:08:42.426227+0300 <myApp>[924:325951] Using WKWebView
2018-09-24 16:08:42.427839+0300 <myApp>[924:325951] [CDVTimer][console] 0.276923ms
2018-09-24 16:08:42.428275+0300 <myApp>[924:325951] [CDVTimer][handleopenurl] 0.280023ms
2018-09-24 16:08:42.439063+0300 <myApp>[924:325951] [CDVTimer][intentandnavigationfilter] 10.612011ms
2018-09-24 16:08:42.439486+0300 <myApp>[924:325951] [CDVTimer][gesturehandler] 0.272036ms
2018-09-24 16:08:42.441886+0300 <myApp>[924:325951] [CDVTimer][keyboard] 2.198935ms
2018-09-24 16:08:42.690093+0300 <myApp>[924:325951] Serving asset bundle version: 2d2...4e0
[INFO] GCDWebServer started on port 12448 and reachable at http://localhost:12448/
2018-09-24 16:08:42.702225+0300 <myApp>[924:325951] [CDVTimer][webapplocalserver] 260.148048ms
2018-09-24 16:08:42.719285+0300 <myApp>[924:325951] [CDVTimer][statusbar] 16.891003ms
2018-09-24 16:08:42.750286+0300 <myApp>[924:325951] [CDVTimer][splashscreen] 30.809999ms
2018-09-24 16:08:42.755319+0300 <myApp>[924:325951] [CDVTimer][file] 4.868984ms
2018-09-24 16:08:42.755478+0300 <myApp>[924:325951] [CDVTimer][TotalPluginStartup] 327.991009ms
2018-09-24 16:08:50.070312+0300 <myApp>[924:325951] Start downloading asset manifest from: manifest.json -- https://<my-server>/__cordova/
2018-09-24 16:08:50.579800+0300 <myApp>[924:326083] Downloaded asset manifest for version: 9577...9f37
2018-09-24 16:08:50.609545+0300 <myApp>[924:326017] Start downloading assets from bundle with version: 9577...9f37
2018-09-24 16:08:51.285655+0300 <myApp>[924:326015] [CDVTimer][assetBundleDownload] 675.014973ms
2018-09-24 16:08:51.290622+0300 <myApp>[924:326083] Finished downloading new asset bundle version: 9577...9f37
2018-09-24 16:08:51.348112+0300 <myApp>[924:325951] ROOT_URL seems to have changed, new: https://<my-server>:443/, old: https://<my-server>/
2018-09-24 16:08:51.350736+0300 <myApp>[924:325951] Serving asset bundle version: 9577...9f37

Some ‘information’ has been ‘covered’ for obvious reasons.

I can’t see any error in Network connections with Safari DevTools nor in the browser console.

Any ideas? I’m really stuck with this…

Thanks in advance