Unity:导Xcode工程报错 iOS framework addition failed due to a CocoaPods installation failure.

iOS framework addition failed due to a CocoaPods installation failure. This will will likely result in an non-functional Xcode project.

Unity导出Xcode工程时,由于其依赖了第三方的CocoaPods库,报错如下。

解决方案:

虽然错误中写的WARNING,但是解决了这个WARNING问题,也不再报错了。

cd ~
vim .profile  # 如没有,执行如下命令,如有,填入 export LANG=en_US.UTF-8
touch .profile # 新建 .profile
source .profile # 让其生效

具体报错如下(部分):

在这里插入图片描述

iOS framework addition failed due to a CocoaPods installation failure. This will will likely result in an non-functional Xcode project.

After the failure, "pod repo update" was executed and succeeded. "pod install" was then attempted again, and still failed. This may be due to a broken CocoaPods installation. See: https://guides.cocoapods.org/using/troubleshooting.html for potential solutions.

pod install output:



    [33mWARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
    Consider adding the following to ~/.profile:

    export LANG=en_US.UTF-8
    [0m
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/unicode_normalize/normalize.rb:141:in `normalize': Unicode Normalization not appropriate for ASCII-8BIT (Encoding::CompatibilityError)
	from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/config.rb:166:in `unicode_normalize'
	from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/config.rb:166:in `installation_root'
	from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/config.rb:226:in `podfile_path'
	from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/user_interface/error_report.rb:105:in `markdown_podfile'
	from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/user_interface/error_report.rb:30:in `report'
	from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:66:in `report_error'
	from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:396:in `handle_exception'
	from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:337:in `rescue in run'
	from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:324:in `run'
	from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:52:in `run'
	from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/bin/pod:55:in `<top (required)>'
	from /usr/local/bin/pod:25:in `load'
	from /usr/local/bin/pod:25:in `<main>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/unicode_normalize/normalize.rb:141:in `normalize': Unicode Normalization not appropriate for ASCII-8BIT (Encoding::CompatibilityError)
	from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/config.rb:166:in `unicode_normalize'
	from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/config.rb:166:in `installation_root'
	from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/config.rb:226:in `podfile_path'
	from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/config.rb:205:in `podfile'
	from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:160:in `verify_podfile_exists!'
	from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command/install.rb:46:in `run'
	from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
	from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:52:in `run'
	from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/bin/pod:55:in `<top (required)>'
	from /usr/local/bin/pod:25:in `load'
	from /usr/local/bin/pod:25:in `<main>'



pod repo update output:

Updating spec repo `cocoapods`
  $ /usr/local/bin/git -C /Users/liuyongjie/.cocoapods/repos/cocoapods fetch origin --progress
  $ /usr/local/bin/git -C /Users/liuyongjie/.cocoapods/repos/cocoapods rev-parse --abbrev-ref HEAD
  master
  $ /usr/local/bin/git -C /Users/liuyongjie/.cocoapods/repos/cocoapods reset --hard origin/master
  HEAD 现在位于 9734315382c8 [Add] HBS-UI 1.1.0
Updating spec repo `ftsview-the-fotoable-cocoapods-specs`
  $ /usr/local/bin/git -C /Users/liuyongjie/.cocoapods/repos/ftsview-the-fotoable-cocoapods-specs fetch origin --progress
  $ /usr/local/bin/git -C /Users/liuyongjie/.cocoapods/repos/ftsview-the-fotoable-cocoapods-specs rev-parse --abbrev-ref HEAD
  master
  $ /usr/local/bin/git -C /Users/liuyongjie/.cocoapods/repos/ftsview-the-fotoable-cocoapods-specs reset --hard origin/master
  HEAD 现在位于 8984dba [Update] FtAdsPlatform (4.4.8.4)


    [33mWARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
    Consider adding the following to ~/.profile:

    export LANG=en_US.UTF-8

猜你喜欢

转载自blog.csdn.net/Yj_sail/article/details/121343344