CocoaPods / cocoapods-acknowledgements

CocoaPods plugin that generates a plist which includes the installation metadata
MIT License
111 stars 17 forks source link

importing the plugin fails with "NameError - uninitialized constant Class::UI" #44

Closed icanzilb closed 7 years ago

icanzilb commented 7 years ago

Adding the line plugin 'cocoapods-acknowledgements' to my Podfile makes pod install fail with the following output:

Analyzing dependencies
Fetching podspec for `EventBlankKit` from `.`
Downloading dependencies
Using AFDateHelper (4.2.2)
Using AcknowList (1.2.1)
Using AsyncSwift (2.0.1)
Using CWStatusBarNotification (2.3.5)
Using Curry (3.0.0)
Using DynamicColor (3.3)
Using EventBlankKit (0.1)
Using Kingfisher (3.10.3)
Using MAThemeKit (1.0)
Using MMMarkdown (0.5.5)
Using NSString+Color (1.1.4)
Using Reachability (3.2)
Using Realm (2.8.3)
Using RealmContent (0.1.0)
Using RealmSwift (2.8.3)
Using RelativeFormatter (0.8.3)
Using RxCocoa (3.5.0)
Using RxDataSources (1.0.4)
Using RxFeedback (0.2.0)
Using RxGesture (1.0.1)
Using RxRealm (0.6.0)
Using RxRealmDataSources (0.2.2)
Using RxSwift (3.5.0)
Using SwiftyJSON (3.1.4)
Using Then (2.1.0)
Using XLPagerTabStrip (7.0.0)
Generating Pods project
Integrating client project
Adding Acknowledgements

――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

### Command

/Users/marin/.rvm/gems/ruby-2.2.1/bin/pod install


### Report

* What did you do?

* What did you expect to happen?

* What happened instead?

### Stack

CocoaPods : 1.2.1 Ruby : ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-darwin14] RubyGems : 2.6.3 Host : Mac OS X 10.12.6 (16G16b) Xcode : 8.3.2 (8E2002) Git : git version 2.8.2 Ruby lib dir : /Users/marin/.rvm/rubies/ruby-2.2.1/lib Repositories : artsy - https://github.com/artsy/Specs.git @ fde089d2807d2335a98932a55623634ffe9c0e9e marin-specs - https://github.com/icanzilb/cocoapods-specs-private.git @ 901e75f512721a6d76d2c5ec3dab89ebdaadd2d0 master - https://github.com/CocoaPods/Specs.git @ 24f8a1c6b7b78311d7356f58f6a6d7e410b97b9b realm - git@github.com:realm/cocoapods-specs-private.git @ 4b8f6d2c188ee82851eac127091761c0fa7fd531


### Plugins

cocoapods-acknowledgements : 1.1.1 cocoapods-deintegrate : 1.0.1 cocoapods-playgrounds : 1.2.2 cocoapods-plugins : 1.0.0 cocoapods-search : 1.0.0 cocoapods-stats : 1.0.0 cocoapods-trunk : 1.2.0 cocoapods-try : 1.1.0


### Podfile

```ruby
source 'git@github.com:realm/cocoapods-specs-private.git'
source 'https://github.com/CocoaPods/Specs.git'

use_frameworks!

plugin 'cocoapods-acknowledgements'

pod 'EventBlankKit', path: '.'

target 'EventBlank2-iOS' do

    pod 'AsyncSwift'

    pod 'RxSwift'
    pod 'RxCocoa'
    pod 'RxFeedback'
    pod 'RxDataSources'
    pod 'RxGesture'
    pod 'RxRealm'
    pod 'RxRealmDataSources'

    pod 'RealmSwift'
    pod 'RealmContent'

    pod 'MAThemeKit'
    pod 'DynamicColor'

    pod 'AcknowList'

    pod 'CWStatusBarNotification'

    pod 'Reachability'
    pod 'XLPagerTabStrip'

    pod 'Then'
    pod 'AFDateHelper'

    pod 'MMMarkdown'

    pod 'SwiftyJSON'

    pod 'RelativeFormatter'
    pod 'Kingfisher'

    pod 'Curry'
    pod 'Reachability'

end

post_install do |installer|
    require 'fileutils'

#    aggregate_target = installer.aggregate_targets.find { |t| t.label =~ /-iOS$/ }
#    support_files_dir = aggregate_target.support_files_dir
#    FileUtils.cp_r("#{support_files_dir}/#{aggregate_target.label}-acknowledgements.plist",
#                   'Pods-acknowledgements.plist',
#                   :remove_destination => true)
end

Error

NameError - uninitialized constant Class::UI
/Users/marin/.rvm/gems/ruby-2.2.1/gems/cocoapods-acknowledgements-1.1.1/lib/cocoapods_acknowledgements/plist_generator.rb:69:in `license_text'
/Users/marin/.rvm/gems/ruby-2.2.1/gems/cocoapods-acknowledgements-1.1.1/lib/cocoapods_acknowledgements/plist_generator.rb:21:in `block in generate'
/Users/marin/.rvm/gems/ruby-2.2.1/gems/cocoapods-acknowledgements-1.1.1/lib/cocoapods_acknowledgements/plist_generator.rb:17:in `each'
/Users/marin/.rvm/gems/ruby-2.2.1/gems/cocoapods-acknowledgements-1.1.1/lib/cocoapods_acknowledgements/plist_generator.rb:17:in `generate'
/Users/marin/.rvm/gems/ruby-2.2.1/gems/cocoapods-acknowledgements-1.1.1/lib/cocoapods_acknowledgements.rb:66:in `block (4 levels) in <module:CocoaPodsAcknowledgements>'
/Users/marin/.rvm/gems/ruby-2.2.1/gems/cocoapods-acknowledgements-1.1.1/lib/cocoapods_acknowledgements.rb:63:in `each'
/Users/marin/.rvm/gems/ruby-2.2.1/gems/cocoapods-acknowledgements-1.1.1/lib/cocoapods_acknowledgements.rb:63:in `block (3 levels) in <module:CocoaPodsAcknowledgements>'
/Users/marin/.rvm/gems/ruby-2.2.1/gems/cocoapods-acknowledgements-1.1.1/lib/cocoapods_acknowledgements.rb:60:in `each'
/Users/marin/.rvm/gems/ruby-2.2.1/gems/cocoapods-acknowledgements-1.1.1/lib/cocoapods_acknowledgements.rb:60:in `block (2 levels) in <module:CocoaPodsAcknowledgements>'
/Users/marin/.rvm/gems/ruby-2.2.1/gems/cocoapods-1.2.1/lib/cocoapods/user_interface.rb:64:in `section'
/Users/marin/.rvm/gems/ruby-2.2.1/gems/cocoapods-acknowledgements-1.1.1/lib/cocoapods_acknowledgements.rb:52:in `block in <module:CocoaPodsAcknowledgements>'
/Users/marin/.rvm/gems/ruby-2.2.1/gems/cocoapods-1.2.1/lib/cocoapods/hooks_manager.rb:109:in `call'
/Users/marin/.rvm/gems/ruby-2.2.1/gems/cocoapods-1.2.1/lib/cocoapods/hooks_manager.rb:109:in `block (3 levels) in run'
/Users/marin/.rvm/gems/ruby-2.2.1/gems/cocoapods-1.2.1/lib/cocoapods/user_interface.rb:142:in `message'
/Users/marin/.rvm/gems/ruby-2.2.1/gems/cocoapods-1.2.1/lib/cocoapods/hooks_manager.rb:103:in `block (2 levels) in run'
/Users/marin/.rvm/gems/ruby-2.2.1/gems/cocoapods-1.2.1/lib/cocoapods/hooks_manager.rb:101:in `each'
/Users/marin/.rvm/gems/ruby-2.2.1/gems/cocoapods-1.2.1/lib/cocoapods/hooks_manager.rb:101:in `block in run'
/Users/marin/.rvm/gems/ruby-2.2.1/gems/cocoapods-1.2.1/lib/cocoapods/user_interface.rb:142:in `message'
/Users/marin/.rvm/gems/ruby-2.2.1/gems/cocoapods-1.2.1/lib/cocoapods/hooks_manager.rb:100:in `run'
/Users/marin/.rvm/gems/ruby-2.2.1/gems/cocoapods-1.2.1/lib/cocoapods/installer.rb:495:in `run_plugins_post_install_hooks'
/Users/marin/.rvm/gems/ruby-2.2.1/gems/cocoapods-1.2.1/lib/cocoapods/installer.rb:474:in `perform_post_install_actions'
/Users/marin/.rvm/gems/ruby-2.2.1/gems/cocoapods-1.2.1/lib/cocoapods/installer.rb:121:in `install!'
/Users/marin/.rvm/gems/ruby-2.2.1/gems/cocoapods-1.2.1/lib/cocoapods/command/install.rb:41:in `run'
/Users/marin/.rvm/gems/ruby-2.2.1/gems/claide-1.0.1/lib/claide/command.rb:334:in `run'
/Users/marin/.rvm/gems/ruby-2.2.1/gems/cocoapods-1.2.1/lib/cocoapods/command.rb:52:in `run'
/Users/marin/.rvm/gems/ruby-2.2.1/gems/cocoapods-1.2.1/bin/pod:55:in `<top (required)>'
/Users/marin/.rvm/gems/ruby-2.2.1/bin/pod:22:in `load'
/Users/marin/.rvm/gems/ruby-2.2.1/bin/pod:22:in `<main>'
/Users/marin/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `eval'
/Users/marin/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `<main>'

――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

[!] Oh no, an error occurred.

Search for existing GitHub issues similar to yours: https://github.com/CocoaPods/CocoaPods/search?q=uninitialized+constant+Class%3A%3AUI&type=Issues

If none exists, create a ticket, with the template displayed above, on: https://github.com/CocoaPods/CocoaPods/issues/new

Be sure to first read the contributing guide for details on how to properly submit a ticket: https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md

Don't forget to anonymize any private data!

Looking for related issues on cocoapods/cocoapods...

[!] Automatically assigning platform ios with version 9.2 on target EventBlank2-iOS because no platform was specified. Please specify a platform for this target in your Podfile. See https://guides.cocoapods.org/syntax/podfile.html#platform.

[!] Unable to read the license file /Users/marin/Desktop/Projects/swift/EventBlank-iOS/EventBlank/LICENSE for the spec EventBlankKit (0.1)

[!] Unable to read the license file /Users/marin/Desktop/Projects/swift/EventBlank-iOS/EventBlank/LICENSE for the spec EventBlankKit (0.1)

[!] The EventBlank2-iOS [Debug] target overrides the SWIFT_VERSION build setting defined in `Pods/Target Support Files/Pods-EventBlank2-iOS/Pods-EventBlank2-iOS.debug.xcconfig'. This can lead to problems with the CocoaPods installation

[!] The EventBlank2-iOS [Release] target overrides the SWIFT_VERSION build setting defined in `Pods/Target Support Files/Pods-EventBlank2-iOS/Pods-EventBlank2-iOS.release.xcconfig'. This can lead to problems with the CocoaPods installation

icanzilb commented 7 years ago

Interesting, using rvm switched from 2.2.1 to 2.3.1 and that worked fine. Leaving it here for others who might experience the same.