Skip to content

Prevent showing last camera image on start #178

Prevent showing last camera image on start

Prevent showing last camera image on start #178

Workflow file for this run

name: iOS build
permissions:
contents: read
pull-requests: write
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
name: Build and Test default scheme using any available iPhone simulator
runs-on: macos-latest
steps:
- name: List available Xcode versions
run: ls /Applications | grep Xcode
- name: Set Xcode version 16.2
run: sudo xcode-select -s /Applications/Xcode_16.2.app
- name: Show current version of Xcode
run: xcodebuild -version
- name: xcpretty install
run: gem install xcpretty
- name: Checkout
uses: actions/checkout@v4
- name: Set Default Scheme
run: |
scheme_list=$(xcodebuild -list -json | tr -d "\n")
default=$(echo $scheme_list | ruby -e "require 'json'; puts JSON.parse(STDIN.gets)['project']['targets'][0]")
echo $default | cat >default
echo Using default scheme: $default
- name: Build
env:
scheme: ${{ 'default' }}
platform: ${{ 'iOS Simulator' }}
run: |
xcodebuild -project SnapSafe.xcodeproj/ -scheme SnapSafe -configuration Debug -sdk iphonesimulator18.2 -destination 'platform=iOS Simulator,name=iPhone 16,OS=18.2' -derivedDataPath ./build CODE_SIGNING_ALLOWED=NO clean build-for-testing | xcpretty
- name: Test
env:
scheme: ${{ 'default' }}
platform: ${{ 'iOS Simulator' }}
run: |
xcodebuild -project SnapSafe.xcodeproj/ -scheme SnapSafe -configuration Debug -sdk iphonesimulator18.2 -destination 'platform=iOS Simulator,name=iPhone 16,OS=18.2' -derivedDataPath ./build CODE_SIGNING_ALLOWED=NO test-without-building | xcpretty