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

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.

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.

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.

Related

How to create .IPA file and install app without development account for Xcode 7.2 and iOS 12

I'm sorry in advance if this question has been asked a couple of times before, but I have been reading and trying different solutions for hours now with no luck.
I have an iPhone running iOS 12 for development, and an Apple ID with free developer account, and a mac running on version 10.10, and it doesn't belong to me so I cannot upgrade the system. Unfortunately, it means I'm stuck at Xcode 7.2, which doesn't support iOS 12, I have tried installing the image disks already, but that didn't help as I still can't normally build and run the app to my iPhone by just connecting the iPhone.
I was wondering if there's any other way I can get the app on my iPhone without paying for a full development account? This seems nearly impossible to me at this point but I hope you can help me out.
I would normally opt for just simulating the app, but this one relies completely on the gyroscope of the device so I need to test it on an actual device.
Thanks in advance.

Why cant I build apps on my PC but I can on my mac? Xamarin

So I got my MacBook pro yesterday in hopes of developing some local apps to build on my phone.
And after setting everything up, Visual studio on my mac and XCode, and I already had Visual Studio on my PC things started messing up.
I tried debugging my app on my phone from my PC, with the phone connected to my PC ofcourse, didnt work, so I read around on the internet for a good 4 hours and it said that I should create a blank project in XCode, and for the Signing in preferences I had to choose Team, so I did and it debugged the application on my iphone when my iphone was connected to my Mac,
However I DONT want to code on Mac computers, I want to use my PC.
But everytime I try to debug the application from my PC it keeps saying
Could not find any available provisioning profiles for iOS.
I am running a iPhone 7 with the version 10.1.1 because I dont want to update due to various reasons.
I tried changing the Deployment target to something really low but that didnt fix it.
Why is this happening?
Visual representation of what the error looks like
Not sure if this picture helps, this is the project properties > iOS Bundle Signing
And my device log is empty aswell.. Why?
ANother error message saying it doesnt support
EDIT
I plugged it into the mac and now its visible in the Device log and I can see stuff happening in the device log but I still cant boot the project on my iPhone
Apple doesn't allow developing for iphone on a non IOS device. This simply means that you can't build apps on a Linux or Windows computer/laptop the normal way. You are stuck on building your project on an IOS device.
There are 2 options to fully develop on a Windows laptop though.
One way of doing so is by using your mac as a gateway to send your app from Windows to IOS to your phone. More info about this can be found here:
https://learn.microsoft.com/en-gb/xamarin/ios/get-started/installation/windows/
The second option is a newer one called Xamarin Live Player. You don't need to use a mac at all for developing, but you still need a mac if you want to publish the app. This option also works differently from normal development as you need to download an extra program on your phone.
https://www.xamarin.com/live
You could try to do manual provisioning. Create a development provisioning profile at the Apple Developer site, and have XCode download it for you. Then it should show on your PC for you to select.
See the Xamarin documentation on manual provisioning for some more details:
https://learn.microsoft.com/en-us/xamarin/ios/get-started/installation/device-provisioning/manual-provisioning?tabs=vsmac#creating-a-development-provisioning-profile

Launching iOS App in UI Testing Mode from Windows 10

It is obvious that we can run iOS App (.ipa, .app) in UITest mode from MacOSX using Xcode or Xcode command line tools.
But I saw some test-automation tools, who can launch App in UITesting mode (Appium Studio, QUAmotion, Ranorex, ..etc) from Windows 10. They are even giving back elements. (which is possible only in UITestMode)
As per my knowledge, UI Testing mode is only supported on MacOSX with Xcode because Xcode has a testManager which it uses to manage the Testcases while running. As for iOS Device attached to windows. LibiMobileDevice with the help of itunes gives functionalities like installing, running, uninstalling etc.
Can any one explain or help me with some library (paid or free )that can help me in Launching iOS app with UI Testing mode on iOS Device from Windows 10 ?
I work for Quamotion, one of the companies that you mentioned. You are right, we can run iOS appliations in UI Test mode on Windows and Linux, just like other vendors such as Ranorex.
If you're still interested, I'd be happy to help you getting started with launching iOS applications in UI testing mode on a real, physical iOS device in Windows 10.
The best way for you to get started would probably to download the latest version of Quamotion, request a 2-week trial license and start one of the tutorials.
For example, we publish a hands-on-lab which shows you, step by step, how you can automate the Acquaint iOS application on a real iPhone from a Windows PC.

iOS 8 - 9 Upgrade testing

During QA testing of one of my iOS apps an issue has been logged when upgrading a device for iOS 8 to iOS 9. Although I have a good idea where the bug is occurring it is quite a difficult situation to test because once a physical device has been upgraded from iOS 8->9 it is not possible to roll back to 8 again to repeat the tests.
Is anyone aware of a way to perform this type of testing without having an illimited number of iPads. It is not possible using the XCode simulator obviously, and the physical device upgrade procedure prevents rolling back to a previous iOS version. Surely Apple must have some sort of provision for people in this situation but I can not find any information.
Any help would be appreciated.

Is it possible to have an ipad simulator for windows?

I am developing an application for iPad but in reality i don't have the iPad.So is their any way to perform this task on windows platform without having the iPad.Is it possible to have an ipad simulator for windows?
Your help will surely appreciated.
Thanks in advance!
Arvind Thakur
I did this for a project. It's a pain, but it can be done with VMWare, you just emulate Snow Leopard or whatever Mac OS (which you will have to purchase, luckily they are very cheap compared to Windows.) Then from VMWare you run can run XCode, which has a very nice iPad simulator which, while not a perfect simulator, certainly gave me no problems.
Short answer: No.
Long answer: Ok, there are things like hackintoshs, however I don't think it's worth the while.
Seriously, if you're planning to release an app for iPad, you should have tested it on an actual iPad prior to release. While the iPad Simulator is good, there still are differences - if your app runs on the simulator, that does not necessarily mean it will run on the device.
I think I remember that testing on an actual device prior to release is even required in the iOS Developer Terms of Use somewhere.
You'll find nicely priced 16 GB 1st Gen Units at an auction platform of your choice.
You can use Safari on Windows to simulate much of the iPad web environment if you're building a web-app, however building a true iPad application will require using Xcode on the Mac.

Resources