Tools for Apache Cordova/Visual Studio 2015 fails to launch app in IOS simulator
Asked Answered
C

1

0

Im trying to test my app using MacInCloud and remotebuild on the IOS simulator. Everything works great and the app compiles using remotebuild. Visual Studio then displays a status "Deployed Successfully". When I look on my mac, it shows the IOS simulator launched but only shows the home screen. I do not see my app at all. Im at a loss on what to check next. Any help would be appreciated.

I see this error in the output window.

Requesting emulate on iOS Simulator for buildNumber 89952 on server https://74.xx.xx.xxx:3000/cordova... Failed to launch iOS remote for build C:\Users\md\documents\visual studio 2015\Projects\app2\app2\bld\ios\Release\buildInfo.json to https://74.xx.xx.xxx:3000/cordova for deploy target iPhone 5S: Http 404: {"command":"build","vcordova":"5.3.3", etc..

One thing I notice about the BuildInfo.Json file is puts a lot of my image files as "changedFiles" even though I havent changed them. Im wondering if the "changedFiles" field is too big to process. Im not sure why it says http 404 error..

Camacho answered 4/2, 2016 at 18:12 Comment(1)
Nobody has some kind of hint on this? Im stuck and I cant test my PhoneGap for IOS.Camacho
C
0

This may be an issue with ios-sim. We'll be publishing an updated version with a fix for that issue shortly, but you may be able to try a workaround in the short term.

On the mac, go to ~/.taco_home/node_modules/taco-remote-lib/<VERSION>/node_modules/taco-remote-lib/ and run npm uninstall ios-sim && npm install [email protected]. For the VERSION, you want to use the latest 1.X if you are using cordova earlier than 5.4.0, and the latest 2.X if you are using a newer version of cordova.

The reason that the deployment is reported as successful is that we use ios-sim for deploying and launching at the same time, so the deploy step is a no-op for the iOS simulator.

Cardcarrying answered 9/2, 2016 at 1:52 Comment(12)
Thanks for the response. Versions shows 1.2.2 but I have 5.3.3 set for Cordova. Any other suggestions?Camacho
That version is expected: it is the version of taco-remote-lib which is the package that remotebuild uses to build Cordova projects. Did you try changing the version of ios-sim in ~/.taco-home/node_modules/taco-remote-lib/1.2.2/node_modules/taco-remote-lib ?Cardcarrying
I uninstalled and installed with commands you gave above. No luck yet..Now for some reason it doesnt open ios simulator. Now I get "finder" app open with title "com.apple.dt.instruments"..Not sure what happened..Camacho
That's a new one, haven't seen that happen before... You could try running the ios-sim you installed (~/.taco_home/node_modules/taco-remote-lib/1.2.2/node_modules/taco-remote-lib/node_modules/.bin/ios-sim start or ios-sim launch path/to/your.app) and see if that works. What version of xcode do you have installed?Cardcarrying
Ok I ran the second command to manually launch. Two things I noticed: 1) In Visual Studio it says it writes the app as AppName.app but It shows as the package name com.AppName.app.. and 2) It displayed lots of errors/warnings..The simulator launched but the screen is black.Camacho
It looks like xCode version is 7.2Camacho
What errors and warnings did it show when you tried to launch? And when you say you did the second command, do you mean you used the global install of ios-sim rather than the one underneath ~/.taco-home?Cardcarrying
So does this line: ~/.taco_home/node_modules/taco-remote-lib/1.2.2/node_modules/taco-remote-lib/n‌​ode_modules/.bin/ios-sim start automatically start the latest built project? I appologize as Im a newbie on the mac as well. When I run your first command today, I get a black sim screen with Safari icon on bottom..Camacho
That command just starts a simulator on the home screen. If you go up to the top menu bar, I think under "view" there is a "zoom" option that will let you go down to ~50% or so which makes the whole simulator fit on your screen, and you should see it on the home screen. If you want to launch an app, then you need to do launch path/to/your/foo.app instead of just startCardcarrying
Thanks..After trying the launch command multiple times with the simulator already open, I finally got it to come up! Im not sure why Visual Studio doesnt pull it up though..Camacho
I believe that running the manual launch command while in the ".bin" directory finally brought it up for me..Not sure why it didnt work before.Camacho
Visual studio (via remotebuild) runs that same command, so if you had to run it multiple times then that would explain why it had issues. As for the root cause, I'm not sure unfortunately. There are some known issues with ios-sim 5.0.6, but after downgrading to 5.0.4 I haven't encountered issues like this.Cardcarrying

© 2022 - 2024 — McMap. All rights reserved.