strongself/Generamba

Generamba gen with Xcode 10

Sou1reaver opened this issue ยท 9 comments

When I use generamba gen, using Xcode 10.0 - the following error occurs (issue #220 not working for me):

/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.4.2/lib/xcodeproj/project/object.rb:321:in `configure_with_plist': [!] Xcodeproj doesn't know about the following attributes {"inputFileListPaths"=>[], "outputFileListPaths"=>[]} for the 'PBXShellScriptBuildPhase' isa. (RuntimeError)
If this attribute was generated by Xcode please file an issue: https://github.com/CocoaPods/Xcodeproj/issues/new
	from /Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.4.2/lib/xcodeproj/project.rb:261:in `new_from_plist'
	from /Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.4.2/lib/xcodeproj/project/object.rb:350:in `object_with_uuid'
	from /Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.4.2/lib/xcodeproj/project/object.rb:300:in `block (2 levels) in configure_with_plist'
	from /Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.4.2/lib/xcodeproj/project/object.rb:299:in `each'
	from /Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.4.2/lib/xcodeproj/project/object.rb:299:in `block in configure_with_plist'
	from /Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.4.2/lib/xcodeproj/project/object.rb:296:in `each'
	from /Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.4.2/lib/xcodeproj/project/object.rb:296:in `configure_with_plist'
	from /Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.4.2/lib/xcodeproj/project.rb:261:in `new_from_plist'
	from /Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.4.2/lib/xcodeproj/project/object.rb:350:in `object_with_uuid'
	from /Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.4.2/lib/xcodeproj/project/object.rb:300:in `block (2 levels) in configure_with_plist'
	from /Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.4.2/lib/xcodeproj/project/object.rb:299:in `each'
	from /Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.4.2/lib/xcodeproj/project/object.rb:299:in `block in configure_with_plist'
	from /Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.4.2/lib/xcodeproj/project/object.rb:296:in `each'
	from /Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.4.2/lib/xcodeproj/project/object.rb:296:in `configure_with_plist'
	from /Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.4.2/lib/xcodeproj/project.rb:261:in `new_from_plist'
	from /Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.4.2/lib/xcodeproj/project.rb:202:in `initialize_from_file'
	from /Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.4.2/lib/xcodeproj/project.rb:102:in `open'
	from /Library/Ruby/Gems/2.3.0/gems/generamba-1.4.1/lib/generamba/helpers/xcodeproj_helper.rb:9:in `obtain_project'
	from /Library/Ruby/Gems/2.3.0/gems/generamba-1.4.1/lib/generamba/cli/gen_command.rb:60:in `gen'
	from /Library/Ruby/Gems/2.3.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
	from /Library/Ruby/Gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
	from /Library/Ruby/Gems/2.3.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
	from /Library/Ruby/Gems/2.3.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
	from /Library/Ruby/Gems/2.3.0/gems/generamba-1.4.1/bin/generamba:5:in `<top (required)>'
	from /usr/local/bin/generamba:22:in `load'
	from /usr/local/bin/generamba:22:in `<main>'

#222 (comment)
should fix it, shouldn't it?

Also you could solve it, changing the project format to Xcode 3.2-compatible:
image

Changing project format to 3.2 and fork from #222 not work for me

Any chance to get fix of this in release? hard to use because this are lines appear over and over again in project file

Hi! It appears there hasn't been a new release, which uses the newer xcodeproj 1.6.0. Could you make a new release which includes the newer xcodeproj? Or are you not planning to release a newer version with #222 merged.

If you are using bundler, you can add the following line to your Gemfile:
gem 'generamba', github: 'strongself/Generamba', :branch => "develop"
And run bundle update, this will install the develop version with newer xcodeproj, which works with Xcode 10 project files.

@eelcokoelewijn Did it! But when try to execute generamba, I get the message:
-bash: generamba: command not found
How can I fix it?
Help please

@iolegs Hi, after updating the Gemfile, you need to run it with bundler to use the Gemfile. The full command would be bundle exec generamba gen .....
For more information on bundler check https://bundler.io

Clone the branch 'develop', cd to project path, run "rake install", it works with Xcode 10.2.1

Hi everyone! It looks like this issue was fixed by latest release 1.5.0, but not for all cases. Now gem dependency for xcodeproj is declared as

spec.add_runtime_dependency 'xcodeproj', '>= 1.5.0', '< 2.0.0'

But for correct work with Xcode 10 generated projects we need at least xcodeproj gem version 1.6.0, so if you already have locally installed gem xcodeproj versions between 1.5.0 and <1.6.0, you will got the same error as topic starter.

Everything we need is just change dependency declaration to

spec.add_runtime_dependency 'xcodeproj', '>= 1.6.0', '< 2.0.0'

I've just created pull request with this change #231