iOS相关

1. fastlane

a collection of tools that help you automate building and releasing iOS and Android apps。用中文说,就是用来构建打包的工具。可支持iOS和Android操做系统。fastlane是用Ruby语言编写的一套自动化工具集和框架,每个工具实际都对应一个Ruby脚本,用来执行某一个特定的任务,而fastlance核心框架则容许使用者经过相似配置文件的形式,将不一样的工具结合在一块儿,从而造成一个个完整的自动化流程。python

详细内容可看:自动化打包之Fastlane https://blog.csdn.net/kuangdacaikuang/article/details/80443515 。linux

举例:npm

desc "Build beta package and upload to xx.com"
#lane表示一个打包流程 例子中,此流程名叫build_for_beta。假设咱们的App名叫myApp lane :build_for_beta do update_info_plist( plist_path: "myApp/Info.plist", display_name: "myApp_test" ) #设置plist中key1值为value1 set_info_plist_value(path: "./myApp/Info.plist", key: "key1", value: "value1") version_number = get_version_number( xcodeproj: "./myApp.xcodeproj" ) # 打完包的产物都会以这个参数命名 myApp_archive_name = "myApp_v#{version_number}_beta" end

 

2. info.plist

info.plist是应用app的配置文件,能够在此定义Bundle的版本号CFBundleShortVersionString,应用程序版本号CFBundleVersion,应用名称CFBundleDisplayName,启动图标CFBundleIcons,应用标识号CFBundleIdentifier,是否支持后台运行UIApplicationExitsOnSuspend,须要的权限等。如下info.plist里定义的app名叫:myApp,版本为5.1.0-300xcode

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>CFBundleDevelopmentRegion</key>
	<string>zh_CN</string>
	<key>CFBundleDisplayName</key>
	<string>myApp</string>
	<key>CFBundleIdentifier</key>
	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
	<key>CFBundleName</key>
	<string>$(PRODUCT_NAME)</string>
	<key>CFBundleShortVersionString</key>
	<string>5.1.0</string>
	<key>CFBundleVersion</key>
	<string>300</string>
	<key>DEBUG</key>
	<integer>1</integer>
	<key>NSAppleMusicUsageDescription</key>
	<string>是否容许访问媒体资料库?</string>
	<key>NSBluetoothPeripheralUsageDescription</key>
	<string>是否容许访问蓝牙?</string>
</dict>
</plist>

  

3. /usr/libexec/Plistbuddy

plist是Mac种很是广泛的一种文件格式,相似xml,经过键值对的方式来进行一些配置。而PlistBuddy则是Mac自带的专门解析plist的小工具详情可参见:https://www.jianshu.com/p/2167f755c47eruby

使用plistbuddy输出及修改版本号,命令以下:app

buildnum=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${plist}")

buildnum=$(expr $buildnum + 1)

/usr/libexec/Plistbuddy -c "Set CFBundleVersion $buildnum" "${plist}"

4. rvm

rvm是一个命令行工具,能够提供一个便捷的多版本Ruby环境管理和切换。框架

5. gem

gem是管理ruby程序的程序,相似python下的pip 或 Node.js 里的npm。工具

gemfile里定义应用依赖的第三方包,bundle根据该配置寻找这些包。ui

6. brew

homebrew简称brew,是Mac OSX上的软件包管理工具,相似linux里的apt-get / yum等。经常使用命令有:spa

brew update #更新homebrew的信息

brew outdated #查看须要升级的软件

brew upgrade xxx #指定升级某软件

brew upgrade  #升级全部软件

brew cleanup  

7. bundler & bundle

bundler是管理多版本gem的工具。bundle文件能够理解为资源文件包。咱们将许多图片、文本文件组织在一块儿,打包成一个bundle文件,方便在其余项目中引用包内的资源。bundle是静态的,不参加项目编译,不包含可执行文件。

8. agvtool

版本和内部版本号码Key分别指定市场和应用程序的内部版本。agvtool是一个命令行工具,它容许你这些数字自动递增到下一个最高号码或特定号码。更新及查看版本号命令为:

agvtool new-marketing-version <your_specific_version>

agvtool what-marketing-version

// build
agvtool new-version -all 1.0.0
agvtool what-version

  

9. pod & CocoPods

pod是用来管理iOS库的工具,经过CocoaPods工具咱们能够为项目添加被称为“Pods”的依赖库(这些类库必须是CocoaPods自己所支持的),而且能够轻松管理其版本。

相关文章
相关标签/搜索