Need help running iOS Simulator on my App

I have started building a meteor app with the hopes that I can deploy it on a mobile app. I’m having a really hard time getting the my app to run on the iOS Simulator. According to the documentation @ https://guide.meteor.com/mobile.html I am running as follows:

run-ios.sh

clear

echo "======================= Running Meteor iOS Server =================="

export ROOT_URL=http://local-nok.fluenthome.com:3031

meteor run ios --mobile-server https://local-andres.fluenthome.com --port 3031 --settings settings.json

When I run this script below is the output:

======================= Running Meteor iOS Server ==================
[[[[[ ~/Documents/CodeBases/Nok ]]]]]         

=> Started proxy.                             
[client]: Collecting TypeScript source files: 6.002ms
[client]: TypeScript Files Compilation: 17.641ms
[client]: HTML Files Compilation: 35.042ms   \
[client]: SCSS Files Compilation: 27.106ms   \
[client]: Collecting TypeScript source files: 4.446ms
[client]: TypeScript Files Compilation: 13.786ms
[client]: HTML Files Compilation: 18.533ms   -
[client]: SCSS Files Compilation: 26.646ms   -
[client]: Collecting TypeScript source files: 2.877ms
[client]: TypeScript Files Compilation: 11.662ms
[client]: HTML Files Compilation: 17.282ms   /
[client]: SCSS Files Compilation: 26.587ms   /
[server]: Collecting TypeScript source files: 2.935ms
[server]: TypeScript Files Compilation: 9.016ms
[server]: HTML Files Compilation: 0.812ms
=> Started MongoDB.                           
WARNING: Attempting to install plugin cordova-plugin-geolocation@0.3.11, but it should have a minimum version of 2.4.3 to ensure compatibility with
         the current platform versions. Installing the minimum version for convenience, but you should adjust your dependencies.
WARNING: Attempting to install plugin cordova-plugin-statusbar@2.2.1, but it should have a minimum version of 2.3.0 to ensure compatibility with the
         current platform versions. Installing the minimum version for convenience, but you should adjust your dependencies.
WARNING: Attempting to install plugin cordova-plugin-splashscreen@4.0.1, but it should have a minimum version of 4.1.0 to ensure compatibility with
         the current platform versions. Installing the minimum version for convenience, but you should adjust your dependencies.
=> Started your app.                                                               
                                              
=> App running at: http://local-nok.fluenthome.com:3031
=> Errors executing Cordova commands:         
                                              
   While running Cordova app for platform iOS with options --emulator:
   Error: Command failed: /Users/andressosa/Documents/CodeBases/Nok/.meteor/local/cordova-build/platforms/ios/cordova/run --emulator
   /Users/andressosa/Documents/CodeBases/Nok/.meteor/local/cordova-build/platforms/ios/build/emulator/Nok.app/Info.plist file not found.
   at ChildProcess.exitCallback (/tools/utils/processes.js:151:23)
   at emitTwo (events.js:126:13)
   at ChildProcess.emit (events.js:214:7)
   at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
   => awaited here:
   at Function.Promise.await
   (/Users/andressosa/.meteor/packages/meteor-tool/.1.8.0.1nm6x1w.bs9g++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/meteor-promise/promise_server.js:56:12)
   at CordovaProject.runCommands (/tools/cordova/project.js:805:14)
   at Promise.asyncApply (/tools/cordova/project.js:276:10)
   at
   /Users/andressosa/.meteor/packages/meteor-tool/.1.8.0.1nm6x1w.bs9g++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/meteor-promise/fiber_pool.js:43:40

/Users/andressosa/.meteor/packages/meteor-tool/.1.8.0.1nm6x1w.bs9g++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/meteor-promise/promise_server.js:218
      throw error;
      ^
undefined
 => awaited here:
    at Function.Promise.await (/Users/andressosa/.meteor/packages/meteor-tool/.1.8.0.1nm6x1w.bs9g++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/meteor-promise/promise_server.js:56:12)
    at Promise.asyncApply (/tools/cordova/run-targets.js:35:7)
    at /Users/andressosa/.meteor/packages/meteor-tool/.1.8.0.1nm6x1w.bs9g++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/meteor-promise/fiber_pool.js:43:40
 => awaited here:
    at Function.Promise.await (/Users/andressosa/.meteor/packages/meteor-tool/.1.8.0.1nm6x1w.bs9g++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/meteor-promise/promise_server.js:56:12)
    at buildmessage.capture (/tools/cordova/runner.js:98:9)
    at /tools/utils/buildmessage.js:271:13
    at exports.EnvironmentVariable.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:264:29
    at exports.EnvironmentVariable.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:262:18
    at exports.EnvironmentVariable.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:253:23
    at exports.EnvironmentVariable.withValue (/tools/utils/fiber-helpers.js:89:14)
    at Object.capture (/tools/utils/buildmessage.js:252:19)
    at CordovaRunner.startRunTargets (/tools/cordova/runner.js:97:37)
    at AppRunner._runOnce (/tools/runners/run-app.js:754:21)
    at AppRunner._fiber (/tools/runners/run-app.js:908:28)
    at /tools/runners/run-app.js:398:12

