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

Xcode 11 project with swift package dependency can not be built #15454

Closed
regetskcob opened this issue Oct 8, 2019 · 21 comments · Fixed by #15505
Closed

Xcode 11 project with swift package dependency can not be built #15454

regetskcob opened this issue Oct 8, 2019 · 21 comments · Fixed by #15505

Comments

@regetskcob
Copy link

@regetskcob regetskcob commented Oct 8, 2019

New Issue Checklist

Issue Description

We added a swift package dependency to our Xcode 11 project. Since then the project can not be built anymore. before adding the swift package Xcode 11 built without errors.

Do we have to pass the credentials to reach the swift packages repository?

Command executed

xcodebuild -showBuildSettings -scheme AdHoc -project ./WinWorker.xcodeproj -configuration Release

Complete output when running fastlane, including the stack trace and command used
10:42:45 +--------------------+-------------------------------------------------------------------------------------------------------------------+
10:42:45 |                                                              Lane Context                                                              |
10:42:45 +--------------------+-------------------------------------------------------------------------------------------------------------------+
10:42:45 | DEFAULT_PLATFORM   | ios                                                                                                               |
10:42:45 | PLATFORM_NAME      | ios                                                                                                               |
10:42:45 | LANE_NAME          | ios adhoc                                                                                                         |
10:42:45 | SIGH_PROFILE_PATH  | /Users/********-ios/Library/MobileDevice/Provisioning Profiles/de.WinWorker.iWinWorker-AdHoc.mobileprovision     |
10:42:45 | SIGH_PROFILE_PATHS | ["/Users/********-ios/Library/MobileDevice/Provisioning Profiles/de.WinWorker.iWinWorker-AdHoc.mobileprovision"] |
10:42:45 | SIGH_PROFILE_TYPE  | ad-hoc                                                                                                            |
10:42:45 +--------------------+-------------------------------------------------------------------------------------------------------------------+
10:42:45 [10:42:45]: [Xcodeproj] Unknown object version.
10:42:45 
10:42:45 +------+---------------------------------------------------------------+-------------+
10:42:45 |                                  fastlane summary                                  |
10:42:45 +------+---------------------------------------------------------------+-------------+
10:42:45 | Step | Action                                                        | Time (in s) |
10:42:45 +------+---------------------------------------------------------------+-------------+
10:42:45 | 1    | update_fastlane                                               | 5           |
10:42:45 | 2    | Verifying fastlane version                                    | 0           |
10:42:45 | 3    | default_platform                                              | 0           |
10:42:45 | 4    | clear_derived_data                                            | 0           |
10:42:45 | 5    | unlock_keychain                                               | 0           |
10:42:45 | 6    | sigh                                                          | 4           |
10:42:45 | 💥   | gym                                                           | 10          |
10:42:45 | 💥   | /Users/********-ios/sandbox/Jenkins/workspace/WinWorker-deve | 0           |
10:42:45 +------+---------------------------------------------------------------+-------------+
10:42:45 
10:42:45 [10:42:45]: fastlane finished with errors
10:42:45 
10:42:45 Looking for related GitHub issues on fastlane/fastlane...
10:42:45 
10:42:46 ➡�?  Xcode 11 project with swift package dependency can not be built
10:42:46     https://github.com/fastlane/fastlane/issues/15454 [open] 0 💬
10:42:46     10 minutes ago
10:42:46 
10:42:46 ➡�?  'EXPermissions/EXUserNotificationRequester.h' file not found
10:42:46     https://github.com/fastlane/fastlane/issues/14906 [closed] 7 💬
10:42:46     19 Aug 2019
10:42:46 
10:42:46 ➡�?  Error When Building App: no such file or directory: 'pie'
10:42:46     https://github.com/fastlane/fastlane/issues/14356 [closed] 5 💬
10:42:46     19 May 2019
10:42:46 
10:42:46 and 26 more at: https://github.com/fastlane/fastlane/search?q=%5BXcodeproj%5D%20Unknown%20object%20version.&type=Issues&utf8=✓
10:42:46 
10:42:46 🔗  You can ⌘ + double-click on links to open them directly in your browser.
10:42:47 [!] Xcodeproj doesn't know about the following attributes {"productRef"=>"97B70F35234C833F00288097"} for the 'PBXBuildFile' isa.
10:42:47 If this attribute was generated by Xcode please file an issue: https://github.com/CocoaPods/Xcodeproj/issues/new
10:42:47 [!] Xcodeproj doesn't know about the following attributes {"packageProductDependencies"=>["97B70F35234C833F00288097"]} for the 'PBXNativeTarget' isa.
10:42:47 If this attribute was generated by Xcode please file an issue: https://github.com/CocoaPods/Xcodeproj/issues/new
10:42:47 [!] Xcodeproj doesn't know about the following attributes {"packageProductDependencies"=>[]} for the 'PBXNativeTarget' isa.
10:42:47 If this attribute was generated by Xcode please file an issue: https://github.com/CocoaPods/Xcodeproj/issues/new
10:42:47 [!] Xcodeproj doesn't know about the following attributes {"packageProductDependencies"=>[]} for the 'PBXNativeTarget' isa.
10:42:47 If this attribute was generated by Xcode please file an issue: https://github.com/CocoaPods/Xcodeproj/issues/new
10:42:47 [!] Xcodeproj doesn't know about the following attributes {"packageProductDependencies"=>[]} for the 'PBXNativeTarget' isa.
10:42:47 If this attribute was generated by Xcode please file an issue: https://github.com/CocoaPods/Xcodeproj/issues/new
10:42:47 [!] Xcodeproj doesn't know about the following attributes {"packageProductDependencies"=>[]} for the 'PBXNativeTarget' isa.
10:42:47 If this attribute was generated by Xcode please file an issue: https://github.com/CocoaPods/Xcodeproj/issues/new
10:42:47 [!] Xcodeproj doesn't know about the following attributes {"packageProductDependencies"=>[]} for the 'PBXNativeTarget' isa.
10:42:47 If this attribute was generated by Xcode please file an issue: https://github.com/CocoaPods/Xcodeproj/issues/new
10:42:47 [!] Xcodeproj doesn't know about the following attributes {"packageProductDependencies"=>[]} for the 'PBXNativeTarget' isa.
10:42:47 If this attribute was generated by Xcode please file an issue: https://github.com/CocoaPods/Xcodeproj/issues/new
10:42:47 [!] Xcodeproj doesn't know about the following attributes {"packageReferences"=>["97B70F34234C833F00288097"]} for the 'PBXProject' isa.
10:42:47 If this attribute was generated by Xcode please file an issue: https://github.com/CocoaPods/Xcodeproj/issues/new
10:42:47 [!] Xcodeproj doesn't know about the following attributes {"productRef"=>"97B70F35234C833F00288097"} for the 'PBXBuildFile' isa.
10:42:47 If this attribute was generated by Xcode please file an issue: https://github.com/CocoaPods/Xcodeproj/issues/new
10:42:47 [!] Xcodeproj doesn't know about the following attributes {"packageProductDependencies"=>["97B70F35234C833F00288097"]} for the 'PBXNativeTarget' isa.
10:42:47 If this attribute was generated by Xcode please file an issue: https://github.com/CocoaPods/Xcodeproj/issues/new
10:42:47 [!] Xcodeproj doesn't know about the following attributes {"packageProductDependencies"=>[]} for the 'PBXNativeTarget' isa.
10:42:47 If this attribute was generated by Xcode please file an issue: https://github.com/CocoaPods/Xcodeproj/issues/new
10:42:47 [!] Xcodeproj doesn't know about the following attributes {"packageProductDependencies"=>[]} for the 'PBXNativeTarget' isa.
10:42:47 If this attribute was generated by Xcode please file an issue: https://github.com/CocoaPods/Xcodeproj/issues/new
10:42:47 [!] Xcodeproj doesn't know about the following attributes {"packageProductDependencies"=>[]} for the 'PBXNativeTarget' isa.
10:42:47 If this attribute was generated by Xcode please file an issue: https://github.com/CocoaPods/Xcodeproj/issues/new
10:42:47 [!] Xcodeproj doesn't know about the following attributes {"packageProductDependencies"=>[]} for the 'PBXNativeTarget' isa.
10:42:47 If this attribute was generated by Xcode please file an issue: https://github.com/CocoaPods/Xcodeproj/issues/new
10:42:47 [!] Xcodeproj doesn't know about the following attributes {"packageProductDependencies"=>[]} for the 'PBXNativeTarget' isa.
10:42:47 If this attribute was generated by Xcode please file an issue: https://github.com/CocoaPods/Xcodeproj/issues/new
10:42:47 [!] Xcodeproj doesn't know about the following attributes {"packageProductDependencies"=>[]} for the 'PBXNativeTarget' isa.
10:42:47 If this attribute was generated by Xcode please file an issue: https://github.com/CocoaPods/Xcodeproj/issues/new
10:42:47 [!] Xcodeproj doesn't know about the following attributes {"packageReferences"=>["97B70F34234C833F00288097"]} for the 'PBXProject' isa.
10:42:47 If this attribute was generated by Xcode please file an issue: https://github.com/CocoaPods/Xcodeproj/issues/new
10:42:47 /Users/********-ios/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/xcodeproj-1.8.2/lib/xcodeproj/project.rb:227:in `initialize_from_file': [!] [Xcodeproj] Unknown object version. (RuntimeError)
10:42:47 	from /Users/********-ios/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/xcodeproj-1.8.2/lib/xcodeproj/project.rb:112:in `open'
10:42:47 	from /Users/********-ios/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.133.0/fastlane_core/lib/fastlane_core/project.rb:114:in `project'
10:42:47 	from /Users/********-ios/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.133.0/fastlane_core/lib/fastlane_core/project.rb:197:in `configurations'
10:42:47 	from /Users/********-ios/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.133.0/gym/lib/gym/detect_values.rb:128:in `detect_configuration'
10:42:47 	from /Users/********-ios/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.133.0/gym/lib/gym/detect_values.rb:34:in `set_additional_default_values'
10:42:47 	from /Users/********-ios/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.133.0/gym/lib/gym/module.rb:15:in `config='
10:42:47 	from /Users/********-ios/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.133.0/gym/lib/gym/manager.rb:8:in `work'
10:42:47 	from /Users/********-ios/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/actions/build_ios_app.rb:65:in `run'
10:42:47 	from /Users/********-ios/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/runner.rb:256:in `block (2 levels) in execute_action'
10:42:47 	from /Users/********-ios/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/actions/actions_helper.rb:50:in `execute_action'
10:42:47 	from /Users/********-ios/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/runner.rb:235:in `block in execute_action'
10:42:47 	from /Users/********-ios/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/runner.rb:227:in `chdir'
10:42:47 	from /Users/********-ios/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/runner.rb:227:in `execute_action'
10:42:47 	from /Users/********-ios/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
10:42:47 	from /Users/********-ios/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'
10:42:47 	from Fastfile:50:in `block (2 levels) in parsing_binding'
10:42:47 	from /Users/********-ios/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/lane.rb:33:in `call'
10:42:47 	from /Users/********-ios/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/lane.rb:33:in `call'
10:42:47 	from /Users/********-ios/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
10:42:47 	from /Users/********-ios/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/runner.rb:45:in `chdir'
10:42:47 	from /Users/********-ios/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/runner.rb:45:in `execute'
10:42:47 	from /Users/********-ios/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/lane_manager.rb:56:in `cruise_lane'
10:42:47 	from /Users/********-ios/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
10:42:47 	from /Users/********-ios/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/commands_generator.rb:108:in `block (2 levels) in run'
10:42:47 	from /Users/********-ios/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:in `call'
10:42:47 	from /Users/********-ios/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:in `call'
10:42:47 	from /Users/********-ios/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:in `run'
10:42:47 	from /Users/********-ios/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:in `run_active_command'
10:42:47 	from /Users/********-ios/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.133.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in `run!'
10:42:47 	from /Users/********-ios/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:in `run!'
10:42:47 	from /Users/********-ios/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/commands_generator.rb:349:in `run'
10:42:47 	from /Users/********-ios/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/commands_generator.rb:41:in `start'
10:42:47 	from /Users/********-ios/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/cli_tools_distributor.rb:119:in `take_off'
10:42:47 	from /Users/********-ios/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.133.0/bin/fastlane:23:in `'
10:42:47 	from /Users/********-ios/.fastlane/bin/bundle/bin/fastlane:22:in `load'
10:42:47 	from /Users/********-ios/.fastlane/bin/bundle/bin/fastlane:22:in `'
10:42:47 Build step 'Shell ausführen' marked build as failure
  

Environment

fastlane environment

Stack

Key Value
OS 10.14.6
Ruby 2.2.4
Bundler? false
Git git version 2.20.1 (Apple Git-117)
Installation Source ~/.fastlane/bin/bundle/bin/fastlane
Host Mac OS X 10.14.6 (18G95)
Ruby Lib Dir ~/.fastlane/bin/bundle/lib
OpenSSL Version OpenSSL 1.0.2g 1 Mar 2016
Is contained true
Is homebrew false
Is installed via Fabric.app false
Xcode Path /Applications/Xcode11.app/Contents/Developer/
Xcode Version 11.1

System Locale

Variable Value
LANG en_US.UTF-8
LC_ALL en_US.UTF-8
LANGUAGE en_US.UTF-8

fastlane files:

No Fastfile found

No Appfile found

fastlane gems

Gem Version Update-Status
fastlane 2.133.0 Up-To-Date

Loaded fastlane plugins:

No plugins Loaded

Loaded gems
Gem Version
CFPropertyList 2.3.5
addressable 2.5.1
atomos 0.1.3
babosa 1.0.2
bigdecimal 1.2.6
bundler 1.14.6
claide 1.0.2
colored 1.2
colored2 3.1.2
commander-fastlane 4.4.6
declarative 0.0.10
declarative-option 0.1.0
digest-crc 0.4.1
domain_name 0.5.20170404
dotenv 2.2.0
emoji_regex 1.0.1
excon 0.55.0
faraday 0.12.1
faraday-cookie_jar 0.0.6
faraday_middleware 0.11.0.1
fastimage 2.1.0
gh_inspector 1.1.3
google-api-client 0.23.9
google-cloud-core 1.3.0
google-cloud-env 1.0.5
google-cloud-storage 1.16.0
googleauth 0.6.7
highline 1.7.8
http-cookie 1.0.3
httpclient 2.8.3
hurley 0.2
io-console 0.4.3
json 1.8.1
jwt 2.1.0
jwt 1.5.6
libxml-ruby 3.0.0
little-plugger 1.1.4
logging 2.2.2
memoist 0.16.0
mime-types 3.1
mime-types-data 3.2016.0521
mini_magick 4.9.5
mini_magick 4.5.1
minitest 5.4.3
multi_json 1.12.1
multi_xml 0.6.0
multipart-post 2.0.0
nanaimo 0.2.6
naturally 2.2.0
nokogiri 1.5.6
os 0.9.6
plist 3.2.0
power_assert 0.2.2
psych 2.0.8
public_suffix 2.0.5
rake 10.4.2
rdoc 4.2.0
representable 3.0.4
retriable 2.1.0
rouge 2.0.7
rubygems-update 2.5.2
rubyzip 1.3.0
rubyzip 1.2.2
security 0.1.3
signet 0.11.0
simctl 1.6.5
slack-notifier 2.3.2
sqlite3 1.3.13
terminal-notifier 2.0.0
terminal-table 1.7.3
test-unit 3.0.8
tty-cursor 0.6.1
tty-screen 0.6.5
tty-spinner 0.9.0
uber 0.0.15
unf 0.1.4
unf_ext 0.0.7.4
unicode-display_width 1.1.3
word_wrap 1.0.0
xcodeproj 1.8.2
xcpretty 0.3.0
xcpretty-travis-formatter 0.0.4

generated on: 2019-10-08

@oleksandr-dziuban

This comment has been minimized.

Copy link

@oleksandr-dziuban oleksandr-dziuban commented Oct 8, 2019

@regetskcob Yep, Always get error when using xcode 11 image
Described here: #15396

@bguidolim

This comment has been minimized.

Copy link
Contributor

@bguidolim bguidolim commented Oct 10, 2019

@oleksandr-dziuban this error is not the as @regetskcob described. It's about SwiftPM.

Fastlane is trying to get the configurations with timeout, but SwiftPM still resolving the dependencies.

There is a new parameter for xcodebuild, which is -resolvePackageDependencies, an idea would be that Fastlane detects if Xcode verison >= 11 and run the command to resolve dependencies before continue.

@oleksandr-dziuban

This comment has been minimized.

Copy link

@oleksandr-dziuban oleksandr-dziuban commented Oct 10, 2019

@bguidolim Ok, thanks for clarification, just added link to my issue here, because my issue is not reviewed yet during a long period... so, it is big blocker for our project... cannot resolve it myself...

@regetskcob

This comment has been minimized.

Copy link
Author

@regetskcob regetskcob commented Oct 10, 2019

@bguidolim sounds like a valid solution. Hope there's someone abled to add this as a PR and it's released soon.

@bguidolim

This comment has been minimized.

Copy link
Contributor

@bguidolim bguidolim commented Oct 15, 2019

Hi @regetskcob 👋

I've made a change to fix this problem, it worked for me.
Could you please check if it works for you as well?

Here is the entry for the Gemfile:
gem 'fastlane', :git => 'https://github.com/bguidolim/fastlane', :branch => 'fix-swiftpm-resolve'

Thanks

@bdrelling

This comment has been minimized.

Copy link
Contributor

@bdrelling bdrelling commented Oct 16, 2019

@bguidolim thanks for addressing the issue and submitting a PR. I'm attempting to use it right now.

Shouldn't we be able to just pass -resolvePackageDependencies within the xcargs param of scan or gym?

@regetskcob

This comment has been minimized.

Copy link
Author

@regetskcob regetskcob commented Oct 16, 2019

@bguidolim I'm reluctant to use the experimental version in our production system. I can test it as soon as it's included in a future version of fastlane. :-)

@bguidolim

This comment has been minimized.

Copy link
Contributor

@bguidolim bguidolim commented Oct 16, 2019

@bdrelling not sure if it works because -showBuildSettings is called before everything else. I’ll try this when I have my mac with me.

@bguidolim

This comment has been minimized.

Copy link
Contributor

@bguidolim bguidolim commented Oct 16, 2019

@bdrelling using xcargs doesn't work

@OlexandrStepanov

This comment has been minimized.

Copy link

@OlexandrStepanov OlexandrStepanov commented Oct 17, 2019

Hello @bguidolim ,

I'm experiencing issues with archiving the project with Swift packages.
I have tried your branch, and still have next errors:

error: Missing package product 'Alamofire', please fix package resolution errors before building (in target 'Sirius')

error: Missing package product 'KeychainAccess', please fix package resolution errors before building (in target 'Sirius')

error: Missing package product 'RxSwift', please fix package resolution errors before building (in target 'Sirius')

Literally for every package I have in the app.

Below is my lane script:

lane :build do |options|
  	# Set default build number for local builds
  	build_number = "1"

  	# Read in value in case the user has specified input params
  	if options[:build_number]
  		build_number = options[:build_number]
  	end

  	increment_build_number(
  		build_number: build_number,
  		xcodeproj: "./" + ENV["XCODE_PROJECT"]
  	)

    update_project_provisioning(
      xcodeproj: "./" + ENV["XCODE_PROJECT"],
      profile: File.expand_path("~/Library/MobileDevice/Provisioning\ Profiles/" + ENV["PROVISIONING_PROFILE_ID"] + ".mobileprovision"),
      target_filter: ENV["XCODE_TARGET"],
      build_configuration: ENV["XCODE_BUILD_CONFIGURATION"]
    )

  	# Build additional args to xcodebuild
  	args = {
  		scheme: ENV["XCODE_SCHEME"],
      configuration: ENV["XCODE_BUILD_CONFIGURATION"],
      export_method: ENV["XCODE_EXPORT_METHOD"],
  		clean: true,
      derived_data_path: "./fastlane/DerivedData",
  		output_directory: "./fastlane/dist/",
  		output_name: ENV["PRODUCT_NAME"] + ".ipa",
      include_symbols: true,
      include_bitcode: true,
      codesigning_identity: ENV["SIGNING_CERTIFICATE"],
      export_options: {
        compileBitcode: false,
        provisioningProfiles: {
          ENV["BUNDLE_ID"] => ENV["PROVISIONING_PROFILE_ID"]
        }
      }
  	}

  	args[:project] = "./" + ENV["XCODE_PROJECT"]

    begin
        gym(args)
    rescue => ex
        on_error(ex)
    end
    
  end

Could you, please, suggest what could be the reason.
Any help much appreciated.

@OlexandrStepanov

This comment has been minimized.

Copy link

@OlexandrStepanov OlexandrStepanov commented Oct 18, 2019

Nailed it down, finally.

It appears, that it's required to add xcargs parameter to gym with CODE_SIGN_STYLE=Manual DEVELOPMENT_TEAM={TEAM_ID}.

And another issue which I experienced: archive step was finishing with success, but export part was failing with error:

archive at path ... is malformed
** EXPORT FAILED **

It appeared, that the reason is I was using custom build configuration, while SPM doesn't work with them gracefully yet. It's a known issue. So you must use Release configuration for gym atm.

NOTE: I'm using official version of fastlane, not the one from @bguidolim's repository. The original problem of issue was resolved by running sh "xcodebuild -resolvePackageDependencies" just before gym.

@georgealegre

This comment has been minimized.

Copy link

@georgealegre georgealegre commented Oct 23, 2019

@OlexandrStepanov I had to wrap it around Dir.chdir("..") do / end to make it work, but other than that, works great. Thanks :D

@nick3389

This comment has been minimized.

Copy link

@nick3389 nick3389 commented Nov 19, 2019

Is there any update for this?

@hannesoid

This comment has been minimized.

Copy link
Contributor

@hannesoid hannesoid commented Nov 27, 2019

I'm getting

/Users/hannes/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/xcodeproj-1.8.2/lib/xcodeproj/project.rb:227:in `initialize_from_file': [!] [Xcodeproj] Unknown object version. (RuntimeError)

I think this can be resolved by updating the used xcodeproj version.

@hannesoid

This comment has been minimized.

Copy link
Contributor

@hannesoid hannesoid commented Nov 28, 2019

This fixed it for me #15728

@fastlane-bot

This comment has been minimized.

Copy link

@fastlane-bot fastlane-bot commented Dec 28, 2019

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest fastlane version and check if that solves the issue. Let us know if that works for you by adding a comment 👍

Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with fastlane and feel free to tackle this issue yourself 💪

@nick3389

This comment has been minimized.

Copy link

@nick3389 nick3389 commented Dec 30, 2019

@hannesoid I also confirm that from v2.138 this is fixed.

@BalazsSzamody

This comment has been minimized.

Copy link

@BalazsSzamody BalazsSzamody commented Jan 16, 2020

Hey, I am having a similar issue. I had to increase the initial timeout. (FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT=600)
Unfortunately the 3 additional retries doesn't help if the first attempt fails.
All consecutive attempts will fail because the Derived Data isn't empty any more.

There could be an alternative solution to change gym to run the following script without timeout:

xcodebuild -resolvePackageDependencies

before running:

xcodebuild -showBuildSettings -workspace SocialBase.xcworkspace -scheme SocialBase-Staging
@kamitchell

This comment has been minimized.

Copy link

@kamitchell kamitchell commented Jan 17, 2020

I'm having this problem too, and I've tried the workarounds I've found in these threads with no luck so far. Is there a solution to this problem, preferably with a definitive working chunk of code for the Fastfile or Gymfile?

I did make sure I'm up to the latest version of Fastlane.

@nicolas-miari

This comment has been minimized.

Copy link

@nicolas-miari nicolas-miari commented Jan 28, 2020

Well, this is weird. The problem was persisting with the lastest (2.140.0) version of Fastlane, but as soon as I introduced @bguidolim 's forked branch, it resolved. What gives??

@fastlane-bot

This comment has been minimized.

Copy link

@fastlane-bot fastlane-bot commented Jan 29, 2020

The pull request #15505 that closed this issue was merged and released as part of fastlane 2.141.0 🚀
Please let us know if the functionality works as expected as a reply here. If it does not, please open a new issue. Thanks!

@fbernutz fbernutz mentioned this issue Feb 6, 2020
1 of 2 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

You can’t perform that action at this time.