IOS之 安装cocoapods问题

这篇具有很好参考价值的文章主要介绍了IOS之 安装cocoapods问题。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

1,安装cocoapods

sudo gem install cocoapods

问题:ERROR:  Could not find a valid gem 'cocoapods' (>= 0) in any repository

 文章来源地址https://www.toymoban.com/news/detail-450840.html

2,升级gem

移除旧源,gem sources --remove https://gems.ruby-china.org/

 添加新源,gem sources -a https://gems.ruby-china.com

检查新源,gem sources -l

问题:报错ssl证书错误

Error fetching https://gems.ruby-china.com:
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://gems.ruby-china.com/specs.4.8.gz)

 

3,检查自己的OpenSSL正式是否过期

rvm osx-ssl-certs

问题:Certificates for ~/Documents/ssldir/~/Documents/ssldir/cert.pem: Old.

4,更新OpenSSL证书

rvm osx-ssl-certs update all

问题:证书不能找到
Selected SSL certs for: curl
cURL certificate bundle /usr/share/curl/curl-ca-bundle.crt not found

5,切换root环境

sudo -i

 

6,再次安装cocoapods

sudo gem install cocoapod

问题:Ruby必须大于2.7.0.

error installing cocoapods: activesupport requires Ruby version >= 2.7.0.

7,查看rvm列表

rvm list known

结果:获取成功

# MRI Rubies
[ruby-]1.8.6[-p420]
[ruby-]1.8.7[-head] # security released on head
[ruby-]1.9.1[-p431]
[ruby-]1.9.2[-p330]
[ruby-]1.9.3[-p551]
[ruby-]2.0.0[-p648]
[ruby-]2.1[.10]
[ruby-]2.2[.10]
[ruby-]2.3[.8]
[ruby-]2.4[.10]
[ruby-]2.5[.8]
[ruby-]2.6[.6]
[ruby-]2.7[.2]
[ruby-]3[.0.0]

8,查看当前rvm版本

rvm -v

结果:获取成功

rvm 1.29.12 (manual) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]

9,更新rvm版本

curl -L get.rvm.io | bash -s stable

结果:更新成功,但还是低版本的

Thanks for installing RVM

10,安装Homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

问题:以root身份运行Homebrew非常危险,不再受支持。由于Homebrew不会在安装时放弃特权,因此您将付出所有构建对系统的完全访问权限的脚本。

Error: Running Homebrew as root is extremely dangerous and no longer supported.
As Homebrew does not drop privileges on installation you would be giving all
build scripts full access to your system.

11,安装rvm指定版本2.7

rvm install 2.7

问题:以root身份运行Homebrew非常危险,不再受支持。由于Homebrew不会在安装时放弃特权,因此您将付出所有构建对系统的完全访问权限的脚本

Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.14/x86_64/ruby-2.7.2.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Error: Running Homebrew as root is extremely dangerous and no longer supported.
As Homebrew does not drop privileges on installation you would be giving all
build scripts full access to your system.
Error: Running Homebrew as root is extremely dangerous and no longer supported.
As Homebrew does not drop privileges on installation you would be giving all
build scripts full access to your system.
Error: Running Homebrew as root is extremely dangerous and no longer supported.
As Homebrew does not drop privileges on installation you would be giving all
build scripts full access to your system.

12,切换普通身份,rvm指定版本2.7

rvm install 2.7

结果:自动更新环境系统

Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.14/x86_64/ruby-2.7.2.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Installing requirements for osx.
Updating system........Installing required packages: autoconf, automake, libtool, pkg-config, coreutils, libyaml, libksba, readline, zlib, openssl@1.1...................................
Certificates bundle '/usr/local/etc/openssl@1.1/cert.pem' is already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/dong/.rvm/rubies/ruby-2.7.2, this may take a while depending on your cpu(s)...
ruby-2.7.2 - #downloading ruby-2.7.2, this may take a while depending on your connection...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 14.0M  100 14.0M    0     0  92539      0  0:02:38  0:02:38 --:--:-- 95229
ruby-2.7.2 - #extracting ruby-2.7.2 to /Users/dong/.rvm/src/ruby-2.7.2.....
ruby-2.7.2 - #configuring.........................................................................
ruby-2.7.2 - #post-configuration.
ruby-2.7.2 - #compiling........................................................................
ruby-2.7.2 - #installing............
ruby-2.7.2 - #making binaries executable...
Installed rubygems 3.1.4 is newer than 3.0.9 provided with installed ruby, skipping installation, use --force to force installation.
ruby-2.7.2 - #gemset created /Users/dong/.rvm/gems/ruby-2.7.2@global
ruby-2.7.2 - #importing gemset /Users/dong/.rvm/gemsets/global.gems.................................there was an error installing gem rubygems-bundler
...............................
ruby-2.7.2 - #generating global wrappers........
ruby-2.7.2 - #gemset created /Users/dong/.rvm/gems/ruby-2.7.2
ruby-2.7.2 - #importing gemsetfile /Users/dong/.rvm/gemsets/default.gems evaluated to empty gem list
ruby-2.7.2 - #generating default wrappers........
ruby-2.7.2 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
Install of ruby-2.7.2 - #complete 
Ruby was built without documentation, to build it run: rvm docs generate-ri


13,查看rvm版本

rvm install 2.7

结果:

rvm 1.29.12 (manual) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]

14,再次安装rvm 2.7

rvm install 2.7

结果:已经安装,要重新安装,请使用:rvm重新安装ruby-2.7.2

Already installed ruby-2.7.2.
To reinstall use:rvm reinstall ruby-2.7.2

15,查看已经安装的rvm版本

rvm list

注: RubyGems(简称 gems)是一个用于对 Ruby组件进行打包的 Ruby 打包系统。 它提供一个分发 Ruby 程序和库的标准格式,还提供一个管理程序包安装的工具。

结果:

=* ruby-2.7.2 [ x86_64 ]

# => - current
# =* - current && default
#  * - default

 

16,再次执行升级gem

移除旧源,gem sources --remove https://gems.ruby-china.org/

 添加新源,gem sources -a https://gems.ruby-china.com

检查新源,gem sources -l

结果:成功,不再第2步的证书过期错误

https://gems.ruby-china.com/ added to sources

*** CURRENT SOURCES ***

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

 

到这里就已经把Ruby环境成功的安装到了Mac OS X上,接下来就可以进行相应的开发使用了

 

17,安装home-brew

也可选择跳过这步, 直接安装cocoapods, 引入库文件时, 会提示你自动安装home-brew
Homebrew: 是一个包管理器,用于在Mac上安装一些OS X没有的UNIX工具。
官方网址: https://brew.sh/index_zh-cn
Homebrew是完全基于 Git 和 ruby.

安装
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”

检测是否存在冲突
$ brew doctor
 
检查是否安装成功, 出现版本号就成功了.
$ brew --version

结果:安装成功

Homebrew 4.0.4
Homebrew/homebrew-core (git revision ea3642558b6; last commit 2023-03-04)
Homebrew/homebrew-cask (git revision f1134401b4; last commit 2023-03-04)

 

18,再次安装Cocoapods

sudo gem install cocoapods

结果:终于安装成功

