On this page, we shall explain the setup procedures required to perform an iOS test in a local PC environment (in case of iOS, you can create and run tests simply using the Cloud environment).
In the case of a local PC, we recommend using the iOS simulator first, because it is easier to set up, and more stable.
Table of contents
1. Xcode
This is a tool for developing iOS apps, etc. Referring to this article, install the latest version of Xcode from the Mac App Store.
When the screen shown in figure 1 is displayed, installation is complete.
Figure 1. Xcode launch screen.
2. Xcode command line tool
There are various command line tools attached to Xcode.
After installing Xcode, open a Mac terminal (refer to this article for how to open it) and run the xcode-select --install command to install. (figure 2)
Figure 2. Install the Xcode command line tool.
3. ios-deploy
Furthermore, it is necessary to install the ios-deploy tool according to the following procedure.
First, open a Mac terminal, and confirm that the brew command is installed. Try running the brew command. If the error shown in figure 3 appears, brew has not been installed.
Figure 3. Error displayed if the brew command does not exist.
In case it is not installed, run the following command on a terminal to install brew.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Next, if you run brew install ios-deploy on a terminal, ios-deploy will be installed.
4. When using the simulator
Install a simulator runtime
In Xcode 15.0 and later, it is necessary to pre-install simulator runtimes. Open the Xcode app, click the App menu, then go to Xcode -> Settings -> Platforms in that order. Install the simulator runtime you want to use for testing, as shown in figure 4. You can install simulator runtimes from previous versions using the + icon at the bottom left of figure 4.
Figure 4. Platforms.
App file for the app you wish to test
When performing a test using a iOS simulator, an app file that is the content of the app is required. Referring to here, provide the app file.
5. When using a real device
Check the team ID for the Apple developer program
When performing a test using a real device, it is necessary to enroll in the Apple developer program and acquire the Team ID information. The procedure for confirming the team ID is as follows.
- Following the procedure here, enroll in the Apple developer program. An annual fee of $99 is required for this registration. It also may take several days to complete the application process. If your company is developing an iOS app, the company should already have enrolled in the developer program, so we would recommend checking this with the developer team.
- We do not recommend using the free Apple developer ID, but it can be used if you solve the problem of not being able to connect properly to the actual iOS device with a free Apple developer ID.
- When logging into https://developer.apple.com/account/#/membership with an enrolled account, you can confirm the team ID as shown in figure 5. This value is required when performing a test, so you should make a note of it somewhere.
Figure 5. Apple developer program team ID.
iOS device
Use an iOS device (iPhone or iPad).
- Set Settings > Display and brightness > Auto-lock to Never.
- For the iPad, there is a bug in which the Japanese language cannot be correctly entered, so change the keyboard settings using this procedure.
USB cable
It is necessary to prepare a cable (Apple Lightning - USB cable) to connect the iOS device and the USB port of the PC. Prepare something shaped like the item in this image. You should be able to reuse the iOS device charging cable. Use this cable to operate the device from the PC when running the test.
ipa file for the app you wish to test
When performing a test on an iOS real device, an ipa file is required.
The ipa file should be prepared by the app developer or can be generated or acquired from the source code using the following procedure, and placed in an appropriate location on your PC.
- Open the app project in Xcode.
- Change the build target to Generic iOS Device. (figure 6[1])
- Select Product > Archive from the menu. (figure 6[2])
Figure 6. Generate the ipa file.
- Select Export on the displayed screen, and proceed to the dialog box, by selecting Save for Ad Hoc Deployment or Save for Development Deployment (figure 7). We do not recommend using Enterprise Deployment, but you can use the ipa file for Enterprise Deployment to resolve issues when it is not possible to connect properly to the iOS real device.
Figure 7. ipa file Export.
- Once the processing is complete, you can choose the output directory to generate the ipa file.
In case the real device test does not work properly
Check Workarounds in Case the Connection to the iOS Real Device Does Not Work Correctly or Frequently Asked Questions to see if they contain any solutions for the error message in question.