skip to Main Content

I add one signal to my flutter app like documentation but I got an error when I make pod install how to solve this

Downloading dependencies
Installing OneSignalXCFramework 5.2.7
Generating Pods project
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/user_interface/error_report.rb:34:in force_encoding': can't modify frozen String (FrozenError)
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/user_interface/error_report.rb:34:in report'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/command.rb:66:in report_error'
        from /Users/htutwinlatt/.gem/ruby/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:396:in handle_exception'
        from /Users/htutwinlatt/.gem/ruby/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:337:in rescue in run'
        from /Users/htutwinlatt/.gem/ruby/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:324:in run'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/command.rb:52:in run'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/bin/pod:55:in <top (required)>'
        from /usr/local/bin/pod:23:in load'
        from /usr/local/bin/pod:23:in <main>'
/Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.27.0/lib/xcodeproj/project.rb:85:in initialize': [Xcodeproj] Unable to find compatibility version string for object version 70. (ArgumentError)
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/project.rb:48:in initialize'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer/xcode/pods_project_generator/project_generator.rb:82:in new'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer/xcode/pods_project_generator/project_generator.rb:82:in create_project'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer/xcode/pods_project_generator/project_generator.rb:73:in generate!'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer/xcode/single_pods_project_generator.rb:16:in generate!'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:320:in block in create_and_save_projects'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/user_interface.rb:64:in section'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:315:in create_and_save_projects'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:307:in generate_pods_project'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:183:in integrate'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:170:in install!'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/command/install.rb:52:in run'
        from /Users/htutwinlatt/.gem/ruby/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:334:in run'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/command.rb:52:in run'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/bin/pod:55:in <top (required)>'
        from /usr/local/bin/pod:23:in load'
        from /usr/local/bin/pod:23:in <main>'`

How can I solve this problem?

pod --version
1.16.2

ruby 3.3.6 (2024-11-05 revision 75015d4c1f) [arm64-darwin24]

2

Answers


  1. I have done so many things I don’t remember how exactly I managed to fix this issue 30 mts ago.

    I got the exact same errors as you but i’m using react native.

    I downgraded cocoapods 1.16 to 1.13 because my Gemfile says "gem ‘cocoapods’, ‘>= 1.13’, ‘< 1.15’"
    Then, using ‘gem list’ I saw xcodeproj with multiple versions including 1.27 and I uninstalled it with gem uninstall xcodeproj -v 1.27.0 to use older ones.

    I ran ‘pod deintegrate’ and ‘pod install’ : I got a new error that I fixed and then it worked

    Login or Signup to reply.
  2. I have the exact issue as yours, I found an answer here that works for me.
    https://stackoverflow.com/a/79221315/15019598

    I hope it helps.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search