Fetching tzinfo-2.0.6.gem
Fetching activesupport-7.0.4.2.gem
Fetching nap-1.1.0.gem
Fetching httpclient-2.8.3.gem
Fetching concurrent-ruby-1.2.2.gem
Fetching i18n-1.12.0.gem
Fetching algoliasearch-1.27.5.gem
Fetching ffi-1.15.5.gem
Fetching fuzzy_match-2.0.4.gem
Fetching typhoeus-1.4.0.gem
Fetching cocoapods-downloader-1.6.3.gem
Fetching addressable-2.8.1.gem
Fetching cocoapods-core-1.12.0.gem
Fetching ethon-0.16.0.gem
Fetching claide-1.1.0.gem
Fetching molinillo-0.8.0.gem
Fetching atomos-0.1.3.gem
Fetching cocoapods-search-1.0.1.gem
Fetching cocoapods-deintegrate-1.0.5.gem
Fetching netrc-0.11.0.gem
Fetching public_suffix-4.0.7.gem
Fetching cocoapods-try-1.2.0.gem
Fetching cocoapods-plugins-1.0.0.gem
Fetching xcodeproj-1.22.0.gem
Fetching rexml-3.2.5.gem
Fetching cocoapods-trunk-1.6.0.gem
Fetching CFPropertyList-3.0.6.gem
Fetching colored2-3.1.2.gem
Fetching nanaimo-0.3.0.gem
Fetching escape-0.0.4.gem
Fetching fourflusher-2.3.1.gem
Fetching gh_inspector-1.1.3.gem
Fetching ruby-macho-2.5.1.gem
Fetching cocoapods-1.12.0.gem
Successfully installed concurrent-ruby-1.2.2
Successfully installed i18n-1.12.0
Successfully installed tzinfo-2.0.6
Successfully installed activesupport-7.0.4.2
Successfully installed nap-1.1.0
Successfully installed fuzzy_match-2.0.4
Successfully installed httpclient-2.8.3
A new major version is available for Algolia! Please now use the https://rubygems.org/gems/algolia gem to get the latest features.
Successfully installed algoliasearch-1.27.5
Building native extensions. This could take a while...
Successfully installed ffi-1.15.5
Successfully installed ethon-0.16.0
Successfully installed typhoeus-1.4.0
Successfully installed netrc-0.11.0
Successfully installed public_suffix-4.0.7
Successfully installed addressable-2.8.1
Successfully installed cocoapods-core-1.12.0
Successfully installed claide-1.1.0
Successfully installed cocoapods-deintegrate-1.0.5
Successfully installed cocoapods-downloader-1.6.3
Successfully installed cocoapods-plugins-1.0.0
Successfully installed cocoapods-search-1.0.1
Successfully installed cocoapods-trunk-1.6.0
Successfully installed cocoapods-try-1.2.0
Successfully installed molinillo-0.8.0
Successfully installed atomos-0.1.3
Successfully installed rexml-3.2.5
Successfully installed CFPropertyList-3.0.6
Successfully installed colored2-3.1.2
Successfully installed nanaimo-0.3.0
Successfully installed xcodeproj-1.22.0
Successfully installed escape-0.0.4
Successfully installed fourflusher-2.3.1
Successfully installed gh_inspector-1.1.3
Successfully installed ruby-macho-2.5.1
Successfully installed cocoapods-1.12.0
Parsing documentation for concurrent-ruby-1.2.2
Installing ri documentation for concurrent-ruby-1.2.2
Parsing documentation for i18n-1.12.0
Installing ri documentation for i18n-1.12.0
Parsing documentation for tzinfo-2.0.6
Installing ri documentation for tzinfo-2.0.6
Parsing documentation for activesupport-7.0.4.2
Installing ri documentation for activesupport-7.0.4.2
Parsing documentation for nap-1.1.0
Installing ri documentation for nap-1.1.0
Parsing documentation for fuzzy_match-2.0.4
Installing ri documentation for fuzzy_match-2.0.4
Parsing documentation for httpclient-2.8.3
Installing ri documentation for httpclient-2.8.3
Parsing documentation for algoliasearch-1.27.5
Installing ri documentation for algoliasearch-1.27.5
Parsing documentation for ffi-1.15.5
Installing ri documentation for ffi-1.15.5
Parsing documentation for ethon-0.16.0
Installing ri documentation for ethon-0.16.0
Parsing documentation for typhoeus-1.4.0
Installing ri documentation for typhoeus-1.4.0
Parsing documentation for netrc-0.11.0
Installing ri documentation for netrc-0.11.0
Parsing documentation for public_suffix-4.0.7
Installing ri documentation for public_suffix-4.0.7
Parsing documentation for addressable-2.8.1
Installing ri documentation for addressable-2.8.1
Parsing documentation for cocoapods-core-1.12.0
Installing ri documentation for cocoapods-core-1.12.0
Parsing documentation for claide-1.1.0
Installing ri documentation for claide-1.1.0
Parsing documentation for cocoapods-deintegrate-1.0.5
Installing ri documentation for cocoapods-deintegrate-1.0.5
Parsing documentation for cocoapods-downloader-1.6.3
Installing ri documentation for cocoapods-downloader-1.6.3
Parsing documentation for cocoapods-plugins-1.0.0
Installing ri documentation for cocoapods-plugins-1.0.0
Parsing documentation for cocoapods-search-1.0.1
Installing ri documentation for cocoapods-search-1.0.1
Parsing documentation for cocoapods-trunk-1.6.0
Installing ri documentation for cocoapods-trunk-1.6.0
Parsing documentation for cocoapods-try-1.2.0
Installing ri documentation for cocoapods-try-1.2.0
Parsing documentation for molinillo-0.8.0
Installing ri documentation for molinillo-0.8.0
Parsing documentation for atomos-0.1.3
Installing ri documentation for atomos-0.1.3
Parsing documentation for rexml-3.2.5
Installing ri documentation for rexml-3.2.5
Parsing documentation for CFPropertyList-3.0.6
Installing ri documentation for CFPropertyList-3.0.6
Parsing documentation for colored2-3.1.2
Installing ri documentation for colored2-3.1.2
Parsing documentation for nanaimo-0.3.0
Installing ri documentation for nanaimo-0.3.0
Parsing documentation for xcodeproj-1.22.0
Installing ri documentation for xcodeproj-1.22.0
Parsing documentation for escape-0.0.4
Installing ri documentation for escape-0.0.4
Parsing documentation for fourflusher-2.3.1
Installing ri documentation for fourflusher-2.3.1
Parsing documentation for gh_inspector-1.1.3
Installing ri documentation for gh_inspector-1.1.3
Parsing documentation for ruby-macho-2.5.1
Installing ri documentation for ruby-macho-2.5.1
Parsing documentation for cocoapods-1.12.0
Installing ri documentation for cocoapods-1.12.0
Done installing documentation for concurrent-ruby, i18n, tzinfo, activesupport, nap, fuzzy_match, httpclient, algoliasearch, ffi, ethon, typhoeus, netrc, public_suffix, addressable, cocoapods-core, claide, cocoapods-deintegrate, cocoapods-downloader, cocoapods-plugins, cocoapods-search, cocoapods-trunk, cocoapods-try, molinillo, atomos, rexml, CFPropertyList, colored2, nanaimo, xcodeproj, escape, fourflusher, gh_inspector, ruby-macho, cocoapods after 22 seconds
34 gems installed
 

