工程支持xcframework,检查pod版本及更新pod

简介: 工程支持xcframework,检查pod版本及更新pod

工程不认识xcframework.

需要将pod升级到1.10.0及其以上的版本,pod新版本才支持xcframework

检查pod版本

jgs:~ mac$ pod --version
1.8.4

具体解决方案:

  1. 替换ruby源
jgs:~ mac$ gem sources --remove https://gems.ruby-china.org/
source https://gems.ruby-china.org/ not present in cache
jgs:~ mac$ gem source -a https://gems.ruby-china.com
source https://gems.ruby-china.com already present in the cache
jgs:~ mac$ gem sources -l
*** CURRENT SOURCES ***

https://gems.ruby-china.com/
https://rubygems.org/

2.保证只有一个ruby源,淘宝的源已经不更新维护了,现在使用ruby-china的源。多余的要移除:

jgs:~ mac$ gem sources --remove https://rubygems.org/
https://rubygems.org/ removed from sources
jgs:~ mac$ gem sources -l
*** CURRENT SOURCES ***

https://gems.ruby-china.com/

3.验证是否替换成功:

gem sources -l

jgs:~ mac$ gem sources -l
*** CURRENT SOURCES ***

https://gems.ruby-china.com/
  1. 更新升级 Gem 版本
    更新升级gem,gem不更新可能导致安装pod失败
    sudo gem update --system
    查看gem版本
    gem -v
jgs:~ mac$ sudo gem update --system
Password:
Latest version already installed. Done.
jgs:~ mac$ gem -v
3.0.3

5.安装CocoaPods

 如果mac系统为OS X 10.11 以前安装命令为:

 sudo gem install cocoapods // 安装cocoapods

 Mac系统为OS X EL Capitan安装命令为:

 sudo gem install -n /usr/local/bin cocoapods

j

jgs:~ mac$ sudo gem install -n /usr/local/bin cocoapods
Fetching activesupport-5.2.6.gem
Fetching ethon-0.14.0.gem
Fetching public_suffix-4.0.6.gem
Fetching ffi-1.15.3.gem
Fetching addressable-2.8.0.gem
Fetching cocoapods-core-1.10.1.gem
Fetching typhoeus-1.4.0.gem
Fetching cocoapods-downloader-1.4.0.gem
Fetching nanaimo-0.3.0.gem
Fetching rexml-3.2.5.gem
Fetching xcodeproj-1.20.0.gem
Fetching cocoapods-1.10.1.gem
Successfully installed activesupport-5.2.6
Building native extensions. This could take a while...
Successfully installed ffi-1.15.3
Successfully installed ethon-0.14.0
Successfully installed typhoeus-1.4.0
Successfully installed public_suffix-4.0.6
Successfully installed addressable-2.8.0
Successfully installed cocoapods-core-1.10.1
Successfully installed cocoapods-downloader-1.4.0
Successfully installed nanaimo-0.3.0
Successfully installed rexml-3.2.5
Successfully installed xcodeproj-1.20.0
Successfully installed cocoapods-1.10.1
Parsing documentation for activesupport-5.2.6
Installing ri documentation for activesupport-5.2.6
Parsing documentation for ffi-1.15.3
Installing ri documentation for ffi-1.15.3
Parsing documentation for ethon-0.14.0
Installing ri documentation for ethon-0.14.0
Parsing documentation for typhoeus-1.4.0
Installing ri documentation for typhoeus-1.4.0
Parsing documentation for public_suffix-4.0.6
Installing ri documentation for public_suffix-4.0.6
Parsing documentation for addressable-2.8.0
Installing ri documentation for addressable-2.8.0
Parsing documentation for cocoapods-core-1.10.1
Installing ri documentation for cocoapods-core-1.10.1
Parsing documentation for cocoapods-downloader-1.4.0
Installing ri documentation for cocoapods-downloader-1.4.0
Parsing documentation for nanaimo-0.3.0
Installing ri documentation for nanaimo-0.3.0
Parsing documentation for rexml-3.2.5
Installing ri documentation for rexml-3.2.5
Parsing documentation for xcodeproj-1.20.0
Installing ri documentation for xcodeproj-1.20.0
Parsing documentation for cocoapods-1.10.1
Installing ri documentation for cocoapods-1.10.1
Done installing documentation for activesupport, ffi, ethon, typhoeus, public_suffix, addressable, cocoapods-core, cocoapods-downloader, nanaimo, rexml, xcodeproj, cocoapods after 43 seconds
12 gems installed

6.等待其安装成功,用命令pod --version查看是否安装成功,如果成功会显示pod的版本。

jgs:~ mac$ pod --version
1.10.1

7.更新原来的工程,然后工程就能支持xcframework了,能运行工程成功了。

jgs:LChat mac$ pod update --verbose --no-repo-update
目录
相关文章
|
Swift iOS开发 Perl
如何解决Swift混编的module编译错误
前言很多iOS工程都是基于Object-C开发,再逐步向Swift演进,演进过程中不可避免要进行Swift混编。Swift模块需要支持LLVM Module规范,混编工程会遇到各种Module编译错误。这对于不熟悉的同学来说简直是灾难,严重影响开发效率。本文会介绍常见的Module编译错误,希望对大家有所帮助。常见错误1:Could not build module xxx当一个OC模块引用了Sw
8533 1
如何解决Swift混编的module编译错误
|
Java 数据安全/隐私保护
Java 中使用 OpenSSL 生成公钥私钥进行数据加解密
Java 中使用 OpenSSL 生成公钥私钥进行数据加解密
1104 0
|
人工智能 自然语言处理 安全
一文掌握大模型提示词技巧:从战略到战术(二)
一文掌握大模型提示词技巧:从战略到战术
1237 66
|
Web App开发 JavaScript 前端开发
代码规范
代码规范
1623 0
|
测试技术 调度 Android开发
Flutter系列:关于ensureInitialized()
Flutter系列:关于ensureInitialized()
709 5
|
弹性计算 负载均衡 安全
ACP 知识点总结
ACP 知识点总结
1353 5
|
机器学习/深度学习 数据采集 人工智能
【AI 生成式】生成式 AI 中变分自动编码器 (VAE) 的概念
【5月更文挑战第4天】【AI 生成式】生成式 AI 中变分自动编码器 (VAE) 的概念
|
前端开发 JavaScript 数据格式
react18【系列实用教程】Hooks (useState,useReducer,useRef,useEffect,useContext,useMemo,useCallback,自定义 Hook )
react18【系列实用教程】Hooks (useState,useReducer,useRef,useEffect,useContext,useMemo,useCallback,自定义 Hook )
770 1
|
开发工具
阿里云本机一键登录授权页面修改
阿里云本机一键登录授权页面修改
1032 0
|
Dart 开发工具 Android开发
如何在Flutter中使用BoxDecoration和GradientAppBar创建渐变效果
如何在Flutter中使用BoxDecoration和GradientAppBar创建渐变效果
652 0