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

Trouble using Crafter script #13

Closed
iCarambaa opened this issue Oct 19, 2014 · 6 comments
Closed

Trouble using Crafter script #13

iCarambaa opened this issue Oct 19, 2014 · 6 comments

Comments

@iCarambaa
Copy link

I tried using the script for Crafter, but it throws an error.

Svens-MacBook-Pro-3:ShakeHands sven$ crafter
/Library/Ruby/Gems/2.0.0/gems/crafter-0.1.39/lib/crafter.rb:57:in set_build_settings': wrong number of arguments (2 for 1) (ArgumentError) from /Users/sven/.crafter.rb:29:inblock in <top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/crafter-0.1.39/lib/crafter.rb:22:in instance_eval' from /Library/Ruby/Gems/2.0.0/gems/crafter-0.1.39/lib/crafter.rb:22:inconfigure'
from /Users/sven/.crafter.rb:4:in <top (required)>' from /Library/Ruby/Gems/2.0.0/gems/crafter-0.1.39/lib/crafter.rb:122:inload'
from /Library/Ruby/Gems/2.0.0/gems/crafter-0.1.39/lib/crafter.rb:122:in <module:Crafter>' from /Library/Ruby/Gems/2.0.0/gems/crafter-0.1.39/lib/crafter.rb:13:in<top (required)>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in require' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:inrequire'
from /Library/Ruby/Gems/2.0.0/gems/crafter-0.1.39/bin/crafter:13:in <top (required)>' from /usr/bin/crafter:23:inload'
from /usr/bin/crafter:23:in `

'

@iCarambaa
Copy link
Author

just noticed I had the wrong project open, this issue is meant for the script in KZBootstrap

@krzysztofzablocki
Copy link
Owner

can you show me your ~/crafter.rb contents?

@iCarambaa
Copy link
Author

# All your configuration should happen inside configure block
Crafter.configure do

    # This are projects wide instructions
    add_platform({:platform => :ios, :deployment => 7.0})
    add_git_ignore
    duplicate_configurations({:adhoc => :release})

    # set of options, warnings, static analyser and anything else normal xcode treats as build options
    set_options %w(
                   RUN_CLANG_STATIC_ANALYZER
                   GCC_TREAT_WARNINGS_AS_ERRORS
                   )

                   set_build_settings({
                                      :'WARNING_CFLAGS' => %w(
                                                              -Weverything
                                                              -Wno-objc-missing-property-synthesis
                                                              -Wno-unused-macros
                                                              -Wno-disabled-macro-expansion
                                                              -Wno-gnu-statement-expression
                                                              -Wno-language-extension-token
                                                              -Wno-overriding-method-mismatch
                                                              ).join(" ")
                                      })

                                      set_build_settings({
                                                         :'BUNDLE_ID_SUFFIX' => '.dev',
                                                         :'BUNDLE_DISPLAY_NAME_SUFFIX' => 'dev',
                                                         :'KZBEnv' => 'QA'
                                                         }, configuration: :debug)

                                                         set_build_settings({
                                                                            :'BUNDLE_ID_SUFFIX' => '.adhoc',
                                                                            :'BUNDLE_DISPLAY_NAME_SUFFIX' => 'adhoc',
                                                                            :'KZBEnv' => 'QA'
                                                                            }, configuration: :adhoc)

                                                                            set_build_settings({
                                                                                               :'BUNDLE_ID_SUFFIX' => '',
                                                                                               :'BUNDLE_DISPLAY_NAME_SUFFIX' => '',
                                                                                               :'KZBEnv' => 'PRODUCTION'
                                                                                               }, configuration: :release)

                                                                                               # CUSTOM: Modify plist file to include suffix and displayname
                                                                                               # CUSTOM: Add empty KZBootstrapUserMacros.h file to your project and .gitignore
                                                                                               # CUSTOM: Add KZBEnvironments.plist with list of your environments under KZBEnvironments key


end

@krzysztofzablocki
Copy link
Owner

can you try
gem uninstall crafter
gem install crafter
gem list crafter
you should have version 1.6, then try running crafter again

@iCarambaa
Copy link
Author

ok now it worked, not sure what was wrong. But i had to use sudo.

@krzysztofzablocki
Copy link
Owner

Glad to hear it works now 👍 I forgot to yank old gem version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants