iosfluttermobilecocoapods

CocoaPods Error: PBXGroup attempted to initialize an object with unknown ISA PBXFileSystemSynchronizedRootGroup. When tried to add WidgetExtension


I'm encountering an error while trying to run pod install for my Flutter project. The error message indicates that there is an issue with the PBXGroup initialization related to an unknown ISA PBXFileSystemSynchronizedRootGroup. Here are the details:

What did I do? I attempted to run pod install in the ios directory of my Flutter project.

What did I expect to happen? I expected CocoaPods to install the necessary dependencies without any errors. What happened instead?

I received the following error: RuntimeError - PBXGroup attempted to initialize an object with unknown ISA PBXFileSystemSynchronizedRootGroup from attributes:

{"isa"=>"PBXFileSystemSynchronizedRootGroup", 
"exceptions"=>["E97F44AD2CB644CA004719F6"], 
"explicitFileTypes"=>{}, "explicitFolders"=>[],
"path"=>"charge_liveactivity", 
"sourceTree"=>"<group>"}

Stack Trace:

/opt/homebrew/Cellar/cocoapods/1.15.2_1/libexec/gems/xcodeproj-1.25.0/lib/xcodeproj/project/object.rb:359:in rescue in object_with_uuid'
/opt/homebrew/Cellar/cocoapods/1.15.2_1/libexec/gems/xcodeproj-1.25.0/lib/xcodeproj/project/object.rb:349:in object_with_uuid'
...

Environment: CocoaPods: 1.15.2 Ruby: ruby 3.3.5 Xcode: 16.0 macOS: 15.0.1

Podfile:

# Uncomment this line to define a global platform for your project
platform :ios, '14.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
  'Debug' => :debug,
  'Profile' => :release,
  'Release' => :release,
}

def flutter_root
  ...
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
  use_frameworks!
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

post_install do |installer|
  ...
end

Additional Information: I have tried updating CocoaPods and running pod repo update, but the issue persists. I also checked the project settings in Xcode, but I couldn't find any misconfigurations.


Solution

  • In Xcode, right-click on the folder, select Convert to Group from the context menu, and then it can be used normally.

    original answer - CocoaPods pod init Fails with “Unknown ISA PBXFileSystemSynchronizedRootGroup” Error on Xcode 16