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
- Xcode command line tool
- When using the simulator
- When using a real device
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 Installing the Xcode command line tool
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
App file for the app you wish to test
When performing a test using the iOS simulator, the “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 register with the Apple developer program and acquire the “Team ID” information. The procedure for confirming the team ID is as follows.
- Following the procedure here, register with 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 you are a company developing an iOS app, you should be registered with the developer program as a company, 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 a registered 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 4 Apple developer program team ID
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.
It is necessary to prepare a cable (Apple Lightning - USB cable) to connect the iOS device and the PC USB terminal. 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, the “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 5)
- Select “Product” >”Archive” from the menu. (Figure 5)
Figure 5 Generating 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 6). 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 6 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.