To run automation scripts for any iOS app, you definitely need a Mac machine. It can't be done on Windows.
Xcode needs to be present for Appium to work. Appium's command life-cycle, works as :
- Selenium webdriver picks a command form the code like (Element.click) and sends it in form of JSON via http request to the Appium server.
- Appium server knows the automation context like the iOS and Android and sends this command to the Instruments command server which will wait for the Instruments command client (written in node.js) to pick it up and execute it in bootstrap.js with in the iOS instruments environment.
- Once the command is executed the command client sends back the message to the Appium server which logs everything related to the command in its console. This cycle keeps going till the time all the commands gets executed.
Appleās instruments binary, which Appium uses to launch the iOS simulator, by default uses the currently-selected Xcode, and the highest iOS SDK installed with that version of Xcode.
Reference for iOS Appium [Mac] : You can refer my blog post here to refer to run scripts on simulator/real device for iOS.