Cannot get Meteor to run on iOS device

916 views Asked by At

I'm new to Meteor.

My app runs fine in the browser and in the iOS simulator. However, I cannot get it to run on an iOS device. I use the command - meteor run iOS-device, which is suppose to open Xcode so you can run the app. Xcode never opens and I get the following message: Could not open your project in Xcode.

Below is more from the terminal.

%% Running synchronously:  /Users/NAME/.meteor/packages/meteor-tool/.1.0.35.wql4jh++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/cordova-scripts/cordova.sh [ '--verbose', 'build', 'ios' ]

%% Done building the cordova build project    
%% A run on a device requested                
WARNING: You are testing your app on a remote device.
         For the mobile app to be able to connect to the local server, make
         sure your device is on the same network, and that the network
         configuration allows clients to talk to each other
         (no client isolation).

[[[[[ ~/Google Drive/Meteor-Apps/APPNAME ]]]]] 

=> Started proxy.                             
=> Started MongoDB.                           
%% Execing cordova for platform ios-device    
%% isDevice: true                             
%% It is ios-device, just opening the Xcode project with `open` command

%% Running synchronously:  sh [ '-c',         
  'open /Users/NAME/Google Drive/Meteor-Apps/APPNAME/.meteor/local/cordova-build/platforms/ios/*.xcodeproj' ]

Could not open your project in Xcode.
2

There are 2 answers

1
Cameron Cruz On

Don't know if you still need help, but I ran into this exact same issue in my development.

%% Running synchronously: sh [ '-c',
'open /Users/NAME/Google Drive/Meteor-Apps/APPNAME/.meteor/local/cordova-build/platforms/ios/*.xcodeproj' ]

Meteor will not detect spaces in your directory names. Thus, in your above example, /Google Drive/ is parsed to the open command as /Users/NAME/Google and separately Drive/Meteor-Apps/... if you run the open command by itself in a new terminal with that path Meteor is trying to use, you will get an error saying /Users/NAME/Google does not exist.

To fix, you need to use a path in which all directory names have no spaces. As Tom Nassr was saying, since you can't change the Google Drive directory name, copy the project folder to a different path on your machine. You can rename any other directories with dashes or underscores or something, like /my_directory/.

Running meteor run ios-device will now work.

0
Tom Nassr On

Try dragging your project folder to your local machine, then running "meteor run ios-device" command.

Meteor seems to get messed up when the files are based on Google drive.