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

Add a podspec parameter to suppress all implicit linking #12380

Open
RadheSwil opened this issue May 13, 2024 · 1 comment
Open

Add a podspec parameter to suppress all implicit linking #12380

RadheSwil opened this issue May 13, 2024 · 1 comment

Comments

@RadheSwil
Copy link

ios % pod install

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

Command

/Users/swildev/.rvm/gems/ruby-3.2.2/bin/pod install

Report

  • What did you do?

  • What did you expect to happen?

  • What happened instead?

Stack

   CocoaPods : 1.15.2
        Ruby : ruby 3.2.2 (2023-03-30 revision e51014f9c0) [arm64-darwin22]
    RubyGems : 3.5.10
        Host : macOS 14.4.1 (23E224)
       Xcode : 15.3 (15E204a)
         Git : git version 2.39.3 (Apple Git-146)
Ruby lib dir : /Users/swildev/.rvm/rubies/ruby-3.2.2/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/

Plugins

cocoapods-deintegrate : 1.0.5
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.1
cocoapods-trunk       : 1.6.0
cocoapods-try         : 1.2.0

Podfile

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, min_ios_version_supported
prepare_react_native_project!
use_frameworks!

# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
#
# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
# ```js
# module.exports = {
#   dependencies: {
#     ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
# ```
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled

linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
  Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
  use_frameworks! :linkage => linkage.to_sym
end

target 'SwilBA' do
  config = use_native_modules!

  # Flags change depending on the env values.
  flags = get_default_flags()

  use_react_native!(
    :path => config[:reactNativePath],
    # Hermes is now enabled by default. Disable by setting this flag to false.
    # Upcoming versions of React Native may rely on get_default_flags(), but
    # we make it explicit here to aid in the React Native upgrade process.
    :hermes_enabled => flags[:hermes_enabled],
    :fabric_enabled => flags[:fabric_enabled],
    # Enables Flipper.
    #
    # Note that if you have use_frameworks! enabled, Flipper will not work and
    # you should disable the next line.
    :flipper_configuration => flipper_config,
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )
  

  target 'SwilBATests' do
    inherit! :complete
    # Pods for testing
  end
  post_install do |installer|
    installer.pods_project.build_configurations.each do |config|
      config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
    end
  end
  post_install do |installer|
    react_native_post_install(
      installer,
      # Set `mac_catalyst_enabled` to `true` in order to apply patches
      # necessary for Mac Catalyst builds
      :mac_catalyst_enabled => false
    )
    __apply_Xcode_12_5_M1_post_install_workaround(installer)
  end
end

Error

LoadError - cannot load such file -- cocoapods-core/podfile/dsl
<internal:/Users/swildev/.rvm/rubies/ruby-3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
<internal:/Users/swildev/.rvm/rubies/ruby-3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
/Users/swildev/Documents/GitHub/SwilBA/vendor/bundle/ruby/3.2.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/podfile.rb:1:in `<top (required)>'
<internal:/Users/swildev/.rvm/rubies/ruby-3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
<internal:/Users/swildev/.rvm/rubies/ruby-3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
/Users/swildev/Documents/GitHub/SwilBA/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.15.2/lib/cocoapods/config.rb:206:in `podfile'
/Users/swildev/Documents/GitHub/SwilBA/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.15.2/lib/cocoapods/command.rb:160:in `verify_podfile_exists!'
/Users/swildev/Documents/GitHub/SwilBA/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.15.2/lib/cocoapods/command/install.rb:46:in `run'
/Users/swildev/Documents/GitHub/SwilBA/vendor/bundle/ruby/3.2.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
/Users/swildev/Documents/GitHub/SwilBA/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.15.2/lib/cocoapods/command.rb:52:in `run'
/Users/swildev/Documents/GitHub/SwilBA/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.15.2/bin/pod:55:in `<top (required)>'
/Users/swildev/.rvm/gems/ruby-3.2.2/bin/pod:25:in `load'
/Users/swildev/.rvm/gems/ruby-3.2.2/bin/pod:25:in `<main>'
/Users/swildev/.rvm/gems/ruby-3.2.2/bin/ruby_executable_hooks:22:in `eval'
/Users/swildev/.rvm/gems/ruby-3.2.2/bin/ruby_executable_hooks:22:in `<main>'

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

[!] Oh no, an error occurred.

Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=cannot+load+such+file+--+cocoapods-core%2Fpodfile%2Fdsl&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...

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
@RadheSwil and others