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

Can't install pods #12136

Open
orre1996 opened this issue Nov 1, 2023 · 7 comments
Open

Can't install pods #12136

orre1996 opened this issue Nov 1, 2023 · 7 comments

Comments

@orre1996
Copy link

orre1996 commented Nov 1, 2023

Command

/opt/homebrew/Cellar/cocoapods/1.12.1/libexec/bin/pod deintegrate

Report

  • What did you do?

  • What did you expect to happen?

  • What happened instead?

Stack

   CocoaPods : 1.12.1
        Ruby : ruby 3.2.2 (2023-03-30 revision e51014f9c0) [arm64-darwin22]
    RubyGems : 3.4.10
        Host : macOS 13.5.1 (22G90)
       Xcode : 14.3.1 (14E300c)
         Git : git version 2.39.2 (Apple Git-143)
Ruby lib dir : /opt/homebrew/Cellar/ruby/3.2.2_1/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

# Uncomment the next line to define a global platform for your project
# platform :ios, '14.3'

target 'CoinCurrently' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for Cryptocurrently
	pod 'Firebase/Performance'
	pod 'Firebase/Auth'
	pod 'Firebase/RemoteConfig'
	pod 'Firebase/Firestore'
	pod 'Firebase/Messaging'
	pod 'FirebaseAppCheck'
	pod 'FirebaseFunctions'
	pod 'Firebase/Crashlytics'
	pod 'Firebase/Analytics'
	pod 'SDWebImageSwiftUI'
	pod 'SwiftSoup'

end

target 'CryptoWidgetExtension' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for Cryptocurrently
	pod 'Firebase/Auth'
	pod 'Firebase/RemoteConfig'
	pod 'Firebase/Messaging'

end

target 'CoinCurrentlyWatch' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for Cryptocurrently
	pod 'Firebase/Auth'
	pod 'Firebase/RemoteConfig'
	pod 'Firebase/Messaging'

end

post_install do |installer|
      installer.pods_project.targets.each do |target|
          target.build_configurations.each do |config|
          xcconfig_path = config.base_configuration_reference.real_path
          xcconfig = File.read(xcconfig_path)
          xcconfig_mod = xcconfig.gsub(/DT_TOOLCHAIN_DIR/, "TOOLCHAIN_DIR")
          File.open(xcconfig_path, "w") { |file| file << xcconfig_mod }
	if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f < 12.0
              config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
	  end
        end
     end
  end

Error

RuntimeError - `PBXProject` attempted to initialize an object with unknown ISA `XCLocalSwiftPackageReference` from attributes: `{"isa"=>"XCLocalSwiftPackageReference", "relativePath"=>"../../Downloads/YouTubePlayerKit-main"}`
If this ISA was generated by Xcode please file an issue: https://github.com/CocoaPods/Xcodeproj/issues/new
/opt/homebrew/Cellar/cocoapods/1.12.1/libexec/gems/xcodeproj-1.22.0/lib/xcodeproj/project/object.rb:359:in `rescue in object_with_uuid'
/opt/homebrew/Cellar/cocoapods/1.12.1/libexec/gems/xcodeproj-1.22.0/lib/xcodeproj/project/object.rb:349:in `object_with_uuid'
/opt/homebrew/Cellar/cocoapods/1.12.1/libexec/gems/xcodeproj-1.22.0/lib/xcodeproj/project/object.rb:300:in `block (2 levels) in configure_with_plist'
/opt/homebrew/Cellar/cocoapods/1.12.1/libexec/gems/xcodeproj-1.22.0/lib/xcodeproj/project/object.rb:299:in `each'
/opt/homebrew/Cellar/cocoapods/1.12.1/libexec/gems/xcodeproj-1.22.0/lib/xcodeproj/project/object.rb:299:in `block in configure_with_plist'
/opt/homebrew/Cellar/cocoapods/1.12.1/libexec/gems/xcodeproj-1.22.0/lib/xcodeproj/project/object.rb:296:in `each'
/opt/homebrew/Cellar/cocoapods/1.12.1/libexec/gems/xcodeproj-1.22.0/lib/xcodeproj/project/object.rb:296:in `configure_with_plist'
/opt/homebrew/Cellar/cocoapods/1.12.1/libexec/gems/xcodeproj-1.22.0/lib/xcodeproj/project.rb:272:in `new_from_plist'
/opt/homebrew/Cellar/cocoapods/1.12.1/libexec/gems/xcodeproj-1.22.0/lib/xcodeproj/project.rb:213:in `initialize_from_file'
/opt/homebrew/Cellar/cocoapods/1.12.1/libexec/gems/xcodeproj-1.22.0/lib/xcodeproj/project.rb:113:in `open'
/opt/homebrew/Cellar/cocoapods/1.12.1/libexec/gems/cocoapods-deintegrate-1.0.5/lib/cocoapods/command/deintegrate.rb:40:in `validate!'
/opt/homebrew/Cellar/cocoapods/1.12.1/libexec/gems/claide-1.1.0/lib/claide/command.rb:333:in `run'
/opt/homebrew/Cellar/cocoapods/1.12.1/libexec/gems/cocoapods-1.12.1/lib/cocoapods/command.rb:52:in `run'
/opt/homebrew/Cellar/cocoapods/1.12.1/libexec/gems/cocoapods-1.12.1/bin/pod:55:in `<top (required)>'
/opt/homebrew/Cellar/cocoapods/1.12.1/libexec/bin/pod:25:in `load'
/opt/homebrew/Cellar/cocoapods/1.12.1/libexec/bin/pod:25:in `<main>'
@noveleven
Copy link

