Skip to content

Update ios.yml

Update ios.yml #12

Workflow file for this run

name: iOS
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
name: Build and Test default scheme using any available iPhone simulator
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Select Xcode Version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '15.0'
- name: Get Xcode Version
run: sudo xcode-select -p
- name: Get Swift Version
run: swift --version
- name: Disable SPM Plugin Validation
run: defaults write com.apple.dt.Xcode IDESkipPackagePluginFingerprintValidatation -bool YES
- name: Build
env:
platform: ${{ 'iOS Simulator' }}
run: |
# xcrun xctrace returns via stderr, not the expected stdout (see https://developer.apple.com/forums/thread/663959)
device=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}' | sed -e "s/ Simulator$//"`
xcodebuild build -scheme "Example" -project Example/Example.xcodeproj -destination "platform=$platform,name=$device"