CocoaPods / Xcodeproj

Create and modify Xcode projects from Ruby.
http://rubygems.org/gems/xcodeproj
MIT License
2.35k stars 455 forks source link

pod install fails with Xcodeproj unknown attributes and FrozenStringError in Flutter iOS project #941

Open 0xDEVAN opened 3 months ago

0xDEVAN commented 3 months ago

Environment:

Issue Description: Encountered multiple errors while running pod install in the iOS directory of my Flutter project that integrates Firebase. I am using Visual Studio Code as my IDE.

Steps to Reproduce:

  1. Open terminal in Visual Studio Code.
  2. Navigate to the iOS directory of the project.
  3. Execute pod install --repo-update.

Expected Behavior: Pods should install without errors, updating the project dependencies accordingly.

Actual Behavior: Received errors related to unknown attributes in Xcodeproj and a FrozenError when CocoaPods attempted to report the error. The detailed error messages are:

Error Messages: [!] Xcodeproj doesn't know about the following attributes {"minimizedProjectReferenceProxies"=>"1"} for the 'PBXProject' isa. /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/user_interface/error_report.rb:34 `force_encoding': can't modify frozen String (FrozenError)

Attempts to Resolve:

Please advise on a resolution or workaround

khoinguyen commented 1 month ago

I got similar issue when using xcodeproj 1.25.0,

try to add following to your Gemfile

gem "xcodeproj", "1.24.0"

run bundle install then bundle exec pod install. This solve my issue