gem update xcodeproj

@dnkoutso
Copy link
Contributor

dnkoutso commented Nov 2, 2023

Is this fixed then?

@ferhatlageyik
Copy link

gem install --user-install cocoapods
echo 'export PATH="$HOME/.gem/ruby/2.6.0/bin:$PATH"' >> ~/.bashrc
and restart terminal
source ~/.bashrc
then go to your project directory and write pod init.
this solution work for me.

@ana-bonnet
Copy link

Were you able to actually add any pod to your widget extension? Every time I added them I received the error below for almost all the files.

Module map file {file name}.modulemap not found

Even if I deintegrate, clean and install again the pods. I have even clean the project, delete derived data and restart the computer.

@orre1996
Copy link
Author

orre1996 commented Feb 5, 2024

@ana-bonnet Yeah I did. What does your pod file look like?

@ana-bonnet
Copy link

@orre1996 like bellow, but I tried adding every pod by target like you did too, but nothing the same error. And sometimes I even get and error saying that some pods importations should have <> instead of "".

# Uncomment the next line to define a global platform for your project
platform :ios, '15.0'

use_frameworks!

def firebase_pods
  #Firebase
  pod 'Firebase/Auth'
  pod 'Firebase/Crashlytics'
  pod 'Firebase/Analytics'
end

def shared_pods
  #Firebase
  pod 'Firebase/RemoteConfig'
  pod 'Firebase/DynamicLinks'
  pod 'Firebase/Performance'
  pod 'Firebase/Messaging'
  pod 'Firebase/InAppMessaging'
  pod 'GoogleSignIn'
  #Sockets
  pod 'Socket.IO-Client-Swift', '~>15.2.0'
  #Messenger
  pod 'Intercom'
  #Payments
  pod 'Stripe'
  pod 'StripePaymentSheet'
  #Animations
  pod 'lottie-ios', '~>3.5.0'
  #Search
  pod 'AlgoliaSearchClient'
  #SwiftUI Helpers
  pod 'SwiftUIIntrospect'
  # Staging helpers
  pod "TouchVisualizer", :configurations => ['Debug']
  pod 'netfox', :configurations => ['Debug']
end

target 'MyApp' do
  firebase_pods
  shared_pods
end

target 'MyTestApp' do
  firebase_pods
  shared_pods
end

target 'MyTestAppWidget-Extension' do
  firebase_pods
end

target 'MyAppWidget-Extension' do
  firebase_pods
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      xcconfig_path = config.base_configuration_reference.real_path
      xcconfig = File.read(xcconfig_path)
      xcconfig_mod = xcconfig.gsub(/DT_TOOLCHAIN_DIR/, "TOOLCHAIN_DIR")
      File.open(xcconfig_path, "w") { |file| file << xcconfig_mod }
      if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f < 12.0
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
      end
    end
  end
end

@pnogier
Copy link

pnogier commented May 23, 2024

Hi there, was someone able to fix this issue ? I am encountering this issue when trying to pod install with a newly added local swift dependency.

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

6 participants