cocoapods-catalyst-support: Runtime error when using use_modular_headers

Hi!

Thanks for writing those articles and making this repo. I’m trying to use this now, but I get this error:

#### Unsupported Libraries ####
["TwitterKit"]
[!] An error occurred while processing the post-install hook of the Podfile.

undefined method `filter' for "":String

remove_ios_only_frameworks.rb:230:in `other_linker_flags_dependencies'
remove_ios_only_frameworks.rb:341:in `block in configure_support_catalyst'
remove_ios_only_frameworks.rb:341:in `each'
remove_ios_only_frameworks.rb:341:in `reduce'
remove_ios_only_frameworks.rb:341:in `configure_support_catalyst'
/Users/zsombor/Development/[...]/Podfile:47:in `block (2 levels) in from_ruby'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/podfile.rb:179:in `post_install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:857:in `run_podfile_post_install_hook'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:845:in `block in run_podfile_post_install_hooks'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/user_interface.rb:145:in `message'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:844:in `run_podfile_post_install_hooks'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:325:in `block (2 levels) in create_and_save_projects'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/xcode/pods_project_generator/pods_project_writer.rb:61:in `write!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:324:in `block in create_and_save_projects'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:303:in `create_and_save_projects'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:295:in `generate_pods_project'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:174:in `integrate'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:162:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'

I added this at the end of my Podfile:

def debug
  true
end

def catalyst_unsupported_pods
  [
    'TwitterKit'
  ]
end

post_install do |installer|
  installer.configure_support_catalyst
end

and then run pod install

Thanks!

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 24 (14 by maintainers)

Most upvoted comments

The updated script works!

Well, at least it doesn’t give me an error. But I realized that I don’t understand some basic things about cocoapods and catalyst builds. I don’t have “use_frameworks!” in my Podfile, and maybe that’s the core issue here? Do I need to use frameworks? I guess because I’m not using frameworks, I don’t have OTHER_LDFLAGS in the xcconfig files of the pods. (or maybe it’s unrelated)

Anyway, I have a lot of reading to do I think. Thanks for all the help!