It appears that the file /Users/andressosa/Documents/CodeBases/Nok/.meteor/local/cordova-build/platforms/ios/build/emulator/Nok.app/Info.plist file not found. is missing…

I’ve done some searching and I can’t figure out how to generate info.plist file.

Any suggestions?

Do you have a mobile-config.js file?

I’m running meteor 1.8

mobile-config.js

App.info({
    id: 'com.fluentHome.nok.list',
    name: 'Nok',
    description: 'Fluent Home Nok List',
    author: 'Andrés Sosa',
    email: 'asosa@#######.com',
    website: 'http://#######.com'
});

// Set up resources such as icons and launch screens.
App.icons({
    'app_store':                'public/assets/iOS-icons/NOK_Splash1024px.png',
    'iphone_2x':                'public/assets/iOS-icons/icon-60@2x.png',
    'iphone_3x':                'public/assets/iOS-icons/icon-60@3x.png',
    'ipad_2x':                  'public/assets/iOS-icons/icon-76@2x.png',
    'ipad_pro':                 'public/assets/iOS-icons/icon-83.5@2x.png',
    'ios_settings_2x':          'public/assets/iOS-icons/icon-29@2x.png',
    'ios_settings_3x':          'public/assets/iOS-icons/icon-29@3x.png',
    'ios_spotlight_2x':         'public/assets/iOS-icons/icon-40@2x.png',
    'ios_spotlight_3x':         'public/assets/iOS-icons/icon-40@3x.png',
    'ios_notification_2x':      'public/assets/iOS-icons/icon-20@2x.png',
    'ios_notification_3x':      'public/assets/iOS-icons/icon-20@3x.png',
    'ipad':                     'public/assets/iOS-icons/icon-76@1x.png',
    'ios_settings':             'public/assets/iOS-icons/icon-29.png',
    'ios_spotlight':            'public/assets/iOS-icons/icon-40.png',
    'ios_notification':         'public/assets/iOS-icons/icon-20.png',
    'iphone_legacy':            'public/assets/iOS-icons/icon-57.png',
    'iphone_legacy_2x':         'public/assets/iOS-icons/icon-57@2x.png',
    'ipad_spotlight_legacy':    'public/assets/iOS-icons/icon-50.png',
    'ipad_spotlight_legacy_2x': 'public/assets/iOS-icons/icon-50@2x.png',
    'ipad_app_legacy':          'public/assets/iOS-icons/icon-72.png',
    'ipad_app_legacy_2x':       'public/assets/iOS-icons/icon-72@2x.png'
    // More screen sizes and platforms...
  });
  
  App.launchScreens({
    'iphone_2x': 'public/assets/iOS-icons/NOK_Splash640x960px.png',
    'iphone5':   'public/assets/iOS-icons/NOK_Splash640x1136px.png',
    'iphone6':   'public/assets/iOS-icons/NOK_Splash640x1334px.png',
    // More screen sizes and platforms...
  });

BTW @rjdavid thanks so much for responding.

I just realized that I don’t use the “ios” parameter. I always use the “ios-device” parameter. Then in Xcode, that is where I choose a device to emulate which then displays the emulated device.

David. Thanks so much for that heads up. I realized that yesterday. I wish the documentation no Meteor would explain that. I wasted a day trying to figure out why that was not working. One sentence would have saved me a lot of time.

Thanks.

Can you please add this sentence to the docs? Then the next person will save a day :smiley:

docs are here https://github.com/meteor/docs
and the guide is here https://github.com/meteor/guide

1 Like

Unrelated to the topic, I just realized your assets under mobile config are under the public directory. That is a waste of build size since aside of copying it for the cordova build, meteor will also include it in the “web” build. You might want to move it outside the public folder

Man, thanks for that tip. So this would be just for the mobile build right? If I wanted to access those icons in the web app they would have to be in the public folder right? Or am I wrong?

Wait, I might be wrong. I need to double-check that tomorrow once I get in touch with my laptop.

I got time. Thanks David.

Yep, it is confirmed that assets in the public folder are packaged with the app so any unnecessary files there would bloat the final build

As soon as I used the “ios-device” parameter the “ios” parameter stopped working. I found out that cordova (or meteor) is actually removing the “build/emulator” directory just before launching and then it errors out. I realized this because I just put a dummy “build/emulator/.app/Info.plist” file in and it got wiped out just as the ios simulator was being called up.

I tried to create a brand new project with only ios, but still it didn’t work. Perhaps there’s a problem with the latest cordova?

1 Like

Hi @maka. Thank you so much for this Explanation. I am going through the same thing.

Is there any update yet? Or how to downgrade Cordova Version To Make It Work. I have being trying to Downgrade Cordova version from 4.5.4 to 4.5.1. Seems like we need some pluggins update. Maybe the console pluggin Update.

Running: Meteor 1.7.0.5
Xcode 10.1

Please Help! Please Help! please!

Same problem here. I’ve seen that people have been using a build.json UseModernBuildSystem=0

I haven’t found an easy way to use build.json in a meteor run ios or meteor build

1 Like

Thank you @jaysistar for helping. Will try it out. Thank you