fastlane: Xcode 11 project with swift package dependency can not be built
New Issue Checklist
- Updated fastlane to the latest version
- I read the Contribution Guidelines
- I read docs.fastlane.tools
- I searched for existing GitHub issues
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 `<top (required)>'
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 `<main>'
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
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 21 (7 by maintainers)
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
Nailed it down, finally.
It appears, that it’s required to add
xcargsparameter togymwithCODE_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:
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
Releaseconfiguration forgymatm.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 beforegym.@hannesoid I also confirm that from v2.138 this is fixed.
@OlexandrStepanov I had to wrap it around
Dir.chdir("..") do / endto make it work, but other than that, works great. Thanks 😄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
FastfileorGymfile?I did make sure I’m up to the latest version of Fastlane.
@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.