Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix multiplatform iOS builds #21319

Merged
merged 5 commits into from Oct 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions Gemfile.lock
Expand Up @@ -44,7 +44,8 @@ PATH
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.3)
CFPropertyList (3.0.6)
rexml
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
artifactory (3.0.15)
Expand Down Expand Up @@ -340,12 +341,13 @@ GEM
xcode-install (2.6.8)
claide (>= 0.9.1, < 1.1.0)
fastlane (>= 2.1.0, < 3.0.0)
xcodeproj (1.19.0)
xcodeproj (1.22.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)
xcov (1.4.3)
fastlane (>= 2.82.0, < 3.0.0)
multipart-post
Expand Down
4 changes: 4 additions & 0 deletions fastlane_core/lib/fastlane_core/project.rb
Expand Up @@ -307,6 +307,10 @@ def watchos?
supported_platforms.include?(:watchOS)
end

def multiplatform?
supported_platforms.count > 1
end

def supported_platforms
supported_platforms = build_settings(key: "SUPPORTED_PLATFORMS")
if supported_platforms.nil?
Expand Down
16 changes: 16 additions & 0 deletions fastlane_core/spec/project_spec.rb
Expand Up @@ -209,6 +209,10 @@ def within_a_temp_dir
expect(@project.ios?).to eq(true)
end

it "#multiplatform?", requires_xcode: true do
expect(@project.multiplatform?).to eq(false)
end

it "#tvos?", requires_xcode: true do
expect(@project.tvos?).to eq(false)
end
Expand Down Expand Up @@ -250,6 +254,10 @@ def within_a_temp_dir
expect(@project.tvos?).to eq(false)
end

it "#multiplatform?", requires_xcode: true do
expect(@project.multiplatform?).to eq(false)
end

it "schemes", requires_xcodebuild: true do
expect(@project.schemes).to eq(["Mac"])
end
Expand All @@ -273,6 +281,10 @@ def within_a_temp_dir
expect(@project.tvos?).to eq(true)
end

it "#multiplatform?", requires_xcode: true do
expect(@project.multiplatform?).to eq(false)
end

it "schemes", requires_xcodebuild: true do
expect(@project.schemes).to eq(["ExampleTVOS"])
end
Expand Down Expand Up @@ -300,6 +312,10 @@ def within_a_temp_dir
expect(@project.tvos?).to eq(true)
end

it "#multiplatform?", requires_xcode: true do
expect(@project.multiplatform?).to eq(true)
end

it "schemes", requires_xcodebuild: true do
expect(@project.schemes).to eq(["CrossPlatformFramework"])
end
Expand Down