19,查看是否安装成功

pod search afnetworking

结果:安装成功

Setup completed
[!] Unable to find a pod with name, author, summary, or description matching `afnetworking`

如果没有安装成功,提示Setting up CocoaPods master repo。也可以输入which pod有路径显示就证明安装成功

20,使用cocoapods,首先进行初始化,终端中cd 到项目文件夹,然后执行pod init。在工程目录下生成Podfile文件

打开文件路径栏,复制路径,然后执行cd /Users/dong/Documents/百思不得姐,然后执行,pod init

结果:Podfile已经存在

 Existing Podfile found in directory

21,可通过vim Podfile进行编辑文件,也可直接通过文本查看器打开。
接下来安装库,在Podfile中添加 pod ‘库名’ 并保存

pod "AFNetworking"

结果:完成文件内容如下:

platform :ios, '8.0'

pod "AFNetworking"
target 'test' do
end

 

22,输入pod install安装库,安装成功则提示Pod installation complete

pod install

结果:

[!] Unable to find a target named `test` in project `百思不得姐.xcodeproj`, did find `百思不得姐`.

 

23,更换target 'test' do 为工程名 target '百思不得姐' do,再次执行pod install

platform :ios, '8.0'

pod "AFNetworking"
target '百思不得姐' do
end


结果:成功

