In this chapter we will learn How to Build & Run Xcode Project on Mac Machine, as in order to execute Appium Test on Real IOS device, it is required to Install the Safari Launcher App on the device using Xcode. To do this we need to perform the following steps:
- Download Git project from https://github.com/budhash/SafariLauncher link.
- Generate Safari Launcher App file by Build & Run Xcode Project
- Use .App file further in Appium settings for App Path attribute.
1) Download and Install Xcode 5 or later version on mac with Command Line tools from Mac store or from https://itunes.apple.com/us/app/xcode/id497799835?mt=12 (Mac OS version should be 10.7+).
2) Real IOs device is connected with Mac.
Build & Run Xcode Project
1) Open Xcode from “/Applications” folder.
2) Click on Open Another Project
3) Navigate to the folder path where SafariLauncher Project is located and select it. If you have not downloaded the Safari Launcher project then you can download it from https://github.com/budhash/SafariLauncher link.
4) Select the iPhone version on which you want to install this app.
5) Build Project using Xcode. This will generate the .app file.
6) Xcode generates .app file which is used further in Appium settings for App Path attribute. To do that open Mac terminal and type command open –a Finder ~/Library/Developer/Xcode/DerivedData/. It will open the mentioned folder, now select your app like safari and navigate to Build/Products/Deployment/ folder (It can be different location in your case). Here you will get .app file. Copy this app Path and use it for App Path attribute in basic setting for Appium.
Note– If While building through Xcode, your app is launched on a Real device then only you will be successful to install it through Appium as well.