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

Rome crashes with cocoapods 1.5.2 #67

Open
jugutier opened this issue May 18, 2018 · 5 comments
Open

Rome crashes with cocoapods 1.5.2 #67

jugutier opened this issue May 18, 2018 · 5 comments

Comments

@jugutier
Copy link
Contributor

Report

  • What did you do?
    run pod install on an empty folder with just this Podfile
platform :ios, '8.0'

plugin 'cocoapods-rome'

target 'caesar' do
  pod 'Alamofire'
end

  • What did you expect to happen?

To get an output folder with the compiled Alamofire framework

  • What happened instead?

Got an error.

Command

/Users/julian/.rbenv/versions/2.0.0/bin/pod install

Stack

   CocoaPods : 1.5.2
        Ruby : ruby 2.0.0p647 (2015-08-18 revision 51631) [x86_64-darwin16.6.0]
    RubyGems : 2.0.14.1
        Host : Mac OS X 10.12.6 (16G1212)
       Xcode : 9.2 (9C40b)
         Git : git version 2.14.3 (Apple Git-98)
Ruby lib dir : /Users/julian/.rbenv/versions/2.0.0-p647/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 422a260e27e8636972adf4eeace58f53f26a031f

Plugins

cocoapods-deintegrate : 1.0.2
cocoapods-plugins     : 1.0.0
cocoapods-rome        : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.0.0
cocoapods-trunk       : 1.3.0
cocoapods-try         : 1.1.0

Podfile

platform :ios, '8.0'

plugin 'cocoapods-rome'

target 'caesar' do
  pod 'Alamofire'
end

Error

NoMethodError - undefined method `build_settings' for nil:NilClass
/Users/julian/.rbenv/versions/2.0.0-p647/lib/ruby/gems/2.0.0/gems/cocoapods-rome-1.0.0/lib/cocoapods-rome/post_install.rb:44:in `block in enable_debug_information'
/Users/julian/.rbenv/versions/2.0.0-p647/lib/ruby/gems/2.0.0/gems/cocoapods-rome-1.0.0/lib/cocoapods-rome/post_install.rb:42:in `each'
/Users/julian/.rbenv/versions/2.0.0-p647/lib/ruby/gems/2.0.0/gems/cocoapods-rome-1.0.0/lib/cocoapods-rome/post_install.rb:42:in `enable_debug_information'
/Users/julian/.rbenv/versions/2.0.0-p647/lib/ruby/gems/2.0.0/gems/cocoapods-rome-1.0.0/lib/cocoapods-rome/post_install.rb:73:in `block in <top (required)>'
/Users/julian/.rbenv/versions/2.0.0-p647/lib/ruby/gems/2.0.0/gems/cocoapods-1.5.2/lib/cocoapods/hooks_manager.rb:109:in `call'
/Users/julian/.rbenv/versions/2.0.0-p647/lib/ruby/gems/2.0.0/gems/cocoapods-1.5.2/lib/cocoapods/hooks_manager.rb:109:in `block (3 levels) in run'
/Users/julian/.rbenv/versions/2.0.0-p647/lib/ruby/gems/2.0.0/gems/cocoapods-1.5.2/lib/cocoapods/user_interface.rb:142:in `message'
/Users/julian/.rbenv/versions/2.0.0-p647/lib/ruby/gems/2.0.0/gems/cocoapods-1.5.2/lib/cocoapods/hooks_manager.rb:103:in `block (2 levels) in run'
/Users/julian/.rbenv/versions/2.0.0-p647/lib/ruby/gems/2.0.0/gems/cocoapods-1.5.2/lib/cocoapods/hooks_manager.rb:101:in `each'
/Users/julian/.rbenv/versions/2.0.0-p647/lib/ruby/gems/2.0.0/gems/cocoapods-1.5.2/lib/cocoapods/hooks_manager.rb:101:in `block in run'
/Users/julian/.rbenv/versions/2.0.0-p647/lib/ruby/gems/2.0.0/gems/cocoapods-1.5.2/lib/cocoapods/user_interface.rb:142:in `message'
/Users/julian/.rbenv/versions/2.0.0-p647/lib/ruby/gems/2.0.0/gems/cocoapods-1.5.2/lib/cocoapods/hooks_manager.rb:100:in `run'
/Users/julian/.rbenv/versions/2.0.0-p647/lib/ruby/gems/2.0.0/gems/cocoapods-1.5.2/lib/cocoapods/installer.rb:455:in `run_plugins_post_install_hooks'
/Users/julian/.rbenv/versions/2.0.0-p647/lib/ruby/gems/2.0.0/gems/cocoapods-1.5.2/lib/cocoapods/installer.rb:433:in `perform_post_install_actions'
/Users/julian/.rbenv/versions/2.0.0-p647/lib/ruby/gems/2.0.0/gems/cocoapods-1.5.2/lib/cocoapods/installer.rb:125:in `install!'
/Users/julian/.rbenv/versions/2.0.0-p647/lib/ruby/gems/2.0.0/gems/cocoapods-1.5.2/lib/cocoapods/command/install.rb:41:in `run'
/Users/julian/.rbenv/versions/2.0.0-p647/lib/ruby/gems/2.0.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/Users/julian/.rbenv/versions/2.0.0-p647/lib/ruby/gems/2.0.0/gems/cocoapods-1.5.2/lib/cocoapods/command.rb:52:in `run'
/Users/julian/.rbenv/versions/2.0.0-p647/lib/ruby/gems/2.0.0/gems/cocoapods-1.5.2/bin/pod:55:in `<top (required)>'
/Users/julian/.rbenv/versions/2.0.0/bin/pod:23:in `load'
/Users/julian/.rbenv/versions/2.0.0/bin/pod:23:in `<main>'
@UnsafePointer
Copy link
Contributor

Could be related to #63, you can try disabling dsym generation or using the plugin from master with the fix.

@jugutier
Copy link
Contributor Author

Hi @Ruenzuo Thanks for looking into this.

I had noticed that issue and got something working using a sample app.

Overall I guess the big question was if I could run rome with just a podfile even without an app that holds a real target by the name caesar (in this case) The code that used to have an error before #63 seemed to expect a real target which made me think this was not possible.

After a second attempt today I was able to build the framework with just a podfile that looks like this:

platform :ios, '8.0'

plugin 'cocoapods-rome', { :pre_compile => Proc.new { |installer|
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['SWIFT_VERSION'] = '4.0'
        end
    end

    installer.pods_project.save
},

    dsym: false,
    configuration: 'Release'
}

target 'caesar' do
  pod 'Alamofire'
end

Is this something that would be worth adding to the samples in the readme?

Would dsym work once the new release is out?

Could we have something that says in the readme that a real xcodeproject or target isn't a requirement to get the frameworks to build?

Thanks!

@UnsafePointer
Copy link
Contributor

@jugutier I tried to make this possible in CocoaPods/CocoaPods#7588 but as you can see in the reply the problem is related to CocoaPods disabling integration. Your approach makes a lot of sense, dSYM should work in that case (you can try it now by using master in your Gemfile).

Feel free to send a PR adding this information to the README, I think it would be useful for some. The first time I tried Rome I also tried it without an Xcode project.

@jugutier
Copy link
Contributor Author

agreed @Ruenzuo, readme enhancements now added in #69

@jugutier
Copy link
Contributor Author

also it seems like this issue would be resolved with the latest in master, but I will close this issue when a new version of rome is released.

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