diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index ed48125..a88bd84 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -42,7 +42,6 @@ jobs: with: ruby-version: ${{ matrix.ruby_version }} bundler-cache: true - - run: gem update --system - run: bundle exec rake instrument-ruby2: diff --git a/config/locales/en.yml b/config/locales/en.yml index e0ddb72..1aded9c 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -18,7 +18,8 @@ en: scheme: 'Set Xcode build scheme (iOS app only)' open: 'Open a browser after the build uploaded (OS X only)' disable_notify: 'Disable email notification (iOS app only)' - xcodeproj: 'The path to the target Xcode project file (iOS app only)' + xcodeproj: 'The path to the target .xcodeproj file (iOS app only)' + workspace: 'The path to the target .xcworkspace file (iOS app only)' add_devices: description: 'Register devices to your Apple Developer account and refresh your provisioning profile. (iOS only) By default, it automatically finds new devices added to your application on DeployGate and ask you which device to register. You can also specify which device to register via command line options.' udid: 'UDID to be registered' diff --git a/deploygate.gemspec b/deploygate.gemspec index 63dad0a..8fbfd02 100644 --- a/deploygate.gemspec +++ b/deploygate.gemspec @@ -48,6 +48,7 @@ POST_INSTALL_MESSAGE spec.add_development_dependency 'rspec', '~> 3.5' spec.add_development_dependency 'webmock', '~> 2.3' spec.add_development_dependency 'i18n-tasks', '~> 1.0' + spec.add_development_dependency 'debug', '>= 1.0.0' spec.files = `git ls-files`.split($/) spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } diff --git a/lib/deploygate/command_builder.rb b/lib/deploygate/command_builder.rb index 0b452f9..ae18a2b 100644 --- a/lib/deploygate/command_builder.rb +++ b/lib/deploygate/command_builder.rb @@ -71,6 +71,7 @@ def run c.option '--open', I18n.t('command_builder.deploy.open') c.option '--disable_notify', I18n.t('command_builder.deploy.disable_notify') c.option '--xcodeproj STRING', I18n.t('command_builder.deploy.xcodeproj') + c.option '--workspace STRING', I18n.t('command_builder.deploy.workspace') c.action do |args, options| options.default :message => '', :user => nil, :open => false, 'disable_notify' => false, :command => nil begin @@ -95,6 +96,7 @@ def run c.option '--server', I18n.t('command_builder.add_devices.server.description') c.option '--disable_notify', I18n.t('command_builder.deploy.disable_notify') c.option '--xcodeproj STRING', I18n.t('command_builder.deploy.xcodeproj') + c.option '--workspace STRING', I18n.t('command_builder.deploy.workspace') c.action do |args, options| options.default :user => nil, :server => false, :command => 'add_devices' begin diff --git a/lib/deploygate/commands/add_devices.rb b/lib/deploygate/commands/add_devices.rb index b7444ea..08354d3 100644 --- a/lib/deploygate/commands/add_devices.rb +++ b/lib/deploygate/commands/add_devices.rb @@ -9,6 +9,10 @@ def run(args, options) work_dir = args.empty? ? Dir.pwd : args.first ios_only_command unless DeployGate::Project.ios?(work_dir) + # Change the current working directory for fastlane else. + root_path = DeployGate::Xcode::Ios.project_root_path(work_dir) + Dir.chdir(root_path) + session = DeployGate::Session.new unless session.login? Login.start_login() @@ -21,15 +25,15 @@ def run(args, options) distribution_key = options.distribution_key server = options.server - build_configuration = options.configuration - xcodeproj_path = options.xcodeproj + analyze = DeployGate::Xcode::Analyze.new( + build_configuration: options.configuration, + xcodeproj_path: options.xcodeproj, + workspace_path: options.workspace + ) - root_path = DeployGate::Xcode::Ios.project_root_path(work_dir) - workspaces = DeployGate::Xcode::Ios.find_workspaces(root_path) - analyze = DeployGate::Xcode::Analyze.new(workspaces, build_configuration, nil, xcodeproj_path) - bundle_id = analyze.target_bundle_identifier - developer_team = analyze.developer_team - member_center = DeployGate::Xcode::MemberCenter.new(developer_team) + bundle_id = analyze.bundle_identifier + export_team_id = analyze.export_team_id + member_center = DeployGate::Xcode::MemberCenter.new(export_team_id) if server run_server(session, owner, bundle_id, distribution_key, member_center, args, options) diff --git a/lib/deploygate/commands/deploy/build.rb b/lib/deploygate/commands/deploy/build.rb index d6db473..78af158 100644 --- a/lib/deploygate/commands/deploy/build.rb +++ b/lib/deploygate/commands/deploy/build.rb @@ -17,9 +17,7 @@ def run(args, options) options.command = options.command || COMMAND if DeployGate::Project.ios?(work_dir) - root_path = DeployGate::Xcode::Ios.project_root_path(work_dir) - workspaces = DeployGate::Xcode::Ios.find_workspaces(root_path) - ios(workspaces, options) + ios(work_dir, options) elsif DeployGate::Project.android?(work_dir) DeployGate::Android::GradleDeploy.new(work_dir, options).deploy else @@ -27,36 +25,26 @@ def run(args, options) end end - # @param [Array] workspaces + # @param [String] work_dir # @param [Hash] options # @return [void] - def ios(workspaces, options) + def ios(work_dir, options) DeployGate::Xcode::Export.check_local_certificates - build_configuration = options.configuration - target_scheme = options.scheme - xcodeproj_path = options.xcodeproj - analyze = DeployGate::Xcode::Analyze.new(workspaces, build_configuration, target_scheme, xcodeproj_path) - target_scheme = analyze.scheme + # Change the current working directory for fastlane else. + root_path = DeployGate::Xcode::Ios.project_root_path(work_dir) + Dir.chdir(root_path) - code_sign_identity = nil - project_profile_info = nil - allow_provisioning_updates = true - if analyze.code_sign_style == Xcode::Analyze::PROVISIONING_STYLE_MANUAL - code_sign_identity = analyze.code_sign_identity - project_profile_info = analyze.project_profile_info - end - - method = Xcode::Export.method(analyze.target_provisioning_profile) || select_method + analyze = DeployGate::Xcode::Analyze.new( + build_configuration: options.configuration, + target_scheme: options.scheme, + xcodeproj_path: options.xcodeproj, + workspace_path: options.workspace + ) ipa_path = DeployGate::Xcode::Ios.build( - analyze, - target_scheme, - code_sign_identity, - project_profile_info, - build_configuration, - method, - allow_provisioning_updates + ios_analyze: analyze, + allow_provisioning_updates: true ) Push.upload([ipa_path], options) end @@ -82,22 +70,6 @@ def print_no_install_xcode puts HighLine.color(I18n.t('commands.deploy.build.print_no_install_xcode'), HighLine::YELLOW) puts '' end - - def select_method - result = nil - cli = HighLine.new - cli.choose do |menu| - menu.prompt = I18n.t('commands.deploy.build.select_method.title') - menu.choice(DeployGate::Xcode::Export::AD_HOC) { - result = DeployGate::Xcode::Export::AD_HOC - } - menu.choice(DeployGate::Xcode::Export::ENTERPRISE) { - result = DeployGate::Xcode::Export::ENTERPRISE - } - end - - result - end end end end diff --git a/lib/deploygate/xcode/analyze.rb b/lib/deploygate/xcode/analyze.rb index 01d9e1d..d212504 100644 --- a/lib/deploygate/xcode/analyze.rb +++ b/lib/deploygate/xcode/analyze.rb @@ -1,150 +1,144 @@ module DeployGate module Xcode - class Analyze - attr_reader :workspaces, :build_workspace, :scheme, :xcodeproj + # - xcworkspace can have multiple projects (.xcodeproj) + # - xcodeproj can have multiple subprojects (.xcodeproj) + # + # This means we have to satisfy the following constraints. + # + # 1. Choose one xcworkspace if multiple workspaces are found. Some of + # 2. Choose a proper xcodeproj (root. not subproject) + class Analyze BASE_WORK_DIR_NAME = 'project.xcworkspace' DEFAULT_BUILD_CONFIGURATION = 'Release' PROVISIONING_STYLE_AUTOMATIC = 'Automatic' PROVISIONING_STYLE_MANUAL = 'Manual' + CODE_SIGN_STYLE_KEY = "CODE_SIGN_STYLE" + CODE_SIGN_IDENTITY_KEY = "CODE_SIGN_IDENTITY" + PRODUCT_BUNDLE_IDENTIFIER_KEY = "PRODUCT_BUNDLE_IDENTIFIER" + DEVELOPMENT_TEAM_KEY = "DEVELOPMENT_TEAM" + class BundleIdentifierDifferentError < DeployGate::RavenIgnoreException end - - # @param [Array] workspaces - # @param [String] build_configuration - # @param [String] target_scheme - # @return [DeployGate::Xcode::Analyze] - def initialize(workspaces, build_configuration = nil, target_scheme = nil, xcodeproj_path = nil) - @workspaces = workspaces - @build_configuration = build_configuration || DEFAULT_BUILD_CONFIGURATION - @build_workspace = find_build_workspace(workspaces) - @xcodeproj = xcodeproj_path.presence || find_xcodeproj(workspaces) - - config = FastlaneCore::Configuration.create(Gym::Options.available_options, { project: @xcodeproj }) - Gym.config = config - @project = FastlaneCore::Project.new(config) - - if @project.schemes.length > 1 && target_scheme && @project.schemes.include?(target_scheme) - @project.options[:scheme] = target_scheme - else - @project.select_scheme - end - @scheme = @project.options[:scheme] + class NotSupportExportMethodError < DeployGate::RavenIgnoreException end - def code_sign_style - style = nil - resolve_build_configuration do |build_configuration, target| - style = build_configuration.resolve_build_setting("CODE_SIGN_STYLE", target) + # @param [String, nil] build_configuration + # @param [String, nil] target_scheme + # @param [String, nil] xcodeproj_path + # @return [DeployGate::Xcode::Analyze] + def initialize( + xcodeproj_path: nil, + workspace_path: nil, + build_configuration: nil, + target_scheme: nil + ) + # Don't duplicate this options. This would be modified through fastlane's methods. + options = FastlaneCore::Configuration.create( + Gym::Options.available_options, + { + project: xcodeproj_path.presence, + workspace: workspace_path.presence, + configuration: build_configuration, + scheme: target_scheme + } + ) + + # This will detect projects, scheme, configuration and so on. This also throws an error if invalid. + # scheme, project/workspace, configuration, export_team_id would be resolved + Gym.config = options + + options[:export_team_id] = Gym.project.build_settings(key: DEVELOPMENT_TEAM_KEY, optional: false) + options[:codesigning_identity] = Gym.project.build_settings(key: CODE_SIGN_IDENTITY_KEY, optional: false) if Gym.project.build_settings(key: CODE_SIGN_STYLE_KEY) == PROVISIONING_STYLE_MANUAL + + # TODO: Need to support UDID additions for watchOS and App Extension + + if (profiles = Gym.config.values.dig(:export_options, :provisioningProfiles)).present? + target_provisioning_profile = ::DeployGate::Xcode::Export.provisioning_profile( + bundle_identifier, + uuid = nil, + options[:export_team_id], + profiles[bundle_identifier.to_sym] + ) + + options[:export_method] = ::DeployGate::Xcode::Export.method(target_provisioning_profile) || select_export_method end - - style + ensure + # Run value auto detection again after filling values + Gym.config = Gym.config end - def code_sign_identity - identity = nil - resolve_build_configuration do |build_configuration, target| - identity = build_configuration.resolve_build_setting("CODE_SIGN_IDENTITY", target) - end - - identity + # @return [String] + def scheme + fastlane_project.options[:scheme] end - # TODO: Need to support UDID additions for watchOS and App Extension # @return [String] - def target_bundle_identifier - bundle_identifier = nil - resolve_build_configuration do |build_configuration, target| - bundle_identifier = build_configuration.resolve_build_setting("PRODUCT_BUNDLE_IDENTIFIER", target) + def xcodeproj_path + if fastlane_project.workspace? + available_schemes = fastlane_project.workspace.schemes.reject { |_, v| v.include?("Pods/Pods.xcodeproj") } + available_schemes[self.scheme] + else + fastlane_project.project.path&.to_s end - - bundle_identifier end - def developer_team - team = nil - resolve_build_configuration do |build_configuration, target| - team = build_configuration.resolve_build_setting("DEVELOPMENT_TEAM", target) - end - - team + def build_configuration + Gym.detect_configuration_for_archive end - def project_profile_info - gym = Gym::CodeSigningMapping.new(project: @project) + def export_team_id + fastlane_project.options[:export_team_id] + end - { - provisioningProfiles: gym.detect_project_profile_mapping - } + def export_method + fastlane_project.options[:export_method] end - def target_provisioning_profile - gym = Gym::CodeSigningMapping.new(project: @project) - bundle_id = target_bundle_identifier + def bundle_identifier + Gym.project.build_settings(key: PRODUCT_BUNDLE_IDENTIFIER_KEY, optional: false) + end - Xcode::Export.provisioning_profile(bundle_id, nil, developer_team, gym.merge_profile_mapping[bundle_id.to_sym]) + # @return [Hash, FastlaneCore::Configuration] + def fastlane_config + Gym.config end private - def resolve_build_configuration(&block) - gym = Gym::CodeSigningMapping.new(project: @project) - specified_configuration = @build_configuration.presence || - gym.detect_configuration_for_archive - - Xcodeproj::Project.open(@xcodeproj).targets.each do |target| - target.build_configuration_list.build_configurations.each do |build_configuration| - # Used the following code as an example - # https://github.com/fastlane/fastlane/blob/2.148.1/gym/lib/gym/code_signing_mapping.rb#L138 - current = build_configuration.build_settings - next if gym.test_target?(current) - sdk_root = build_configuration.resolve_build_setting("SDKROOT", target) - next unless gym.same_platform?(sdk_root) - next unless specified_configuration == build_configuration.name - - # If SKIP_INSTALL is true, it is an app extension or watch app - next if current["SKIP_INSTALL"] - - block.call(build_configuration, target) - end + def select_export_method + result = nil + cli = HighLine.new + cli.choose do |menu| + menu.prompt = I18n.t('commands.deploy.build.select_method.title') + menu.choice(::DeployGate::Xcode::Export::AD_HOC) { + result = ::DeployGate::Xcode::Export::AD_HOC + } + menu.choice(DeployGate::Xcode::Export::ENTERPRISE) { + result = ::DeployGate::Xcode::Export::ENTERPRISE + } end - end - # @param [Array] workspaces - # @return [String] - def find_xcodeproj(workspaces) - return nil if workspaces.empty? + raise NotSupportExportMethodError, "#{result} is not supported" unless ::DeployGate::Xcode::Export::SUPPORT_EXPORT_METHOD.include?(result) - if workspaces.count == 1 - scheme_workspace = workspaces.first - else - scheme_workspace = nil - workspaces.each do |workspace| - if BASE_WORK_DIR_NAME == File.basename(workspace) - scheme_workspace = workspace - end - end - end + result + end - scheme_workspace != nil ? File.dirname(scheme_workspace) : nil + # @return [FastlaneCore::Project] + def fastlane_project + Gym.project end - # @param [Array] workspaces - # @return [String] - def find_build_workspace(workspaces) - return nil if workspaces.empty? - return workspaces.first if workspaces.count == 1 - - select = nil - workspaces.each do |workspace| - if BASE_WORK_DIR_NAME != File.basename(workspace) - select = workspace - end + # @return [Xcodeproj::Project] + def xcode_project + #noinspection RubyMismatchedReturnType + if fastlane_project.workspace? + Xcodeproj::Project.open(self.xcodeproj_path) + else + fastlane_project.project end - - select end end end diff --git a/lib/deploygate/xcode/ios.rb b/lib/deploygate/xcode/ios.rb index 988437e..dafe5b8 100644 --- a/lib/deploygate/xcode/ios.rb +++ b/lib/deploygate/xcode/ios.rb @@ -3,52 +3,22 @@ module Xcode module Ios WORK_DIR_EXTNAME = '.xcworkspace' PROJECT_DIR_EXTNAME = '.xcodeproj' - IGNORE_DIRS = [ '.git', 'Carthage' ] - - class NotSupportExportMethodError < DeployGate::RavenIgnoreException - end class << self - # @param [Analyze] ios_analyze - # @param [String] target_scheme - # @param [String] codesigning_identity - # @param [String] provisioning_profile_info - # @param [String] build_configuration - # @param [String] export_method + # @param [DeployGate::Xcode::Analyze] ios_analyze # @param [Boolean] allow_provisioning_updates # @return [String] - def build(ios_analyze, - target_scheme, - codesigning_identity, - provisioning_profile_info = nil, - build_configuration = nil, - export_method = DeployGate::Xcode::Export::AD_HOC, - allow_provisioning_updates = false) - raise NotSupportExportMethodError, 'Not support export' unless DeployGate::Xcode::Export::SUPPORT_EXPORT_METHOD.include?(export_method) - - values = { - export_method: export_method, - configuration: build_configuration || DeployGate::Xcode::Analyze::DEFAULT_BUILD_CONFIGURATION, - scheme: target_scheme - } - - if ios_analyze.build_workspace - values[:workspace] = ios_analyze.build_workspace - else - values[:project] = ios_analyze.xcodeproj - end - - values[:codesigning_identity] = codesigning_identity if codesigning_identity + def build( + ios_analyze:, + allow_provisioning_updates: true + ) if allow_provisioning_updates - values[:xcargs] = '-allowProvisioningUpdates' - values[:export_xcargs] = '-allowProvisioningUpdates' + Gym.config[:xcargs] = '-allowProvisioningUpdates' + Gym.config[:export_xcargs] = '-allowProvisioningUpdates' end - values[:export_options] = provisioning_profile_info if provisioning_profile_info - - v = FastlaneCore::Configuration.create(Gym::Options.available_options, values) begin - absolute_ipa_path = File.expand_path(Gym::Manager.new.work(v)) + absolute_ipa_path = File.expand_path(Gym::Manager.new.work(ios_analyze.fastlane_config)) rescue => e # TODO: build error handling use_xcode_path = `xcode-select -p` @@ -81,23 +51,6 @@ def ios_root?(base_path) false end - # @param [String] base_path - # @param [Boolean] current_only - # @return [Array] - def find_workspaces(base_path) - projects = [] - Find.find(base_path) do |path| - next if path == base_path - if File.extname(path) == WORK_DIR_EXTNAME - projects.push(path) - end - - Find.prune if FileTest.directory?(path) && IGNORE_DIRS.include?(File.basename(path)) - end - - projects - end - # @param [String] path # @return [String] def project_root_path(path) diff --git a/spec/deploygate/xcode/analyze_spec.rb b/spec/deploygate/xcode/analyze_spec.rb index 8981b26..5526230 100644 --- a/spec/deploygate/xcode/analyze_spec.rb +++ b/spec/deploygate/xcode/analyze_spec.rb @@ -1,67 +1,81 @@ describe DeployGate::Xcode::Analyze do describe '#new' do - subject { described_class.new(workspaces, build_configuration, target_scheme, xcodeproj) } + subject(:analyze) do + described_class.new( + xcodeproj_path: xcodeproj_path, + workspace_path: workspace_path, + build_configuration: build_configuration, + target_scheme: target_scheme + ) + end + let(:xcodeproj_path) { nil } + let(:workspace_path) { nil } let(:build_configuration) { nil } let(:target_scheme) { nil } - let(:xcodeproj) { nil } - describe 'detect scheme workspace and build workspace' do - before do - allow(FastlaneCore::Configuration).to receive(:create) - project = instance_double(FastlaneCore::Project) - allow(project).to receive(:select_scheme) - allow(project).to receive(:schemes).and_return([]) - allow(project).to receive(:options).and_return({}) - allow(FastlaneCore::Project).to receive(:new).and_return(project) - allow(Gym).to receive(:config=) - end + describe '#initialize' do + context 'if the project is the single xcodeproject' do + let(:expected_xcodeproj_path) { test_file_path("xcodeProjects", "Projects", "SingleProject", "SingleProject.xcodeproj") } - context 'exists single xcodeproj files' do - let(:workspaces) do - %w[ - /base_dir/Test/Test/Test.xcodeproj/project.xcworkspace - ] + around(:each) do |example| + Dir.chdir(test_file_path("xcodeProjects", "Projects", "SingleProject")) do + example.run + end end - context 'without scheme workspace arg' do - it 'build_workspace and xcodeproj is same' do - is_expected.to have_attributes( - build_workspace: '/base_dir/Test/Test/Test.xcodeproj/project.xcworkspace', - xcodeproj: '/base_dir/Test/Test/Test.xcodeproj' - ) - end + it 'can find a project and get attributes' do + analyze + + expect(Gym.project.project).not_to be_nil + expect(Gym.config[:workspace]).to be_nil + expect(analyze.xcodeproj_path).to eq(expected_xcodeproj_path) + expect(analyze.scheme).to eq("SingleProject") + expect(analyze.bundle_identifier).to eq("com.deploygate.example.SingleProject") end end - context 'exists multiple xcodeproj files' do - let(:workspaces) do - %w[ - /base_dir/Test/ALib/ALib.xcodeproj/project.xcworkspace - /base_dir/Test/Hoge/Hoge.xcodeproj/project.xcworkspace - /base_dir/Test/Test/Test.xcodeproj/project.xcworkspace - /base_dir/Test/Test.xcworkspace - /base_dir/Test/ZLib/ZLib.xcodeproj/project.xcworkspace - ] + context 'if the project is the single xcworkspace' do + let(:expected_xcodeproj_path) { test_file_path("xcodeProjects", "Workspaces", "Single", "SingleWorkspace", "SingleWorkspace.xcodeproj") } + + around(:each) do |example| + Dir.chdir(test_file_path("xcodeProjects", "Workspaces", "Single")) do + example.run + end + end + + it 'can find a project and get attributes' do + analyze + + expect(Gym.project.project).to be_nil + expect(Gym.project.workspace).not_to be_nil + expect(Gym.config[:workspace]).to eq("./SingleWorkspace.xcworkspace") + expect(analyze.xcodeproj_path).to eq(expected_xcodeproj_path) + expect(analyze.scheme).to eq("SingleWorkspace") + expect(analyze.bundle_identifier).to eq("com.deploygate.example.SingleWorkspace") end + end - context 'without scheme workspace arg' do - it 'scheme workspace is last workspace has project.xcworkspace' do - is_expected.to have_attributes( - build_workspace: '/base_dir/Test/Test.xcworkspace', - xcodeproj: '/base_dir/Test/ZLib/ZLib.xcodeproj' - ) + context 'if detection is nondeterministic' do + around(:each) do |example| + Dir.chdir(test_file_path("xcodeProjects")) do + example.run end end - context 'with scheme workspace arg' do - let(:xcodeproj) { './ZLib.xcodeproj' } + it 'cannot choose any project' do + expect { analyze }.to raise_error(FastlaneCore::Interface::FastlaneCrash) + end + + context 'if the project is in multi-xcodeproject' do + around(:each) do |example| + Dir.chdir(test_file_path("xcodeProjects", "Projects", "Multi")) do + example.run + end + end - it 'scheme workspace is last workspace has project.xcworkspace' do - is_expected.to have_attributes( - build_workspace: '/base_dir/Test/Test.xcworkspace', - xcodeproj: './ZLib.xcodeproj' - ) + it 'cannot choose any project' do + expect { analyze }.to raise_error(FastlaneCore::Interface::FastlaneCrash) end end end diff --git a/spec/deploygate/xcode/ios_spec.rb b/spec/deploygate/xcode/ios_spec.rb index 89b1f3e..4a1fc16 100644 --- a/spec/deploygate/xcode/ios_spec.rb +++ b/spec/deploygate/xcode/ios_spec.rb @@ -1,82 +1,79 @@ -describe DeployGate::Xcode::Ios do - before do - class ProjectMock - def schemes - [] - end - end - class AnalyzeMock - def build_workspace - '' - end - def xcodeproj - '' - end - end +class FakeGemManager + def initialize(ipa_path:) + @ipa_path = ipa_path + end + + def work(*) + @work = true + @ipa_path end + def has_called_work? + @work + end +end + +describe DeployGate::Xcode::Ios do + let(:xcodeproj_path) { test_file_path("xcodeProjects", "Projects", "SingleProject", "SingleProject.xcodeproj") } + let(:workspace_path) { test_file_path("xcodeProjects", "Workspaces", "Single", "SingleWorkspace.xcworkspace") } + describe "#build" do - it "should call Gym Manager" do - call_gym_manager = false - allow(FastlaneCore::Configuration).to receive(:create) {} - allow_any_instance_of(Gym::Manager).to receive(:work) { call_gym_manager = true } - allow(File).to receive(:exist?).and_return(true) - allow(File).to receive(:expand_path).and_return('path') - allow(FastlaneCore::Project).to receive(:new).and_return(ProjectMock.new) - - DeployGate::Xcode::Ios.build(AnalyzeMock.new, '', '') - expect(call_gym_manager).to be_truthy + let(:gem_manager) { FakeGemManager.new(ipa_path: test_file_path("xcodeProjects", "fake.ipa")) } + + before do + allow(Gym::Manager).to receive(:new).and_return(gem_manager) end - it "raise not support export" do - allow(FastlaneCore::Configuration).to receive(:create) {} - allow_any_instance_of(Gym::Manager).to receive(:work) {} - allow(File).to receive(:exist?).and_return(true) - allow(File).to receive(:expand_path).and_return('path') - allow(FastlaneCore::Project).to receive(:new).and_return(ProjectMock.new) + it "should call Gym Manager and allow provisioning updates without an option" do + DeployGate::Xcode::Ios.build( + ios_analyze: DeployGate::Xcode::Analyze.new( + xcodeproj_path: xcodeproj_path + ) + ) + + expect(gem_manager).to be_has_called_work + expect(Gym.config.values).to include( + xcargs: '-allowProvisioningUpdates', + export_xcargs: '-allowProvisioningUpdates' + ) + end - expect { - DeployGate::Xcode::Ios.build(AnalyzeMock.new, '', '', nil, '', 'not support export method') - }.to raise_error DeployGate::Xcode::Ios::NotSupportExportMethodError + it "should call Gym Manager and disallow provisioning updates if an option is provided" do + DeployGate::Xcode::Ios.build( + ios_analyze: DeployGate::Xcode::Analyze.new( + xcodeproj_path: xcodeproj_path + ), + allow_provisioning_updates: false + ) + + expect(gem_manager).to be_has_called_work + expect(Gym.config.values).not_to include( + xcargs: include('-allowProvisioningUpdates'), + export_xcargs: include('-allowProvisioningUpdates') + ) end end describe "#workspace?" do - it "pod workspace" do - allow(File).to receive(:extname).and_return('.xcworkspace') - - result = DeployGate::Xcode::Ios.workspace?('path') - expect(result).to be_truthy + it "returns true if it's a workspace file" do + expect(DeployGate::Xcode::Ios.workspace?(workspace_path)).to be_truthy end - it "xcode project" do - allow(File).to receive(:extname).and_return('.xcodeproj') - - result = DeployGate::Xcode::Ios.workspace?('path') - expect(result).to be_falsey + it "returns false if it's a xcode project file" do + expect(DeployGate::Xcode::Ios.workspace?(xcodeproj_path)).to be_falsey end end describe "#project?" do - it "pod workspace" do - allow(File).to receive(:extname).and_return('.xcworkspace') - - result = DeployGate::Xcode::Ios.project?('path') - expect(result).to be_falsey + it "returns false if it's a workspace file" do + expect(DeployGate::Xcode::Ios.project?(workspace_path)).to be_falsey end - it "xcode project" do - allow(File).to receive(:extname).and_return('.xcodeproj') - - result = DeployGate::Xcode::Ios.project?('path') - expect(result).to be_truthy + it "returns true if it's a xcode project file" do + expect(DeployGate::Xcode::Ios.project?(xcodeproj_path)).to be_truthy end end - describe "#find_workspaces" do - # TODO: add test - end - describe "#project_root_path" do let(:root_path) {'test'} it "when test/test.xcodeproj/project.xcworkspace" do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index df44c90..c2712fe 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -3,6 +3,8 @@ require "deploygate" +ENV["CI"] = "true" + RSpec.configure do |config| config.before :each do # config file mock @@ -13,6 +15,6 @@ API_ENDPOINT = "https://deploygate.com/api" SPEC_FILE_PATH = File.dirname(__FILE__) -def test_file_path - File.join(SPEC_FILE_PATH, 'test_files/DeployGateSample.apk') +def test_file_path(*paths) + File.join(SPEC_FILE_PATH, 'test_files', *paths) end diff --git a/spec/test_files/xcodeProjects/Projects/Multi/MultiProject/MultiProject.xcodeproj/project.pbxproj b/spec/test_files/xcodeProjects/Projects/Multi/MultiProject/MultiProject.xcodeproj/project.pbxproj new file mode 100644 index 0000000..31c3fd6 --- /dev/null +++ b/spec/test_files/xcodeProjects/Projects/Multi/MultiProject/MultiProject.xcodeproj/project.pbxproj @@ -0,0 +1,424 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 56; + objects = { + +/* Begin PBXBuildFile section */ + 08F9D5272B5A4332004E5C92 /* MultiProjectApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08F9D5262B5A4332004E5C92 /* MultiProjectApp.swift */; }; + 08F9D5292B5A4332004E5C92 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08F9D5282B5A4332004E5C92 /* ContentView.swift */; }; + 08F9D52B2B5A4333004E5C92 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 08F9D52A2B5A4333004E5C92 /* Assets.xcassets */; }; + 08F9D52F2B5A4333004E5C92 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 08F9D52E2B5A4333004E5C92 /* Preview Assets.xcassets */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 08F9D5542B5A439A004E5C92 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 08F9D5502B5A439A004E5C92 /* SubProject1.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 08F9D53E2B5A4399004E5C92; + remoteInfo = SubProject1; + }; + 08F9D56E2B5A43B8004E5C92 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 08F9D56A2B5A43B8004E5C92 /* SubProject2.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 08F9D5602B5A43B8004E5C92; + remoteInfo = SubProject2; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 08F9D5232B5A4332004E5C92 /* MultiProject.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MultiProject.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 08F9D5262B5A4332004E5C92 /* MultiProjectApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MultiProjectApp.swift; sourceTree = ""; }; + 08F9D5282B5A4332004E5C92 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; + 08F9D52A2B5A4333004E5C92 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 08F9D52C2B5A4333004E5C92 /* MultiProject.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = MultiProject.entitlements; sourceTree = ""; }; + 08F9D52E2B5A4333004E5C92 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + 08F9D5502B5A439A004E5C92 /* SubProject1.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SubProject1.xcodeproj; path = ../SubProject1/SubProject1.xcodeproj; sourceTree = ""; }; + 08F9D56A2B5A43B8004E5C92 /* SubProject2.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SubProject2.xcodeproj; path = ../SubProject2/SubProject2.xcodeproj; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 08F9D5202B5A4332004E5C92 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 08F9D51A2B5A4332004E5C92 = { + isa = PBXGroup; + children = ( + 08F9D56A2B5A43B8004E5C92 /* SubProject2.xcodeproj */, + 08F9D5502B5A439A004E5C92 /* SubProject1.xcodeproj */, + 08F9D5252B5A4332004E5C92 /* MultiProject */, + 08F9D5242B5A4332004E5C92 /* Products */, + ); + sourceTree = ""; + }; + 08F9D5242B5A4332004E5C92 /* Products */ = { + isa = PBXGroup; + children = ( + 08F9D5232B5A4332004E5C92 /* MultiProject.app */, + ); + name = Products; + sourceTree = ""; + }; + 08F9D5252B5A4332004E5C92 /* MultiProject */ = { + isa = PBXGroup; + children = ( + 08F9D5262B5A4332004E5C92 /* MultiProjectApp.swift */, + 08F9D5282B5A4332004E5C92 /* ContentView.swift */, + 08F9D52A2B5A4333004E5C92 /* Assets.xcassets */, + 08F9D52C2B5A4333004E5C92 /* MultiProject.entitlements */, + 08F9D52D2B5A4333004E5C92 /* Preview Content */, + ); + path = MultiProject; + sourceTree = ""; + }; + 08F9D52D2B5A4333004E5C92 /* Preview Content */ = { + isa = PBXGroup; + children = ( + 08F9D52E2B5A4333004E5C92 /* Preview Assets.xcassets */, + ); + path = "Preview Content"; + sourceTree = ""; + }; + 08F9D5512B5A439A004E5C92 /* Products */ = { + isa = PBXGroup; + children = ( + 08F9D5552B5A439A004E5C92 /* SubProject1.app */, + ); + name = Products; + sourceTree = ""; + }; + 08F9D56B2B5A43B8004E5C92 /* Products */ = { + isa = PBXGroup; + children = ( + 08F9D56F2B5A43B8004E5C92 /* SubProject2.framework */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 08F9D5222B5A4332004E5C92 /* MultiProject */ = { + isa = PBXNativeTarget; + buildConfigurationList = 08F9D5322B5A4333004E5C92 /* Build configuration list for PBXNativeTarget "MultiProject" */; + buildPhases = ( + 08F9D51F2B5A4332004E5C92 /* Sources */, + 08F9D5202B5A4332004E5C92 /* Frameworks */, + 08F9D5212B5A4332004E5C92 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = MultiProject; + productName = MultiProject; + productReference = 08F9D5232B5A4332004E5C92 /* MultiProject.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 08F9D51B2B5A4332004E5C92 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1520; + LastUpgradeCheck = 1520; + TargetAttributes = { + 08F9D5222B5A4332004E5C92 = { + CreatedOnToolsVersion = 15.2; + }; + }; + }; + buildConfigurationList = 08F9D51E2B5A4332004E5C92 /* Build configuration list for PBXProject "MultiProject" */; + compatibilityVersion = "Xcode 14.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 08F9D51A2B5A4332004E5C92; + productRefGroup = 08F9D5242B5A4332004E5C92 /* Products */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 08F9D5512B5A439A004E5C92 /* Products */; + ProjectRef = 08F9D5502B5A439A004E5C92 /* SubProject1.xcodeproj */; + }, + { + ProductGroup = 08F9D56B2B5A43B8004E5C92 /* Products */; + ProjectRef = 08F9D56A2B5A43B8004E5C92 /* SubProject2.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 08F9D5222B5A4332004E5C92 /* MultiProject */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 08F9D5552B5A439A004E5C92 /* SubProject1.app */ = { + isa = PBXReferenceProxy; + fileType = wrapper.application; + path = SubProject1.app; + remoteRef = 08F9D5542B5A439A004E5C92 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 08F9D56F2B5A43B8004E5C92 /* SubProject2.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = SubProject2.framework; + remoteRef = 08F9D56E2B5A43B8004E5C92 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 08F9D5212B5A4332004E5C92 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 08F9D52F2B5A4333004E5C92 /* Preview Assets.xcassets in Resources */, + 08F9D52B2B5A4333004E5C92 /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 08F9D51F2B5A4332004E5C92 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 08F9D5292B5A4332004E5C92 /* ContentView.swift in Sources */, + 08F9D5272B5A4332004E5C92 /* MultiProjectApp.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 08F9D5302B5A4333004E5C92 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 08F9D5312B5A4333004E5C92 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SWIFT_COMPILATION_MODE = wholemodule; + }; + name = Release; + }; + 08F9D5332B5A4333004E5C92 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = MultiProject/MultiProject.entitlements; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"MultiProject/Preview Content\""; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 17.2; + LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; + "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 14.2; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.deploygate.example.MultiProject; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = auto; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 08F9D5342B5A4333004E5C92 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = MultiProject/MultiProject.entitlements; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"MultiProject/Preview Content\""; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 17.2; + LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; + "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 14.2; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.deploygate.example.MultiProject; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = auto; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 08F9D51E2B5A4332004E5C92 /* Build configuration list for PBXProject "MultiProject" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 08F9D5302B5A4333004E5C92 /* Debug */, + 08F9D5312B5A4333004E5C92 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 08F9D5322B5A4333004E5C92 /* Build configuration list for PBXNativeTarget "MultiProject" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 08F9D5332B5A4333004E5C92 /* Debug */, + 08F9D5342B5A4333004E5C92 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 08F9D51B2B5A4332004E5C92 /* Project object */; +} diff --git a/spec/test_files/xcodeProjects/Projects/Multi/MultiProject/MultiProject.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/spec/test_files/xcodeProjects/Projects/Multi/MultiProject/MultiProject.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/spec/test_files/xcodeProjects/Projects/Multi/MultiProject/MultiProject.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/spec/test_files/xcodeProjects/Projects/Multi/MultiProject/MultiProject.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/spec/test_files/xcodeProjects/Projects/Multi/MultiProject/MultiProject.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/spec/test_files/xcodeProjects/Projects/Multi/MultiProject/MultiProject.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/spec/test_files/xcodeProjects/Projects/Multi/MultiProject/MultiProject.xcodeproj/project.xcworkspace/xcuserdata/jmatsu.xcuserdatad/UserInterfaceState.xcuserstate b/spec/test_files/xcodeProjects/Projects/Multi/MultiProject/MultiProject.xcodeproj/project.xcworkspace/xcuserdata/jmatsu.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..40bda6f Binary files /dev/null and b/spec/test_files/xcodeProjects/Projects/Multi/MultiProject/MultiProject.xcodeproj/project.xcworkspace/xcuserdata/jmatsu.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/spec/test_files/xcodeProjects/Projects/Multi/MultiProject/MultiProject.xcodeproj/xcuserdata/jmatsu.xcuserdatad/xcschemes/xcschememanagement.plist b/spec/test_files/xcodeProjects/Projects/Multi/MultiProject/MultiProject.xcodeproj/xcuserdata/jmatsu.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..34d77c4 --- /dev/null +++ b/spec/test_files/xcodeProjects/Projects/Multi/MultiProject/MultiProject.xcodeproj/xcuserdata/jmatsu.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + MultiProject.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/spec/test_files/xcodeProjects/Projects/Multi/MultiProject/MultiProject/Assets.xcassets/AccentColor.colorset/Contents.json b/spec/test_files/xcodeProjects/Projects/Multi/MultiProject/MultiProject/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/spec/test_files/xcodeProjects/Projects/Multi/MultiProject/MultiProject/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/spec/test_files/xcodeProjects/Projects/Multi/MultiProject/MultiProject/Assets.xcassets/AppIcon.appiconset/Contents.json b/spec/test_files/xcodeProjects/Projects/Multi/MultiProject/MultiProject/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..532cd72 --- /dev/null +++ b/spec/test_files/xcodeProjects/Projects/Multi/MultiProject/MultiProject/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,63 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "16x16" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "16x16" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "32x32" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "32x32" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "128x128" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "128x128" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "256x256" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "256x256" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "512x512" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "512x512" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/spec/test_files/xcodeProjects/Projects/Multi/MultiProject/MultiProject/Assets.xcassets/Contents.json b/spec/test_files/xcodeProjects/Projects/Multi/MultiProject/MultiProject/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/spec/test_files/xcodeProjects/Projects/Multi/MultiProject/MultiProject/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/spec/test_files/xcodeProjects/Projects/Multi/MultiProject/MultiProject/ContentView.swift b/spec/test_files/xcodeProjects/Projects/Multi/MultiProject/MultiProject/ContentView.swift new file mode 100644 index 0000000..98338d7 --- /dev/null +++ b/spec/test_files/xcodeProjects/Projects/Multi/MultiProject/MultiProject/ContentView.swift @@ -0,0 +1,24 @@ +// +// ContentView.swift +// MultiProject +// +// Created by Jumpei Matsuda on 2024/01/19. +// + +import SwiftUI + +struct ContentView: View { + var body: some View { + VStack { + Image(systemName: "globe") + .imageScale(.large) + .foregroundStyle(.tint) + Text("Hello, world!") + } + .padding() + } +} + +#Preview { + ContentView() +} diff --git a/spec/test_files/xcodeProjects/Projects/Multi/MultiProject/MultiProject/MultiProject.entitlements b/spec/test_files/xcodeProjects/Projects/Multi/MultiProject/MultiProject/MultiProject.entitlements new file mode 100644 index 0000000..f2ef3ae --- /dev/null +++ b/spec/test_files/xcodeProjects/Projects/Multi/MultiProject/MultiProject/MultiProject.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.files.user-selected.read-only + + + diff --git a/spec/test_files/xcodeProjects/Projects/Multi/MultiProject/MultiProject/MultiProjectApp.swift b/spec/test_files/xcodeProjects/Projects/Multi/MultiProject/MultiProject/MultiProjectApp.swift new file mode 100644 index 0000000..1749c1d --- /dev/null +++ b/spec/test_files/xcodeProjects/Projects/Multi/MultiProject/MultiProject/MultiProjectApp.swift @@ -0,0 +1,17 @@ +// +// MultiProjectApp.swift +// MultiProject +// +// Created by Jumpei Matsuda on 2024/01/19. +// + +import SwiftUI + +@main +struct MultiProjectApp: App { + var body: some Scene { + WindowGroup { + ContentView() + } + } +} diff --git a/spec/test_files/xcodeProjects/Projects/Multi/MultiProject/MultiProject/Preview Content/Preview Assets.xcassets/Contents.json b/spec/test_files/xcodeProjects/Projects/Multi/MultiProject/MultiProject/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/spec/test_files/xcodeProjects/Projects/Multi/MultiProject/MultiProject/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/spec/test_files/xcodeProjects/Projects/Multi/SubProject1/SubProject1.xcodeproj/project.pbxproj b/spec/test_files/xcodeProjects/Projects/Multi/SubProject1/SubProject1.xcodeproj/project.pbxproj new file mode 100644 index 0000000..f3110c6 --- /dev/null +++ b/spec/test_files/xcodeProjects/Projects/Multi/SubProject1/SubProject1.xcodeproj/project.pbxproj @@ -0,0 +1,360 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 56; + objects = { + +/* Begin PBXBuildFile section */ + 08F9D5422B5A4399004E5C92 /* SubProject1App.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08F9D5412B5A4399004E5C92 /* SubProject1App.swift */; }; + 08F9D5442B5A4399004E5C92 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08F9D5432B5A4399004E5C92 /* ContentView.swift */; }; + 08F9D5462B5A439A004E5C92 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 08F9D5452B5A439A004E5C92 /* Assets.xcassets */; }; + 08F9D54A2B5A439A004E5C92 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 08F9D5492B5A439A004E5C92 /* Preview Assets.xcassets */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 08F9D53E2B5A4399004E5C92 /* SubProject1.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SubProject1.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 08F9D5412B5A4399004E5C92 /* SubProject1App.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubProject1App.swift; sourceTree = ""; }; + 08F9D5432B5A4399004E5C92 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; + 08F9D5452B5A439A004E5C92 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 08F9D5472B5A439A004E5C92 /* SubProject1.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = SubProject1.entitlements; sourceTree = ""; }; + 08F9D5492B5A439A004E5C92 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 08F9D53B2B5A4399004E5C92 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 08F9D5352B5A4399004E5C92 = { + isa = PBXGroup; + children = ( + 08F9D5402B5A4399004E5C92 /* SubProject1 */, + 08F9D53F2B5A4399004E5C92 /* Products */, + ); + sourceTree = ""; + }; + 08F9D53F2B5A4399004E5C92 /* Products */ = { + isa = PBXGroup; + children = ( + 08F9D53E2B5A4399004E5C92 /* SubProject1.app */, + ); + name = Products; + sourceTree = ""; + }; + 08F9D5402B5A4399004E5C92 /* SubProject1 */ = { + isa = PBXGroup; + children = ( + 08F9D5412B5A4399004E5C92 /* SubProject1App.swift */, + 08F9D5432B5A4399004E5C92 /* ContentView.swift */, + 08F9D5452B5A439A004E5C92 /* Assets.xcassets */, + 08F9D5472B5A439A004E5C92 /* SubProject1.entitlements */, + 08F9D5482B5A439A004E5C92 /* Preview Content */, + ); + path = SubProject1; + sourceTree = ""; + }; + 08F9D5482B5A439A004E5C92 /* Preview Content */ = { + isa = PBXGroup; + children = ( + 08F9D5492B5A439A004E5C92 /* Preview Assets.xcassets */, + ); + path = "Preview Content"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 08F9D53D2B5A4399004E5C92 /* SubProject1 */ = { + isa = PBXNativeTarget; + buildConfigurationList = 08F9D54D2B5A439A004E5C92 /* Build configuration list for PBXNativeTarget "SubProject1" */; + buildPhases = ( + 08F9D53A2B5A4399004E5C92 /* Sources */, + 08F9D53B2B5A4399004E5C92 /* Frameworks */, + 08F9D53C2B5A4399004E5C92 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = SubProject1; + productName = SubProject1; + productReference = 08F9D53E2B5A4399004E5C92 /* SubProject1.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 08F9D5362B5A4399004E5C92 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1520; + LastUpgradeCheck = 1520; + TargetAttributes = { + 08F9D53D2B5A4399004E5C92 = { + CreatedOnToolsVersion = 15.2; + }; + }; + }; + buildConfigurationList = 08F9D5392B5A4399004E5C92 /* Build configuration list for PBXProject "SubProject1" */; + compatibilityVersion = "Xcode 14.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 08F9D5352B5A4399004E5C92; + productRefGroup = 08F9D53F2B5A4399004E5C92 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 08F9D53D2B5A4399004E5C92 /* SubProject1 */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 08F9D53C2B5A4399004E5C92 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 08F9D54A2B5A439A004E5C92 /* Preview Assets.xcassets in Resources */, + 08F9D5462B5A439A004E5C92 /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 08F9D53A2B5A4399004E5C92 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 08F9D5442B5A4399004E5C92 /* ContentView.swift in Sources */, + 08F9D5422B5A4399004E5C92 /* SubProject1App.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 08F9D54B2B5A439A004E5C92 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 08F9D54C2B5A439A004E5C92 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SWIFT_COMPILATION_MODE = wholemodule; + }; + name = Release; + }; + 08F9D54E2B5A439A004E5C92 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = SubProject1/SubProject1.entitlements; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"SubProject1/Preview Content\""; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 17.2; + LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; + "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 14.2; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.deploygate.example.SubProject1; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = auto; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 08F9D54F2B5A439A004E5C92 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = SubProject1/SubProject1.entitlements; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"SubProject1/Preview Content\""; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 17.2; + LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; + "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 14.2; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.deploygate.example.SubProject1; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = auto; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 08F9D5392B5A4399004E5C92 /* Build configuration list for PBXProject "SubProject1" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 08F9D54B2B5A439A004E5C92 /* Debug */, + 08F9D54C2B5A439A004E5C92 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 08F9D54D2B5A439A004E5C92 /* Build configuration list for PBXNativeTarget "SubProject1" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 08F9D54E2B5A439A004E5C92 /* Debug */, + 08F9D54F2B5A439A004E5C92 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 08F9D5362B5A4399004E5C92 /* Project object */; +} diff --git a/spec/test_files/xcodeProjects/Projects/Multi/SubProject1/SubProject1.xcodeproj/xcuserdata/jmatsu.xcuserdatad/xcschemes/xcschememanagement.plist b/spec/test_files/xcodeProjects/Projects/Multi/SubProject1/SubProject1.xcodeproj/xcuserdata/jmatsu.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..92a5dec --- /dev/null +++ b/spec/test_files/xcodeProjects/Projects/Multi/SubProject1/SubProject1.xcodeproj/xcuserdata/jmatsu.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + SubProject1.xcscheme_^#shared#^_ + + orderHint + 1 + + + + diff --git a/spec/test_files/xcodeProjects/Projects/Multi/SubProject1/SubProject1/Assets.xcassets/AccentColor.colorset/Contents.json b/spec/test_files/xcodeProjects/Projects/Multi/SubProject1/SubProject1/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/spec/test_files/xcodeProjects/Projects/Multi/SubProject1/SubProject1/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/spec/test_files/xcodeProjects/Projects/Multi/SubProject1/SubProject1/Assets.xcassets/AppIcon.appiconset/Contents.json b/spec/test_files/xcodeProjects/Projects/Multi/SubProject1/SubProject1/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..532cd72 --- /dev/null +++ b/spec/test_files/xcodeProjects/Projects/Multi/SubProject1/SubProject1/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,63 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "16x16" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "16x16" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "32x32" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "32x32" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "128x128" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "128x128" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "256x256" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "256x256" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "512x512" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "512x512" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/spec/test_files/xcodeProjects/Projects/Multi/SubProject1/SubProject1/Assets.xcassets/Contents.json b/spec/test_files/xcodeProjects/Projects/Multi/SubProject1/SubProject1/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/spec/test_files/xcodeProjects/Projects/Multi/SubProject1/SubProject1/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/spec/test_files/xcodeProjects/Projects/Multi/SubProject1/SubProject1/ContentView.swift b/spec/test_files/xcodeProjects/Projects/Multi/SubProject1/SubProject1/ContentView.swift new file mode 100644 index 0000000..1c7d944 --- /dev/null +++ b/spec/test_files/xcodeProjects/Projects/Multi/SubProject1/SubProject1/ContentView.swift @@ -0,0 +1,24 @@ +// +// ContentView.swift +// SubProject1 +// +// Created by Jumpei Matsuda on 2024/01/19. +// + +import SwiftUI + +struct ContentView: View { + var body: some View { + VStack { + Image(systemName: "globe") + .imageScale(.large) + .foregroundStyle(.tint) + Text("Hello, world!") + } + .padding() + } +} + +#Preview { + ContentView() +} diff --git a/spec/test_files/xcodeProjects/Projects/Multi/SubProject1/SubProject1/Preview Content/Preview Assets.xcassets/Contents.json b/spec/test_files/xcodeProjects/Projects/Multi/SubProject1/SubProject1/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/spec/test_files/xcodeProjects/Projects/Multi/SubProject1/SubProject1/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/spec/test_files/xcodeProjects/Projects/Multi/SubProject1/SubProject1/SubProject1.entitlements b/spec/test_files/xcodeProjects/Projects/Multi/SubProject1/SubProject1/SubProject1.entitlements new file mode 100644 index 0000000..f2ef3ae --- /dev/null +++ b/spec/test_files/xcodeProjects/Projects/Multi/SubProject1/SubProject1/SubProject1.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.files.user-selected.read-only + + + diff --git a/spec/test_files/xcodeProjects/Projects/Multi/SubProject1/SubProject1/SubProject1App.swift b/spec/test_files/xcodeProjects/Projects/Multi/SubProject1/SubProject1/SubProject1App.swift new file mode 100644 index 0000000..88cb9ee --- /dev/null +++ b/spec/test_files/xcodeProjects/Projects/Multi/SubProject1/SubProject1/SubProject1App.swift @@ -0,0 +1,17 @@ +// +// SubProject1App.swift +// SubProject1 +// +// Created by Jumpei Matsuda on 2024/01/19. +// + +import SwiftUI + +@main +struct SubProject1App: App { + var body: some Scene { + WindowGroup { + ContentView() + } + } +} diff --git a/spec/test_files/xcodeProjects/Projects/Multi/SubProject2/SubProject2.xcodeproj/project.pbxproj b/spec/test_files/xcodeProjects/Projects/Multi/SubProject2/SubProject2.xcodeproj/project.pbxproj new file mode 100644 index 0000000..054bb7e --- /dev/null +++ b/spec/test_files/xcodeProjects/Projects/Multi/SubProject2/SubProject2.xcodeproj/project.pbxproj @@ -0,0 +1,356 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 56; + objects = { + +/* Begin PBXBuildFile section */ + 08F9D5642B5A43B8004E5C92 /* SubProject2.h in Headers */ = {isa = PBXBuildFile; fileRef = 08F9D5632B5A43B8004E5C92 /* SubProject2.h */; settings = {ATTRIBUTES = (Public, ); }; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 08F9D5602B5A43B8004E5C92 /* SubProject2.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SubProject2.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 08F9D5632B5A43B8004E5C92 /* SubProject2.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SubProject2.h; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 08F9D55D2B5A43B8004E5C92 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 08F9D5562B5A43B8004E5C92 = { + isa = PBXGroup; + children = ( + 08F9D5622B5A43B8004E5C92 /* SubProject2 */, + 08F9D5612B5A43B8004E5C92 /* Products */, + ); + sourceTree = ""; + }; + 08F9D5612B5A43B8004E5C92 /* Products */ = { + isa = PBXGroup; + children = ( + 08F9D5602B5A43B8004E5C92 /* SubProject2.framework */, + ); + name = Products; + sourceTree = ""; + }; + 08F9D5622B5A43B8004E5C92 /* SubProject2 */ = { + isa = PBXGroup; + children = ( + 08F9D5632B5A43B8004E5C92 /* SubProject2.h */, + ); + path = SubProject2; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 08F9D55B2B5A43B8004E5C92 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 08F9D5642B5A43B8004E5C92 /* SubProject2.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 08F9D55F2B5A43B8004E5C92 /* SubProject2 */ = { + isa = PBXNativeTarget; + buildConfigurationList = 08F9D5672B5A43B8004E5C92 /* Build configuration list for PBXNativeTarget "SubProject2" */; + buildPhases = ( + 08F9D55B2B5A43B8004E5C92 /* Headers */, + 08F9D55C2B5A43B8004E5C92 /* Sources */, + 08F9D55D2B5A43B8004E5C92 /* Frameworks */, + 08F9D55E2B5A43B8004E5C92 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = SubProject2; + productName = SubProject2; + productReference = 08F9D5602B5A43B8004E5C92 /* SubProject2.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 08F9D5572B5A43B8004E5C92 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastUpgradeCheck = 1520; + TargetAttributes = { + 08F9D55F2B5A43B8004E5C92 = { + CreatedOnToolsVersion = 15.2; + }; + }; + }; + buildConfigurationList = 08F9D55A2B5A43B8004E5C92 /* Build configuration list for PBXProject "SubProject2" */; + compatibilityVersion = "Xcode 14.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 08F9D5562B5A43B8004E5C92; + productRefGroup = 08F9D5612B5A43B8004E5C92 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 08F9D55F2B5A43B8004E5C92 /* SubProject2 */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 08F9D55E2B5A43B8004E5C92 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 08F9D55C2B5A43B8004E5C92 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 08F9D5652B5A43B8004E5C92 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 08F9D5662B5A43B8004E5C92 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SWIFT_COMPILATION_MODE = wholemodule; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 08F9D5682B5A43B8004E5C92 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_MODULE_VERIFIER = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 17.2; + LD_RUNPATH_SEARCH_PATHS = ( + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = ( + "@executable_path/../Frameworks", + "@loader_path/Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 14.2; + MARKETING_VERSION = 1.0; + MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; + PRODUCT_BUNDLE_IDENTIFIER = com.deploygate.example.SubProject2; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = auto; + SKIP_INSTALL = YES; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 08F9D5692B5A43B8004E5C92 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_MODULE_VERIFIER = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 17.2; + LD_RUNPATH_SEARCH_PATHS = ( + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = ( + "@executable_path/../Frameworks", + "@loader_path/Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 14.2; + MARKETING_VERSION = 1.0; + MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; + PRODUCT_BUNDLE_IDENTIFIER = com.deploygate.example.SubProject2; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = auto; + SKIP_INSTALL = YES; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 08F9D55A2B5A43B8004E5C92 /* Build configuration list for PBXProject "SubProject2" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 08F9D5652B5A43B8004E5C92 /* Debug */, + 08F9D5662B5A43B8004E5C92 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 08F9D5672B5A43B8004E5C92 /* Build configuration list for PBXNativeTarget "SubProject2" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 08F9D5682B5A43B8004E5C92 /* Debug */, + 08F9D5692B5A43B8004E5C92 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 08F9D5572B5A43B8004E5C92 /* Project object */; +} diff --git a/spec/test_files/xcodeProjects/Projects/Multi/SubProject2/SubProject2.xcodeproj/xcuserdata/jmatsu.xcuserdatad/xcschemes/xcschememanagement.plist b/spec/test_files/xcodeProjects/Projects/Multi/SubProject2/SubProject2.xcodeproj/xcuserdata/jmatsu.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..132df7e --- /dev/null +++ b/spec/test_files/xcodeProjects/Projects/Multi/SubProject2/SubProject2.xcodeproj/xcuserdata/jmatsu.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + SubProject2.xcscheme_^#shared#^_ + + orderHint + 2 + + + + diff --git a/spec/test_files/xcodeProjects/Projects/Multi/SubProject2/SubProject2/SubProject2.h b/spec/test_files/xcodeProjects/Projects/Multi/SubProject2/SubProject2/SubProject2.h new file mode 100644 index 0000000..5f6d72c --- /dev/null +++ b/spec/test_files/xcodeProjects/Projects/Multi/SubProject2/SubProject2/SubProject2.h @@ -0,0 +1,18 @@ +// +// SubProject2.h +// SubProject2 +// +// Created by Jumpei Matsuda on 2024/01/19. +// + +#import + +//! Project version number for SubProject2. +FOUNDATION_EXPORT double SubProject2VersionNumber; + +//! Project version string for SubProject2. +FOUNDATION_EXPORT const unsigned char SubProject2VersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/spec/test_files/xcodeProjects/Projects/SingleProject b/spec/test_files/xcodeProjects/Projects/SingleProject new file mode 160000 index 0000000..f81ca14 --- /dev/null +++ b/spec/test_files/xcodeProjects/Projects/SingleProject @@ -0,0 +1 @@ +Subproject commit f81ca1451abd3215d9e38650ff46809a6aaf04bc diff --git a/spec/test_files/xcodeProjects/Workspaces/Single/SingleWorkspace b/spec/test_files/xcodeProjects/Workspaces/Single/SingleWorkspace new file mode 160000 index 0000000..5992482 --- /dev/null +++ b/spec/test_files/xcodeProjects/Workspaces/Single/SingleWorkspace @@ -0,0 +1 @@ +Subproject commit 59924827416ce732fa2c9bd1c5dc45b41e7ea028 diff --git a/spec/test_files/xcodeProjects/Workspaces/Single/SingleWorkspace.xcworkspace/contents.xcworkspacedata b/spec/test_files/xcodeProjects/Workspaces/Single/SingleWorkspace.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..cbe54cd --- /dev/null +++ b/spec/test_files/xcodeProjects/Workspaces/Single/SingleWorkspace.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/spec/test_files/xcodeProjects/Workspaces/Single/SingleWorkspace.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/spec/test_files/xcodeProjects/Workspaces/Single/SingleWorkspace.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/spec/test_files/xcodeProjects/Workspaces/Single/SingleWorkspace.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/spec/test_files/xcodeProjects/Workspaces/Single/SingleWorkspace.xcworkspace/xcuserdata/jmatsu.xcuserdatad/UserInterfaceState.xcuserstate b/spec/test_files/xcodeProjects/Workspaces/Single/SingleWorkspace.xcworkspace/xcuserdata/jmatsu.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..6df6612 Binary files /dev/null and b/spec/test_files/xcodeProjects/Workspaces/Single/SingleWorkspace.xcworkspace/xcuserdata/jmatsu.xcuserdatad/UserInterfaceState.xcuserstate differ