繁体   English   中英

Pod 初始化和 Pod 安装失败 - iOS Xcode beta 14.0

[英]Pod init & Pod install Failure - iOS Xcode beta 14.0

我在尝试执行 pod init 或 pod install 时遇到问题,出现以下错误。 使用 Xcode 14 测试版和操作系统版本 12.4。 由于 Xcode 和操作系统更新后出现问题,

pod install

Ignoring ffi-1.15.5 because its extensions are not built. Try: gem pristine ffi --version 1.15.5
Ignoring executable-hooks-1.6.1 because its extensions are not built. Try: gem pristine executable-hooks --version 1.6.1
Ignoring gem-wrappers-1.4.0 because its extensions are not built. Try: gem pristine gem-wrappers --version 1.4.0
Analyzing dependencies

[!] Smart quotes were detected and ignored in your Podfile. To avoid issues in the future, you should not use TextEdit for editing it. If you are not using TextEdit, you should turn off smart quotes in your editor of choice.
/usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/user_interface/error_report.rb:34:in `force_encoding': can't modify frozen String (FrozenError)
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/user_interface/error_report.rb:34:in `report'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:66:in `report_error'
    from /Users/azeemazeez/.rvm/rubies/ruby-2.7.2/lib/ruby/gems/2.7.0/gems/claide-1.1.0/lib/claide/command.rb:396:in `handle_exception'
    from /Users/azeemazeez/.rvm/rubies/ruby-2.7.2/lib/ruby/gems/2.7.0/gems/claide-1.1.0/lib/claide/command.rb:337:in `rescue in run'
    from /Users/azeemazeez/.rvm/rubies/ruby-2.7.2/lib/ruby/gems/2.7.0/gems/claide-1.1.0/lib/claide/command.rb:324:in `run'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/bin/pod:23:in `load'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/bin/pod:23:in `<main>'
/Users/azeemazeez/.rvm/rubies/ruby-2.7.2/lib/ruby/gems/2.7.0/gems/xcodeproj-1.21.0/lib/xcodeproj/project.rb:228:in `initialize_from_file': [Xcodeproj] Unknown object version (56). (RuntimeError)
    from /Users/azeemazeez/.rvm/rubies/ruby-2.7.2/lib/ruby/gems/2.7.0/gems/xcodeproj-1.21.0/lib/xcodeproj/project.rb:113:in `open'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:1190:in `block (2 levels) in inspect_targets_to_integrate'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:1189:in `each'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:1189:in `block in inspect_targets_to_integrate'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in `section'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:1184:in `inspect_targets_to_integrate'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:106:in `analyze'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:416:in `analyze'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:241:in `block in resolve_dependencies'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in `section'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:240:in `resolve_dependencies'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:161:in `install!'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/command/install.rb:52:in `run'
    from /Users/azeemazeez/.rvm/rubies/ruby-2.7.2/lib/ruby/gems/2.7.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/bin/pod:23:in `load'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/bin/pod:23:in `<main>'

我有几种解决方案,例如,

uninstall cocoa pods and reinstalled.

我也试过 brew update

brew update
brew install fastlane
fastlane install_plugins

他们都不适合我。 仍然出现上述错误。

这可能是问题:

Smart quotes were detected and ignored in your Podfile.

尝试在一些文本编辑器(如 vscode、vim 或 nano)中检查您的Podfile ,并将所有引号替换为新引号

我无法解决 Xcode beta 中的问题,尝试更改路径sudo xcode-select cocoapods uninstalled and reinstalledgem installed, brew everything 但没有任何效果。

然后将版本Xcode beta 14.0 to Xcode 13.4.

试过之后,

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

然后 pod 解体

pod deintegrate

最后

pod install

然后开始工作...

post_install do |installer|
  installer.generated_projects.each do |project|
    project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings["DEVELOPMENT_TEAM"] = "Your Team ID"
      end
    end
  end
end

它适用于 xcode 14 beta。

sudo xcode-select -switch /Applications/Xcode-beta.app/Contents/Developer

我将项目格式从 Xcode 14.0 更改为 Xcode 13.0,它对我有用。

将项目兼容性更改为 13.0 - 对我有用:)

就在这儿

首先在你的项目的终端运行

sudo gem update xcodeproj 

然后运行

pod init

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM