简体   繁体   中英

How can I run my hybrid mobile app in debug/development mode on an iPhone?

TL;DR: I can run our app in development mode through VS2015 with remote debugging on the iPhone 5c that I have, but I cannot do the same on the iPhone 4s.


I'm having some difficulty getting a Cordova powered hybrid app to deploy on one particular device in my development environment... However I'm unsure if this is something I'm doing wrong or if there's some compatibility issue here. Posting a question here in the hopes that someone can help me work out what's going on.

Just for some background: The app in question was created using Intel XDK, then ported across to Visual Studio 2015 when Intel recently removed some of XDK's "Debug" functionality. A few things needed to be adapted, but the project does still include some of Intel's JS code as it was in the original project.

My environment includes:

  • Windows 10 Pro (primary desktop)
  • Apple Mac Mini with OSX "El Capitan" 10.11.6 (on the network as a build server)
  • iPhone 5c with iOS 8.3
  • iPhone 4s with iOS 9.0.2

While configuring this environment, I followed the instructions here . The remotebuild agent is configured to use http only to keep it simple, since this is all contained within a corporate network anyway.

After this I could run our app on the iPhone 5c without any problems, but trying to run it on the iPhone 4s gives an error in VS2015 stating:

Failed to deploy iOS remote for <project_path>\\bld\\ios\\Debug\\buildInfo.json to http://10.66.7.23:3000/cordova: Error from http get [object Object]: Error: socket hang up

Note: There are no errors in the remotebuild console output on the Mac and VS builds the project correctly, but then fails to deploy it.

I've also tried multiple Provisioning Profiles on both devices, installed using iTunes, Xcode or Apple Configurator 2; but thanks to the provisioning profiles not showing up on devices with iOS 8 or newer, I can't even verify that they're installed at all.

Both of these devices can install and run the previous version of this app (available in app stores), but I need to be able to inspect the DOM in real-time, because even though they have the same screen size, the responsive break points are behaving differently.

So, before I pull out what little hair I do have left, please could somebody help me work out what the hell is going on here?? I've been fighting with this for over a week now and I feel like I'm going round in circles.

Even the answer is already posted by the Questioner himself, I m still posting mine for the benefit of others.

When a build deploys fine on one device running on iOS 8 and not on the one running on iOS 9, it could either be problem with iOS version due to the security changes or it could be the device compatibility problem.

In such case, the quick way to narrow down the problem is to test the build on other device with the same version (iOS 9). But unfortunately in @Zalithka's case he dint had device to test. But if someone encounters such problem, try out in different devices to narrow down the problem quickly and nail it.

After all this backwards and forwards with the iPhone 4s, it turns out the device itself was actually faulty. Somehow this had translated to having a version of iOS that was not installed correctly, which resulted in software issues for apps running on the device.

This was not immediately apparent to us because of the unfortunate lack of devices we had access to for testing, but since I managed to get my hands on an iPad Mini with 9.3.5 and an iPhone 6 with 10.2.1, we've managed to verify our app's compatibility with the newer OS versions.


Anyways, in closing I just wanted to say a massive thank you for all the suggestions and ideas I got in the question comments (especially @Gandhi, sorry about the bounty story, I still feel like you deserve that just for being so helpful).

Despite the fact that my particular issue was not something that could be resolved here on SO, I have still learned a great deal during this process and I am so very grateful.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM