What is the Recommended Approach to Automate IOS devices on Windows? - appium

I've seen this topic going around and the answers on each site and post have given it a wide range when talking about how to automate IOS devices from Windows PC.
One side, I've seen it where mainly the answer is: it's not possible due to Apple's rules, or its really messy to set up and not worth the effort to maintain, (though not explained in detail why its messy.) On the other side, I've read articles and posts about recommendations of IOS simulators such as iPadian, Smartface, etc; along with articles suggesting to stay from this software recommendations stating that they likely contain malware and viruses.
I've found other sources suggesting Experitest, Appium Studio, Quamotion, TestProject to test and automate IOS on Windows PC. However, after reading the concerns of being cautious around these sites, and unable to proof if these studios/software legitimately support simulating real IOS environments on Windows and the arguments that are against going this approach, I can't tell which sources are reliable on this topic anymore.
The interest for me asking this question, as you can guess, is that I want to find a way to automate IOS on Windows and experience how run tests on iPhone.
I usually write my code in Eclipse Studio and use Oracle VM to create Android Emulators to test on. I'm fine if I need to have a physical IOS device in order to test.
All advice is appreciated.
Thank you

The best option I would suggest to automate iOS app on Windows is to use cloud based solution like BrowserStack, SauceLabs, etc.
This way you're sure that you will be using actual iOS device and the app would behave the same way as it would on real physical iOS device.
You can even inspect the app using Appium inspector and run the tests with ease as well.
The only drawback of using such solution is that most of them don't support latest version of Appium.
So the work around for this would be to setup Microsoft Azure DevOps pipeline on Mac OSX virtual machine and use latest Appium server version.

The tools you mention - Experitest, Appium Studio, Quamotion,... all use the same approach: they communicate with real, physical iOS devices over a USB connection and then launch an agent (WebDriverAgent or similar) on the device which you can use to automate iOS devices.
They will usually require you to at least configure an iOS developer certificate and provisioning profile (much like you would when you are testing on a Mac).
Most of them also offer you a free trial and support, so you can go ahead and install the software and give it a try.

Related

How to build a react native project for iOS in windows pc [duplicate]

We are starting to work with react-native at my company. We have one mac and the rest of the team is running on windows.
Is there a way to write the app on windows with the ios device connected to the windows machine or local wifi. Then launch the build on the mac (from the windows pc) and get the app launched on the ios device ? So it would like using the mac only as a build/package server.
Hope i am clear enought.
Thanks.
We can launch the build on windows using Virtual Machine, the detailed steps for doing that can be found in the following link:
https://blog.udemy.com/xcode-on-windows/
Honest advice
The functionality of developing IOS apps on windows is something that Apple intentionally wants to block and hence tries to give you hard time doing that by purposeful hindrances in the software that slow you down in such attempts.
To do that, you will need to install Xcode, which requires MacOS, which you would have to install on a virtual machine if you ever want to use on windows, which itself is against the apple terms and policy
So, even if it works, you wouldn't be smoothly developing in such blocked environment. So I believe it isn't worth spending time on.
I am writing this since I have tried it myself, and want to help you to not waste your time. Since most websites during search including on youtube, this subject is for clickbait with videos with more dislikes than likes. The most you can get is the following
Use cloud services like MacInCloud, MacStadium, XcodeClub ( They are expensive )
Install MacOS on virtual machine like VirtualBox or Vmware ( Apple intentionally hinders such activities and you will have hard time installing it let alone using it for bearable development )
Build and use hackintosh ( expensive, I prefer buying mac )
I hope this saves your time
You should explore the option of running macOS in VMWare on Windows machines for building purposes.
EDIT:
Now using:
expo build:android
expo build:ios
Way simpler.
Old question, but for’people who are still searching for an easy solution, take a look at https://appcenter.ms
App center let you to build iOS app in the cloud, it’s free (unless you need lot of builds), easy (you just need to know how provisioning profile and certificate works and host your code on a online fit repo).
We use it to build and deploy app on iOS and android for 3 year (even if we work on Mac)
We only have 2 main issues: it’s slow 30 minutes for an iOS build, and not extremely stable. Sometime we need to relaunch build 3-5 times.
Well, you can setup a virtual machine.
Install VM Ware software and add MacOS image to run the operating system.
Then setup Xcode and build the react native iOS app.

automate mobile device apps by direct communication to the phone via REST api

I'm currently working on a project that relies heavily on appium / selenium for automation. These frameworks are great for starting out, but the robustness isn't quite there, and requires a lot of extra hardware / software to run the automation. Such as macOS, xcode, adb, appium, selenium, usb connection or connected through WIFI ( what we currently have to use ). There is just a lot of dependencies in this automation stack, and it would be nice to have a cleaner, more reliable, and scalable solution.
So I'm wondering. Does any one know a way to run automation for iOS and Android via REST api using a server that lives directly on the device allowing us to communicate to the device like curl -POST <device_ip>:<port>/session/{sessionId}/openApp.
Think of the WebDriverAgent that Facebook built, but instead of being built with xcodebuild, that Agent just lives on the device. Essentially when you build this framework it starts up that server I'm describing, but its reliant on xcode, and i ultimately would like to remove xcode from having to be in the picture. I know that there are so many issues today I see with people having issues with both the WDA server and xcode. Specially with new versions, and how the WebDriverAgent is now archived by facebook.
Can't we just create an app that can act as the WebDriverServer running at all time, and will just use the same logic as today.. via start session, find elements by Id, click on them, and move on. This would also remove the need to running Appium on your computer, and rely on it to proxy your commands to that WDA server with iOS.
I know android is a much simpler picture, and I'm currently a little more focused on how to solve this with iOS at the moment.
I would appreciate any insight into this issue / question, and if anyone has suggestions on Appium, iOS automation, android automation, or other points that can be made please send me your feedback.
We do run our automation using real devices!
I have use Appium / Selenium to access from Rest API . In my opinion it is easier than building your own.
One of the solution was is we are currently working in a project using Flutter - that still need your Xcode to sign in the dependencies. You will also need to make sure libimobiledevice and ideviceinstaller are installed, and lastly modify Flutter. And we call the real device from rest api . We are currently scaling and monitoring the performance.
Another viable alternative which I can think of, doing it through XCTest will be easier than Appium . Just provide the end point in your app and create a wrapper in XCTest. Call the rest api and run the test in XCTest. It is more stable and faster in long run.
But for bulk of projects , I am still using Appium to test for iOS while we are evaluating this solution.
If you're open to using commercial tools, you can consider using xcuitrunner. It installs a recent version of Appium's fork of WebDriverAgent on your iOS device, launches it (and keeps it alive), and returns you a HTTP endpoint which you can use to interact directly with the WebDriverAgent.
It helps remove a couple of dependencies (such as Xcode), which may be difficult to manage. You'll still need a code signing certificate and provisiong profile from Apple, though.

Possible to simulate iOS app with Visual Studio using Windows PC only

I apologize if this has been covered elsewhere. I have researched this topic to the best of my ability but I am still unsure of the answers I have found. I am a senior in college and I am developing an app to essentially act as a remote control for a device that my team is building for our senior capstone project. Everything is progressing fine for the Android app etc., but we are interested in developing an iOS app as well. We were steered toward Visual Studio 2015 or later for this since none of us own a Mac. We do not have an iPhone and we are not interested in trying to actually sell or deploy the app officially. All we really need is a means to simulate the iOS app on a PC and demonstrate that the functionality is still there to control our device.
I have seen several posts stating the requirement of a Mac regardless to, at the least, handle conversions for any app development on a Windows machine. I have also found a couple posts with a potential work around that involved installing a Mac VM, though I am not sure if these are "legal" solutions or not? We do not have it in our project budget to purchase any Mac systems, OS, or cloud services to develop the app. I have only done light work on Macs unrelated to programming so I know very little about what is possible regarding VMs etc.
At this point I am looking for some clarity on whether there is an actual legitimate and legal means to simulate an iOS app using Visual Studio and a Windows PC only? In our case, we would need the simulation to be able to connect to our device wirelessly and control it. It is OK that the physical device would actually be a Windows laptop, the CS department just wants to see that we have developed software that could in theory work on an iOS device. We would be presenting our work in detail during weekly updates so the solution would need to be above the table in all regards.
I apologize if this is answered elsewhere. The options in Visual Studio and most of the guides online are pretty unclear about what you can and can't do specifically under the various project types. We didn't want to get too deep into development with C# only to hit an impassable wall and lose all that time. It seems Apple keeps everything under close guard so I was suspicious about the VM alternatives to having a Mac. Thanks in advance for you time!
You must have a Mac to develop iOS apps, either to act as a build server, or as your primary development machine. Even when using Xamarin, the build tools and iOS Simulator are provided by Apple and will only run on Apple's OS. You can only legally run Mac OS on Apple hardware.
Just to add to the previous (and correct answer imo) which states that you need a mac to legally build IOS apps.
You don't need a powerful mac in order to do the building. I've been using a mac mini as a build server for a year now with no major problems. I wouldn't want to do any actual development on this machine, but it's great for sitting in the corner and doing builds sent via visual studio.
You can still do all IOS Dev on windows with visual studio (connected to the mac for building). Additionally with the enterprise version of VS you can run the IOS simulator on the PC, but again it requires a connected Mac. Although I'm hoping that they will eventually bring this functionality back to community users.
In your specific (academic) case whether or not you do manage to get a mac for building, I would suggest looking at Xamarin Test Cloud for providing evidence that your software will work on a large number of devices.

React-native: How to build for ios from windows

We are starting to work with react-native at my company. We have one mac and the rest of the team is running on windows.
Is there a way to write the app on windows with the ios device connected to the windows machine or local wifi. Then launch the build on the mac (from the windows pc) and get the app launched on the ios device ? So it would like using the mac only as a build/package server.
Hope i am clear enought.
Thanks.
We can launch the build on windows using Virtual Machine, the detailed steps for doing that can be found in the following link:
https://blog.udemy.com/xcode-on-windows/
Honest advice
The functionality of developing IOS apps on windows is something that Apple intentionally wants to block and hence tries to give you hard time doing that by purposeful hindrances in the software that slow you down in such attempts.
To do that, you will need to install Xcode, which requires MacOS, which you would have to install on a virtual machine if you ever want to use on windows, which itself is against the apple terms and policy
So, even if it works, you wouldn't be smoothly developing in such blocked environment. So I believe it isn't worth spending time on.
I am writing this since I have tried it myself, and want to help you to not waste your time. Since most websites during search including on youtube, this subject is for clickbait with videos with more dislikes than likes. The most you can get is the following
Use cloud services like MacInCloud, MacStadium, XcodeClub ( They are expensive )
Install MacOS on virtual machine like VirtualBox or Vmware ( Apple intentionally hinders such activities and you will have hard time installing it let alone using it for bearable development )
Build and use hackintosh ( expensive, I prefer buying mac )
I hope this saves your time
You should explore the option of running macOS in VMWare on Windows machines for building purposes.
EDIT:
Now using:
expo build:android
expo build:ios
Way simpler.
Old question, but for’people who are still searching for an easy solution, take a look at https://appcenter.ms
App center let you to build iOS app in the cloud, it’s free (unless you need lot of builds), easy (you just need to know how provisioning profile and certificate works and host your code on a online fit repo).
We use it to build and deploy app on iOS and android for 3 year (even if we work on Mac)
We only have 2 main issues: it’s slow 30 minutes for an iOS build, and not extremely stable. Sometime we need to relaunch build 3-5 times.
Well, you can setup a virtual machine.
Install VM Ware software and add MacOS image to run the operating system.
Then setup Xcode and build the react native iOS app.

Starting iPhone app development in Linux? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I've heard that you need to get a Mac if you want to develop iPhone apps. Is this true?
Is it possible to develop iPhone apps using Linux? If yes, what do I need and where do I download the necessary tools?
To provide a differing response, I'm running OS X and Xcode on a virtualised (VMware) machine on Linux. CPU is a Core2Quad (Q8800), and it is perfectly fast. I found a prebuilt VM online (I'll leave it to you to find)
Xcode/iPhone development works perfectly, as does debugging via USB to the phone itself.
It actually surprised me a lot - but I've had no issues at all.
The answer to this really depends on whether or not you want to develop apps that are then distributed through the iPhone store. If you don't, and don't mind developing for the "jailbroken" iPhone crowd - then it's possible to develop from Linux.
Check this chap's page for a comprehensive (if a little complex) guide on what to do :
http://www.saurik.com/id/4
It seems to be true so far. The only SDK available from Apple only targets the macOS environment. I've been upset about that, but I'm looking into buying a mac now, just to do iPhone development. I really dislike what they are doing, and I hope a good SDK come out for other environments, such as Linux and Windows.
Obstacles regarding the SDK:
The iPhone SDK and free software: not a match
Apple's recently released a software development kit (SDK) for the iPhone, but if you were hoping to port or develop original open source software with it, the news isn't good. Code signing and nondisclosure conditions make free software a no-go.
The SDK itself is a free download, with which you can write programs and run them on a software simulator. But in order to actually release software you've written, you must enroll in the iPhone Developer Program -- a step separate from downloading the SDK, and one that requires Apple's approval.
I think it's rather elitist for them to think only macOS users are good enough to write programs for their phone, and the fact you need to buy a $100 license if you want to publish your stuff, really makes it more difficult for the hobbyist programmer. Though, if that's what you need to do, I'm planning on jumping through their hoops; I'd really like to get some stuff developed on my iPhone.
There used to be a project dedicated to solve this defect: iphone-dev
The goal of the iphone-dev project is to create a free, portable, high quality toolchain to enable development for the Apple iPhone and other embedded devices based on the ARM/Darwin platform.
Regarding the alternative tool chain, Saurik's site is useful but for latest firmware development he indicates building on the iPhone itself and stays clear of indicating that you may need to copy necessary iPhone firmware files to your Linux environment. It's not impossible, but just requires additional work, especially for signing the code (there are open alternative solutions out there as well).
Also, take a look at other guides (for the same tool chain) that approach it more methodically.
I'd suggest to still do the final build and code signing and packaging in XCode (which may mean borrowing someone's Mac) in case you run into problems when submitting the application to Apple. Using the alternative tool chain opens up (at least on the Mac) the possibility of using other IDEs other than XCode for developing the application and again resorting to XCode for the deployment and testing with the simulator.
Of course if you do get the code signing / certificate generation working from the command line outside of XCode then you can install a certificate on your actual iPhone and test there (installing the app via iTunes w/your certificate).
The only way I know of doing development in Linux for the iPhone would be to install Vmware and work on getting OS X running in a virtual machine. With that said there are some "legal" concerns in doing that. It is reported that OS X Server can be virtualized but as far as the development story on that I don't know.
If you are truly serious, that's the what I'd investigate.
Good luck.
You can use Tersus (open source), and it lets you export the app as an Xcode project.
You might be able to write code on a Linux box that will eventually find itself on an iPhone or iPad, but ultimately you would need a Mac to test or deploy the code to the iPhone or to submit it to the App store. So ultimately you need a Mac, so you might as well do the work on the Mac too, with all the tools that Apple provide. There are alternatives to Xcode & Objective-C, such as Monotouch - but these utilize the Apple tools too.
You can with some work run OS X in a VM on Linux. However I should point out that this will break the OSX license agreement, even if you buy the copy of OSX - as it is only licensed to run on Apple hardware.
Sorry to give you this news - the ecosystem around the iPhone/iPad is very tightly controlled.
EDIT: One major exception to this is writing a web app for the iPhone. There are some excellent web apps for the iPhone which are almost as good as user experience as a native app. However I did interpret your question to be about native app development. Web apps, although the user can create an icon for launching them - are still 'second class' citizens.
I've had success building iOS apps on linux using the iOS clang toolchain by cjacker. Basically it consists of the upstream clang and llvm tools from your linux distro, a linux port of apple's linker and some extra tools to help simplify the build process (such as converting xcode projects to Makefile format).
It does take a few steps to install, but you're a software developer so you'd be used to that. I posted an up to date howto for Debian 7 (Wheezy) online:
https://rogerkeays.com/how-to-build-an-ios-toolchain-for-linux-debian-7
Otherwise you want to go with the generic instructions which are a little older:
http://code.google.com/p/ios-toolchain-based-on-clang-for-linux/wiki/HowTo_en
Good luck.
There's a framework called Rhodes.
The concept is based on Ruby on Rails and you develop your mobile app in Ruby and HTML, and you can write your code in a Linux environment. You can then create an account at Rhohub, where you add the code (through GitHub), and it allows you to compile it for iPhone, Blackberry, Android, Windows Mobile and Symbian, all off the same code. You don't have to code in Objective-C for iPhone, nor Java for Android, etc. It does the conversions for you. All you need to do is stick to the Rules for creating an iPhone application (or the Phone's you want to develop for) so it can be accepted at iTunes (or the equivalent market).
This will allow you to add the app to iTunes as well.
I have not found any emulators, however, which means that to test your app you need to put it on an iPhone, which is a mission.
I am using this option as I want to create apps for all phones and I use Ruby on Rails already. If you just want to make an app for an iPhone, then invest in a Mac.
Hope this helps.
You're right non-jailbroken phones are limited to Apple's App store and Apple "has the right" to enforce whatever rule, it's totally nonfree territory.
However while developing, one won't have to deal with Apple at all. You can use e.g. rsync to upload the code to the device and test it.
To a certain extent, yes, it is possible. You can type Objective-C code and set up your projects. You can even test the C and C++ parts of your code with gcc.
What you cannot do:
Use Interface Builder to set up your interface, as it's Mac-only. (Not required, but recommended.)
Compile code that uses Apple's Cocoa classes - they don't exist on Linux.
Test code in the Simulator - there isn't one for Linux.
Compile code for real devices or for the App Store - all this requires tools that Apple only provides for OS X.
You need to get mac for it. There are several tool chains available (like win-chain) that actually lets you write and build i Phone applications on windows. There are several associated tutorials to build the Objective C code on Windows. But there is a problem, the apps hence developed will work on Jail broken i Phones only.
We’ve seen few hacks to get over that and make it to App Store, but as Apple keeps on updating SDKs, tool chains need regular updates. It’s a hassle to make it up all the time.If you want to get ready app you can also take help from arcapps its launches apps at a reasonable price.
iphone app development
I did an attempt to port cocos2d-iphone to GNUstep so that you can Develop game based on cocos2d. However for publishing you need a mac. cocos2d-GNUstep.
I would recommend getting a mac because the ios simulator is amazing for testing in the early stages of an app. But I do know of a small company we work with that develops using Unity so they don't need a load of macs. That way they only need one mac for the office and that's just to compile the final build. It also means it works on android but it really depends on what your building because it's a games engine. You may want to look into web apps using frameworks like Sencha Touch Mobile
Unity: http://unity3d.com/
Sencha Touch: http://www.sencha.com/products/touch/
If you value your time, buy a Mac! I don't know enough about Linux development options to offer a viable solution, but it seems the proposed methods involve some pretty roundabout work. If you plan on seriously writing and selling iPhone apps, I think you could easily recoup the cost of a Mac Mini or Macbook. :-)
You will never get your app approved by Apple if it is not developed using Xcode. Never. And if you do hack the SDK to develop on Linux and Apple finds out, don't be surprised when you are served. I am a member of the ADC and the iPhone developer program. Trust, Apple is VERY serious about this.
Don't take the risk, Buy a Macbook or Mac mini (yes a mini can run Xcode - though slowly - boost the RAM if you go with the mini). Also, while I've seen OS X hacked to run on VMware I've never seen anyone running Xcode on VM. So good luck. And I'd check the EULA before you go through the trouble.
PS: After reading the above, yes I agree If you do hack the SDK and develop on Linux at least do the final packaging on a Mac. And submit it via a Mac. Apple doesn't run through the code line by line so i doubt they'd catch that. But man, that's a lot of if's and work. Be fun to do though. :)

Resources