L&D series: Build iOS simulator .app via CLI

Ferawati Hartanti Pratiwi
2 min readJul 28, 2022

--

https://miro.medium.com/max/1200/1*U2a9qgz9MbrRtxwYJuOOSg.png

Learning and Development chapter 20.

  • Install Xcode.
  • Enter iOS developer repository.
  • Run these command:
$ gem install bundler
$ bundle
$ pod install

To build iOS .app we could use this syntax.

$ xcodebuild -workspace <xcode workspace>.xcworkspace -scheme <xcode scheme name> -sdk iphonesimulator.

Note: If there are any error, please consult with your iOS developer because each iOS repo might have any different way to setup.

Where is .xcworkspace file?

By default, we can find the file in the root folder of our repository. Also we can find .xcodeproj file in the same path.

Where is scheme name?

  • Open Xcode.
  • Open .xcworkspace file.
  • Click Product menu.
  • Choose Scheme menu.

Where is the generated result of .app file?

We can find the .app file in ~/Library/Developer/Xcode/DerivedData/{app name}/Build/Products/Debug-iphonesimulator/Deployment/{app name}.app. Move the .app file to anywhere you want for your automation purpose.

https://fokusolusi.id/wp-content/uploads/2021/09/simulator.jpg

FYI, if you want to build .app in iOS real device, you could use this syntax:

$ xcodebuild -workspace <xcode workspace>.xcworkspace -scheme <xcode scheme name> -sdk iphoneos -allowProvisioningUpdates CODE_SIGN_STYLE="Automatic" CODE_SIGN_IDENTITY="Apple Development" PROVISIONING_PROFILE_SPECIFIER="" DEVELOPMENT_TEAM="<team dev ID>". — MperMperPisang

References:

--

--

Ferawati Hartanti Pratiwi
Ferawati Hartanti Pratiwi

Written by Ferawati Hartanti Pratiwi

Continuously striving to elevate QA standards with a quality-focused mindset

No responses yet