diff --git a/e2e/bitrise.yml b/e2e/bitrise.yml index db23f85c..f4a85cf6 100644 --- a/e2e/bitrise.yml +++ b/e2e/bitrise.yml @@ -19,6 +19,37 @@ app: workflows: + test_visionOS: + description: visionOS SDK requires Xcode 15.2+ + steps: + - bitrise-run: + title: Run visionOS test if current stack supports it + run_if: |- + {{ and (ne (getenv "BITRISEIO_STACK_ID") "osx-xcode-15.1.x") (ne (getenv "BITRISEIO_STACK_ID") "osx-xcode-15.0.x") (not (envcontain "BITRISEIO_STACK_ID" "osx-xcode-14.")) }} + inputs: + - workflow_id: utility_test_visionOS + - bitrise_config_path: ./e2e/bitrise.yml + + utility_test_visionOS: + envs: + - TEST_APP_URL: https://github.com/bitrise-io/visionOS-HelloWorld + - TEST_APP_BRANCH: main + - TEST_APP_COMMIT: "" + - BITRISE_PROJECT_PATH: World.xcodeproj + - BITRISE_SCHEME: World + - CODE_SIGNING_METHOD: api-key + - MIN_DAYS_PROFILE_VALID: 0 + - FORCE_CODE_SIGN_IDENTITY: "iPhone Developer: Tooling Bot Bitrise" + - TEAM_ID: 72SA8V3WYL + - FORCE_PROV_PROFILE_SPECIFIER: "" + - IPA_EXPORT_METHOD: development + - IPA_EXPORT_ICLOUD_CONTAINER_ENVIRONMENT: "" + - LOG_FORMATTER: xcodebuild + after_run: + - _run + - _check_outputs + - _check_exported_artifacts + test_override_api_key_signing: description: Test API key based signing on a project where code signing is not managed automatically, by step inputs envs: diff --git a/step/platform.go b/step/platform.go index f3b12f6d..b9a99244 100644 --- a/step/platform.go +++ b/step/platform.go @@ -12,17 +12,16 @@ import ( "github.com/bitrise-io/go-xcode/xcodeproject/xcscheme" ) -// Platform ... type Platform string const ( - iOS Platform = "iOS" - osX Platform = "OS X" - tvOS Platform = "tvOS" - watchOS Platform = "watchOS" + iOS Platform = "iOS" + osX Platform = "OS X" + tvOS Platform = "tvOS" + watchOS Platform = "watchOS" + visionOS Platform = "visionOS" ) -// OpenArchivableProject ... func OpenArchivableProject(pth, schemeName, configurationName string) (*xcodeproj.XcodeProj, *xcscheme.Scheme, string, error) { scheme, schemeContainerDir, err := schemeint.Scheme(pth, schemeName) if err != nil { @@ -53,21 +52,17 @@ func OpenArchivableProject(pth, schemeName, configurationName string) (*xcodepro return &xcodeProj, scheme, configurationName, nil } -// TargetBuildSettingsProvider ... type TargetBuildSettingsProvider interface { TargetBuildSettings(xcodeProj *xcodeproj.XcodeProj, target, configuration string, customOptions ...string) (serialized.Object, error) } -// XcodeBuild ... type XcodeBuild struct { } -// TargetBuildSettings ... func (x XcodeBuild) TargetBuildSettings(xcodeProj *xcodeproj.XcodeProj, target, configuration string, customOptions ...string) (serialized.Object, error) { return xcodeProj.TargetBuildSettings(target, configuration, customOptions...) } -// BuildableTargetPlatform ... func BuildableTargetPlatform( xcodeProj *xcodeproj.XcodeProj, scheme *xcscheme.Scheme, @@ -140,6 +135,9 @@ func getPlatform(buildSettings serialized.Object) (Platform, error) { return tvOS, nil case strings.HasPrefix(sdk, "watchos"): return watchOS, nil + case strings.HasPrefix(sdk, "xros"): + // visionOS SDK is called xros (as of Xcode 15.2), but the platform is called visionOS (e.g. in the destination specifier) + return visionOS, nil default: return "", fmt.Errorf("unkown SDKROOT: %s", sdk) }