Updating ParseLiveQuery Travis configurations for Xcode 10.2 or 11 #194
Description
I have a pull request updating ParseLiveQuery to use Swift 5. Upon submitting a pull request I noticed that Jenkins wasn't building and needed a few configuration updates. I changed settings to what I thought would work but I am getting this error in the logs.
ERROR | [iOS] unknown: Encountered an unknown error (Could not find a ios simulator (valid values: com.apple.coresimulator.simruntime.ios-10-0
It continues to list all simulator values but this should get the point across. I have no idea what I need to do. I noticed in Parse that they have a Rakefile that has the following.
`namespace :test do
desc 'Run iOS Tests'
task :ios do |_, args|
task = XCTask::BuildTask.new do |t|
t.directory = script_folder
t.workspace = 'Parse.xcworkspace'
t.scheme = 'Parse-iOS'
t.sdk = 'iphonesimulator'
t.destinations = ["\"platform=iOS Simulator,OS=12.2,name=iPhone X\"",]
t.configuration = 'Debug'
t.additional_options = { "GCC_INSTRUMENT_PROGRAM_FLOW_ARCS" => "YES",
"GCC_GENERATE_TEST_COVERAGE_FILES" => "YES" }
t.actions = [XCTask::BuildAction::TEST]
t.formatter = XCTask::BuildFormatter::XCPRETTY
end
unless task.execute
puts 'iOS Tests Failed!'
exit(1)
end
`
This seems to follow the documentation for Travis. However in ParseLiveQuery we have this in our config.yml in the .circleci folder.
`- run: xcodebuild build -workspace ParseLiveQuery.xcworkspace -sdk iphonesimulator -scheme ParseLiveQuery-iOS -configuration Debug -destination "platform=iOS Simulator,OS=12.2,name=iPhone X" GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES | xcpretty -c;
I'm sure this is practically the same thing but I feel like bringing ParseLiveQuery files more in line with the Parse .yml and script files that this would be a bit easier to maintain when we have Xcode, Swift, and iOS/Mac OS version bumps. Either way though I still dont know quite where the issue is. If someone could take a look and give me a hand I'd appreciate it. You can find my pull request here.