IOS应用构建:1:环境安装和准备

在这里插入图片描述
这篇文章介绍一下IOS下Xcode和Fastlane的安装和配置方法。

安装

直接在应用商店进行安装即可,也可以开发者账号登录,下载Beta版本的更新的Xcode。
苹果有普通用户和开发者账号两种类型,而开发者账号分为个人、公司和企业等几种。相关的信息如下所示。

  • 普通用户
    拥有appleid,免费用户,可升级为免费的开发者账户,申请不需要信用卡号等各种私密信息的输入。

  • 开发者账号
    开发者账号的如下四种类型,又如下特点:

账号类型费用申请周期设备限制人员限制邓白氏码发布方式备注
免费个人账号即时----功能非常受限,可由普通账号升级
个人账号99$/年30分钟左右100台调试设备仅限本人-可发布至App Store可由免费个人账户升级,需要提供公司信息,只能查到个人信息
公司账号99$/年平均1周以上100台调试设备可团队开发需要可发布至App Store可由个人账户升级,需要提供公司信息,上架较慢,审核从2天到一周不定,可查到公司信息
企业账号299$/年平均1周以上不限台数和设备可团队开发需要发布内部App,无需审核适合快速发布需求,但不发布到App Store

登录地址:https://developer.apple.com/

事前依赖

  • 以appleid登录应用商店
  • macOS版本:10.14.4或以上

在这里插入图片描述

事前准备

  • 安装xcode命令行工具

xcode-select --install

liumiaocn:~ liumiao$ xcode-select --install
xcode-select: note: install requested for command line developer tools
liumiaocn:~ liumiao$ 

版本确认:

liumiaocn:~ liumiao$ xcode-select --version
xcode-select version 2373.
liumiaocn:~ liumiao$ xcodebuild -version
Xcode 11.3
Build version 11C29
liumiaocn:~ liumiao$

安装rvm

curl -L get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
echo “ruby_url=https://cache.ruby-china.org/pub/ruby” > ~/.rvm/user/db
rvm -v

  • 使用rvm安装ruby 2.6.3版本
liumiaocn:~ liumiao$ rvm install 2.6.3
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.15/x86_64/ruby-2.6.3.
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.....................................................................................
...省略
ruby-2.6.3 - #generating default wrappers.......
ruby-2.6.3 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
Install of ruby-2.6.3 - #complete 
Ruby was built without documentation, to build it run: rvm docs generate-ri
liumiaocn:~ liumiao$
liumiaocn:~ liumiao$ rvm docs generate-ri
Generating ri documentation............................................................................................................|
liumiaocn:~ liumiao$ 
  • 切换当前版本的ruby
liumiaocn:~ liumiao$ rvm list
 * ruby-2.6.3 [ x86_64 ]

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

liumiaocn:~ liumiao$ rvm current
system
liumiaocn:~ liumiao$ rvm use 2.6.3
Using /Users/liumiao/.rvm/gems/ruby-2.6.3
liumiaocn:~ liumiao$ rvm current
ruby-2.6.3
liumiaocn:~ liumiao$ 

安装fastlane

安装命令:sudo gem install fastlane -NW

liumiaocn:~ liumiao$ sudo gem install fastlane -NW
Password:
HEAD https://rubygems.org/api/v1/dependencies
200 OK
GET https://rubygems.org/api/v1/dependencies?gems=fastlane
200 OK
GET https://rubygems.org/quick/Marshal.4.8/fastlane-2.137.0.gemspec.rz
200 OK
...省略
/Users/liumiao/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/fastlane-2.137.0/supply/lib/supply/uploader.rb
/Users/liumiao/.rvm/rubies/ruby-2.6.3/bin/bin-proxy
/Users/liumiao/.rvm/rubies/ruby-2.6.3/bin/fastlane
Successfully installed fastlane-2.137.0
63 gems installed
liumiaocn:~ liumiao$
  • 安装结果确认
liumiaocn:~ liumiao$ which fastlane
/Users/liumiao/.rvm/rubies/ruby-2.6.3/bin/fastlane
liumiaocn:~ liumiao$ fastlane --version
fastlane installation at path:
/Users/liumiao/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/fastlane-2.137.0/bin/fastlane
-----------------------------
[✔] 🚀 
fastlane 2.137.0
liumiaocn:~ liumiao$
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
使用TensorFlow Lite可以快速构建移动端声音分类应用。TensorFlow Lite是一个针对移动设备和嵌入式设备优化的轻量级机器学习框架,它具有高效的推理性能和较小的模型尺寸。 首先,我们需要准备声音分类的训练数据集。可以选择一个合适的公开数据集,例如UrbanSound8K,其中包含了来自不同环境的各种声音样本。然后,我们使用TensorFlow构建和训练一个声音分类模型,可以选择常见的模型架构,如卷积神经网络。 接下来,我们使用TensorFlow提供的工具将训练好的模型转换为TensorFlow Lite的模型格式。这可以通过使用TensorFlow的Converter API实现,其中应用了优化技术来减小模型的尺寸和优化推理性能。 一旦我们获得了TensorFlow Lite模型,我们可以将其集成到移动端应用程序中。可以使用Java或Kotlin编写Android应用,或使用Swift编写iOS应用。在应用程序中,我们使用TensorFlow Lite解析器来加载模型并进行声音分类。该解析器提供了简单的API来输入音频数据并获得分类结果。 最后,为了提高移动端应用的性能,可以考虑对模型进行量化(quantization),将浮点数模型转换为整数模型,以减小内存占用和加速推理速度。TensorFlow Lite还提供了一些优化技术,如模型矩阵压缩和模型分割,进一步提升了性能。 总之,使用TensorFlow Lite可以快速构建高性能、低资源占用的移动端声音分类应用。通过合理选择数据集、训练模型,并应用TensorFlow Lite的优化技术,我们可以在移动设备上实现实时声音分类。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值