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

2 versions of xcodeproj exist and newer version is not being used by pod install #889

Open
emclab opened this issue Sep 1, 2022 · 2 comments

Comments

@emclab
Copy link

emclab commented Sep 1, 2022

pod install throws error on Xcode 14/MacOS 12.5/M1/cocoapods 1.11.3:

RuntimeError - [Xcodeproj] Unknown object version (56).
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/xcodeproj-1.21.0/lib/xcodeproj/project.rb:228:in `initialize_from_file'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/xcodeproj-1.21.0/lib/xcodeproj/project.rb:113:in `open'

Here the old version of xcodeproj 1.21.0 is being called. However gem list shows:

xcodeproj (1.22.0)

xcodeproj --version still returns 1.21.0 and which xcodeproj points to /opt/homebrew/bin/xcodeproj.

Here is the 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, '13.0'
install! 'cocoapods', :deterministic_uuids => false

target 'xyz_app6' do
  config = use_native_modules!

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

  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :hermes_enabled => flags[:hermes_enabled],
    :fabric_enabled => flags[:fabric_enabled],
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )

  target 'xyz_app6Tests' do
    inherit! :complete
    # Pods for testing
  end

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable the next line.
  #use_flipper!() #disabled by error in pod install

  post_install do |installer|
    react_native_post_install(installer)
    __apply_Xcode_12_5_M1_post_install_workaround(installer)
  end
end

Here is gem uninstall Xcodeproj --version 1.21.0:

gem uninstall xcodeproj --version 1.21.0
Gem 'xcodeproj' is not installed

Run gem cleanup xcodeproj multiple times without avail. How to make pod install using version xcodeproj 1.22.0 instead of old 1.21.0?

@kaporn1990
Copy link

Pod update

@paulosilva8
Copy link

I had this issue. Get rid of the old versions and make sure only version 1.22.0 is installed in the machine. Intel machines work fine with multiple versions, but M1 machines don't pick up the update for whatever reason

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

3 participants