Analyzing dependencies
Adding spec repo `trunk` with CDN `https://cdn.cocoapods.org/`
Downloading dependencies
Installing AFNetworking (3.2.1)
Generating Pods project
Integrating client project

[!] Please close any current Xcode sessions and use `百思不得姐.xcworkspace` for this project from now on.
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.

[!] AFNetworking has been deprecated in favor of Alamofire

24,打开xcode项目,如果可以引用到AFNetworking,则说明已经成功

#import "AFNetworking.h"//主要用于网络请求方法

-(void)obtainData{AFHTTPRequestOperationManager *manager   [AFHTTPRequestOperationManager  manager];                                           
}

 

25,到此经过几天努力,终于安装上了cocoapods,此外可能安装过程可能遇到其它问题也在这写明,可以参考是否遇到类似问题

安装步骤

下载Xcode —>安装rvm —>安装ruby —>安装home-brew —>安装cocoapods

xcode,苹果开发工具,可用于object-c和swift语言开发苹果收集和手表软件应用

RVM,是Ruby的版本管理工具,uby执行需要ruby解释器,rvm就是管理ruby解释器版本的,安装、卸载、更新、切换 等

Ruby,一种简单快捷的面向对象(面向对象程序设计)脚本语言,是用来构建CocoaPods的

Homebrew是一款Mac OS平台下的软件包管理工具,拥有安装、卸载、更新、查看、搜索等很多实用的功能。这里主要用于安装Ruby语言环境

CocoaPods是OS X和iOS下的一个第三类库管理工具,通过CocoaPods工具我们可以为项目添加被称为“Pods”的依赖库(这些类库必须是CocoaPods本身所支持的),并且可以轻松管理其版本

问题1:

ERROR: Could not find a valid gem 'cocoapods' (>= 0) in any repository 错误

也可以安装xcodexcode命令行工具包进行尝试解决sudo xcode-select --install

问题2:

curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused

解决:

更新homebrew

/usr/bin/ruby -e "$(curl -fsSL https://cdn.jsdelivr.net/gh/ineo6/homebrew-install/install)"

问题3:

homebrew-core is a shallow clone.

To `brew update`, first run:

git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow

解决:

cd /usr/local/Homebrew/Library/Taps/homebrew

rm -rf homebrew-core

brew upgrade

完成后继续执行:

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

问题4:

xcode-select: error: command line tools are already installed, use "Software Update" to install

解决:

sudo  rm -rf /Library/Developer/CommandLineTools

sudo  xcode-select --install

 

问题5

每次打开cocoapods编辑器比较麻烦,我们可以安装cocoapods可视化插件,可以先安装Alcatraz插件管理器

解决:

下一章我们将详细讲解Alcatraz插件管理器和cocoapods插件的安装和使用

 

本教程基于macos10.14.6和xcode11.3.1

 

 

 

到了这里,关于IOS之 安装cocoapods问题的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 【iOS】Cocoapods的安装以及使用

    最近笔者在仿写天气预报App时用到了api调用数据,一般的基本数据类型我们用Xcode中自带的框架就可以转换得到。但是在和风天气api中的图标的格式为 svg 格式。 似乎iOS13之后Xcode中可以直接使用svg格式的图片,但笔者没有查到对应的资料。笔者就调用了第三方库来使用svg格式

    2024年02月15日
    浏览(32)
  • MAC机器Unity接入iOS SDK安装cocoapods全攻略

    要在Unity3D里面接入iOS SDK,因此又在新mac上配置了一道环境。机器是Mac mini,芯片是M2,OS为Sonoma 14.2。 若Unity3D工程里面有EDM4U插件,且配置了Dependencies文件(文件内配置了iosPod),那么在导出XCode的工程时,会自动安装CocoaPods,但多半会失败。失败原因多是机器自带的ruby版本

    2024年04月29日
    浏览(26)
  • XZ_iOS 之 M1 M2 M3的M系列芯片的Mac苹果电脑安装cocoapods

    安装的前提,应用程序-终端-右键-显示简介-勾选 使用Rosetta打开,如下图,然后重启终端 安装的顺序如下:Homebrew-rvm-ruby-cocoapods 1、安装Homebrew 安装的时候报了以下错误,然后我打开了VPN,就很顺滑的安装了 fatal: unable to access \\\'https://github.com/Homebrew/brew/\\\': Failed to connect to gith

    2024年01月18日
    浏览(51)
  • iOS开发提效cocoapods插件cocoapods-util

    cocoapods-util是一个iOS开发提效的cocoapods插件。 取名util的原因是我想做一个通用的插件,把一些iOS中常用的命令或问题整理起来。 插件中除了package命令是根据cocoapods-packager插件做了修改而来,其余命令都是属于自己总结开发场景下的需求实现的,希望对各位iOSer有所帮助。 目

    2024年02月07日
    浏览(32)
  • flutter doctor检测环境,出现CocoaPods installed but not working

    1. 安装flutter, 地址: 安装和环境配置 - Flutter 中文文档 - Flutter 中文开发者网站 - Flutter 2. 安装成功后,通过flutter doctor检测环境。以mac为例,出现了 CocoaPods installed but not working 错误提示时,以下为解决方案: 2.1   rvm install ruby-3.1.0, 可能出现依赖错误问题,使用如何指令即可

    2024年02月08日
    浏览(36)
  • xcode iOS 17.2 not install, Simulator 手动安装

    参考文档 xcode又又又升级了,升级完成之后不下载最新的 iOS 17 Simulator就不能编译运行了,只能静静的等他下载。但是离谱的是这个居然没有断点续下,每次都要重新下载,眼睁睁的看着下载了4个G然后断掉了从头再来。 自动挡不太行还是要切回手动档模式了。 苹果有个下载

    2024年02月04日
    浏览(40)
  • 大幅提升iOS编译速度的cocoapods二进制化插件介绍

    驾校一点通iOS项目是采用是cocoapods来管理组件的,又经过多年的组件化发展,目前组件已经达到了120+的数量。在这种组件规模下,主工程的打包时间也从最开始的几分钟增加到十几分钟(M1)、二十几分钟(Intel)。而且在频繁切换分支开发的场景下,每次编译的耗时成了制

    2024年02月08日
    浏览(46)
  • CocoaPods 在iOS开发中养活了这么多项目,它到底是个啥?

    对于iOS开发者而言,CocoaPods并不陌生,通过pod相关的命令操作,就可以很方便的将项目中用到的三方依赖库资源集成到项目环境中,大大的提升了开发的效率。CocoaPods作为iOS项目的包管理工具,它在命令行背后做了什么操作?而又是通过什么样的方式将命令指令声明出来供我

    2024年02月08日
    浏览(37)
  • 终极解决Flutter项目运行ios项目报错Without CocoaPods, plugins will not work on iOS or macOS.

    最近在开发Flutter项目,运行ios环境的时候报错没有CocoaPods,安卓环境可以正常运行,当时一脸懵逼,网上搜索了一下,有给我讲原理的,还有让我安装这插件那插件的,最终把电脑搞得卡死,还没有解决我的问题,其实很多人和我一样只想解决问题,而不是废话一大堆的文章

    2024年01月22日
    浏览(45)
  • iOS开发Swift-10-位置授权, cocoapods,API,天气获取,城市获取-和风天气App首页代码

     1.获取用户当前所在的位置 在infi中点击加号,选择权限:当用户使用app的时候获取位置权限. 填写使用位置权限的目的.  2.获取用户的经纬度. ViewController:  3.通过第三方服务获取当前天气 (1)安装cocoapods https://dev.qweather.com/ 在网站中可以找到,当向 https://devapi.qweather.com/v7/weathe

    2024年02月09日
    浏览(36)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包