当前位置: 首页 > news >正文

集美网站开发怎样在百度上作网站推广

集美网站开发,怎样在百度上作网站推广,网络营销师培训学校,买手机的网站Fastlane一键打包上传到TestFlight、蒲公英 前言一、准备二、探索一、Fastlane配置1、Fastlane安装2、Fastlane更新3、Fastlane卸载4、查看Fastlane版本5、查看Fastlane位置6、Fastlane初始化 二、Fastlane安装蒲公英插件三、Fastlane文件编辑1、Gemfile文件2、Appfile文件3、F…

Fastlane一键打包上传到TestFlight、蒲公英

  • 前言
  • 一、准备
  • 二、探索
    • 一、Fastlane配置
      • 1、Fastlane安装
      • 2、Fastlane更新
      • 3、Fastlane卸载
      • 4、查看Fastlane版本
      • 5、查看Fastlane位置
      • 6、Fastlane初始化
    • 二、Fastlane安装蒲公英插件
    • 三、Fastlane文件编辑
      • 1、Gemfile文件
      • 2、Appfile文件
      • 3、Fastfile文件
        • 1、递增build号
        • 2、任务配置
      • 4、Pluginfile文件
    • 四、项目工程配置Fastlane
        • 1、递增版本号配置
    • 五、Fastlane执行
      • 2、账号权限
  • 三、总结
  • 四、常见问题归纳

前言

  • 废话不多说,能知道fastlane的,代表您已经对fastlane的用处有了初步了解,并且想使用在自己项目中,本文只适用于iOS项目的fastlane配置(Android端未验证),直接开始配置。

一、准备

  • Ruby环境,CocoaPods环境, 蒲公英官网
  • 打正式包上传testflight过程中需要输入密码,对于开启了双重认证的账户需要去 ,申请专属密码app专属密码申请
  • iOS开发必须要知道的基础开发环境配置,终端执行pod env
    在这里插入图片描述
  • 登录蒲公英,获取api_key,复制备用
    在这里插入图片描述

二、探索

一、Fastlane配置

1、Fastlane安装

  • 终端执行以下命令以安装Fastlane
    需要配置的安装:
sudo gem install fastlane
  • 快速安装:
sudo gem install fastlane -NV

执行完成后出现以下字样即为安装成功
在这里插入图片描述

2、Fastlane更新

以下两种终端更新Fastlane方式,使用一种即可:

  • 方式一:
bundle update fastlane
  • 方式二:
fastlane update_fastlane

3、Fastlane卸载

  • 终端执行以下命令来卸载Fastlane
sudo gem unstall fastlane

4、查看Fastlane版本

  • 执行以下命令查看Fastlane版本,以验证
fastlane --version

在这里插入图片描述

5、查看Fastlane位置

which fastlane

6、Fastlane初始化

  • 终端cd到项目工程根目录下,执行以下命令,来初始化fastlane
fastlane init
  • 项目工程里会创建出fastlane文件夹、Gemfile和Gemfile.lock
    在这里插入图片描述
  • fastlane init过程中有些需要输入开发者账号密码,后续可通过以下命令重新登录账号。
fastlane cert create

二、Fastlane安装蒲公英插件

  • 终端执行以下命令来安装蒲公英插件
fastlane add_plugin pgyer
  • 执行过程中出现以下内容,是为了在Gemfile文件里面写入Pluginfile内容,输入y按回车
Plugin 'fastlane-plugin-pgyer' was added to './fastlane/Pluginfile'
[10:08:29]: It looks like fastlane plugins are not yet set up for this project.
[10:08:29]: fastlane will modify your existing Gemfile at path 'Gemfile'
[10:08:29]: This change is necessary for fastlane plugins to work
[10:08:29]: Should fastlane modify the Gemfile at path 'Gemfile' for you? (y/n)
  • 出现以下内容即为安装蒲公英插件成功
    在这里插入图片描述

三、Fastlane文件编辑

1、Gemfile文件

一般安装好蒲公英插件和fastlane初始化后会默认生成

source "https://rubygems.org"gem "fastlane"gem "cocoapods"plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)

2、Appfile文件

一般安装好蒲公英插件和fastlane初始化后会默认生成,可以按需求修改,个人的Apple ID方便接收AppStore上传及审核信息

app_identifier("com.xxx.xxx") #app的bundleID 
apple_id("xxx@xxx.com") #个人的Apple ID,邮箱itc_team_id("xxxxxx") #App Store的团队ID App Store Connect Team ID
team_id("xxxxxx") #团队ID Developer Portal Team ID
branch ENV['xxxxxx'] #分支
# For more information about the Appfile, see:
#     https://docs.fastlane.tools/advanced/#appfile

3、Fastfile文件

Fastfile文件为核心配置文件,需要编辑打包流程到信息,每一个功能块由 ==lane: xxx do ==开头 end 结尾

1、递增build号

定义一个递增build号的函数,添加到Fastfile中

def updateProjectBuildNumbercurrentTime = Time.new.strftime("%Y%m%d")
build = get_build_number()
if build.include?"#{currentTime}."# => 为当天版本 计算迭代版本号lastStr = build[build.length-2..build.length-1]lastNum = lastStr.to_ilastNum = lastNum + 1lastStr = lastNum.to_sif lastNum < 10lastStr = lastStr.insert(0,"0")endbuild = "#{currentTime}.#{lastStr}"
else# => 非当天版本 build 号重置build = "#{currentTime}.01"
end
puts("*************| 更新build #{build} |*************")
# => 更改项目 build 号
increment_build_number(
build_number: "#{build}"
)
end
2、任务配置
  • 以下为任务配置信息仅供参考(请切换为属于你的专属信息):
#fastlane版本号
fastlane_version "2.216.0"
#打包平台
default_platform :ios#指定项目的scheme名称 ---- 修改
scheme="xxx"
#蒲公英api_key和user_key ---- 修改
api_key="xxx"
user_key="xxx"# 任务脚本
platform :ios dodesc "以 development 方式打包并上传到蒲公英"lane :test_beta doputs "以 development 方式打包"gym(# 指定打包所使用的输出方式 (可选: app-store, package, ad-hoc, enterprise, development)export_method: "development",# 指定项目的 scheme 名称scheme: "xxx",# 指定输出的文件夹地址output_directory: "./archive/test_beta/" + Time.new.strftime("%Y-%m-%d-%H:%M:%S"),)puts "上传 ipa 包到蒲公英"pgyer(# 蒲公英 API KEYapi_key: "xxx",# 蒲公英 USER KEYuser_key: "xxx")enddesc "以 ad-hoc 方式打包并上传到蒲公英"lane :beta doputs "自动生成 Provisioning Profiles 文件"sigh(# 指定输出的文件夹地址output_path: "./archive/sign",# 是否为 AdHoc 证书(设为 false 或不写默认为 AppStore 证书)adhoc: true)puts "以 ad-hoc 方式打包"gym(# 指定打包所使用的输出方式 (可选: app-store, package, ad-hoc, enterprise, development)export_method: "ad-hoc",# 指定项目的 scheme 名称scheme: "xxx",# 指定输出的文件夹地址output_directory: "./archive/beta/" + Time.new.strftime("%Y-%m-%d-%H:%M:%S"),# 指定打包方式 (可选: Release, Debug)configuration: "Release")puts "上传 ipa 包到蒲公英"pgyer(# 蒲公英 API KEYapi_key: "xxx",# 蒲公英 USER KEYuser_key: "xxx")enddesc "以 app-store 方式打包并上传到 iTunes Connect"lane :release doputs "自动生成 Provisioning Profiles 文件"sigh(# 指定输出的文件夹地址output_path: "./archive/sign")puts "以 app-store 方式打包"gym(# 指定打包所使用的输出方式 (可选: app-store, package, ad-hoc, enterprise, development)export_method: "app-store",# 指定项目的 scheme 名称scheme: "xxx",# 指定输出的文件夹地址output_directory: "./archive/release/" + Time.new.strftime("%Y-%m-%d-%H:%M:%S"),# 指定打包方式 (可选: Release, Debug)configuration: "Release")puts "上传 ipa 包到 iTunes Connect"deliver(# 跳过截图上传skip_screenshots: true,# 跳过元数据上传skip_metadata: true,# 跳过审核直接上传force: true)end
end

以上配置完成就可以在本地终端进行打包了,

  • export_method是在Fastlane工具中使用的命令,指定导出iOS应用存档的方法,以及可用的配置文件和签名证书。
    以下是几种导出存档方法:
    • app-store:提交到应用商店的存档
    • development:用于开发目的的存档
    • ad-hoc:用于分发给有权限的设备或用户的存档
    • enterprise:公司内部网络分发的存档
  • configuration构建方式:分Release和Debug
  • scheme:
    在这里插入图片描述
  • output_directory:输出文件夹地址
  • desc、puts:信息描述

打开终端进入到项目fastlane文件夹上一级,输入以下命令即可打一个以 development 方式打包并上传到蒲公英的包。

fastlane test_beta

4、Pluginfile文件

一般安装好蒲公英插件后会默认生成

# Autogenerated by fastlane
#
# Ensure this file is checked in to source control!gem 'fastlane-plugin-pgyer'

四、项目工程配置Fastlane

1、递增版本号配置
  • 修改Build Settings中的Versioning配置,Current Project Version随便填一个,Versioning System选择Apple Generic
    在这里插入图片描述
  • 修改info.plist File路径
    在这里插入图片描述

五、Fastlane执行

做 fastlane 命令的时候都是在项目的根目录下进行的,打开终端进入到项目fastlane文件夹上一级。

  • 1,获取到所有的 lane
fastlane lanes

2、账号权限

  • 1,Adding a Credential(添加凭证)
    //输入命令:
fastlane fastlane-credentials add --username felix@krausefx.com

//会自动要求输入密码:App-Specific Passwords
Password: *********(这里就是要输入刚刚生成的App-Specific Passwords)

如果手动输入错误:请执行以下命令:删除账号,再重复添加凭证,完成添加

  • 2,Removing a Credential(移除凭证)
fastlane fastlane-credentials remove --username felix@krausefx.com

//password has been deleted.

三、总结

工具的使用没有什么技术含量,想研究fastlane代码可参考github

四、常见问题归纳

  • 1,账号权限问题,重复一下上面账号权限模块,移除凭证,添加凭证的命令步骤
[!] Error uploading ipa file:[Application Loader Error Output]: Error uploading '/var/folders/sp/_4jyc68d0hvbm70nm50ljvvw0000gp/T/3a982536-cad1-483e-8b64-5c74740a168f.ipa'.
[Application Loader Error Output]: Unable to upload archive. Failed to get authorization for username 'xxx@126.com' and password. (
[Application Loader Error Output]: The call to the altool completed with a non-zero exit status: 1. This indicates a failure.
http://www.yayakq.cn/news/407397/

相关文章:

  • 建设网站具备的知识建设部网站社保联网
  • 建设网站杭州云南省网站备案
  • 2018年公司做网站注意事项关键词林俊杰的寓意
  • 营销型网站建设信融成都有什么好玩的吗
  • 做网站的电脑软件开发项目经理的职责
  • 网站建设销售前景足球积分排行榜最新
  • 凡科建站容易吗网站链接锚点怎么做
  • 怎么用vps的linux做网站企业网络方案的规划和设计
  • 怎样创建网站怎么做购物网站的购物车
  • 外贸汽车网站数控编程培训
  • 网站访客qq抓取统计系统怎么做网站做站点
  • 信息流优化师是做什么的搜索引擎优化实验报告
  • 机票网站开发知乎温州网站设计定制
  • 广州和信建设公司网站做网站是否需要自购服务器
  • 全国建设管理信息网站怎样做网络推广方法
  • 德吉机械东莞网站建设wordpress企业主题模板下载
  • 南阳市建设局网站南阳网站建设优化
  • wordpress子目录站点网站是用sql2012做的_在发布时可以改变为2008吗
  • chrome网站开发插件标书制作注意事项
  • 舟山网站网站建设wordpress虚线框
  • 通州建设局网站车载cms是什么意思
  • 周到的网站建设推广江西做企业网站的公司
  • 国内的优秀设计网站wordpress网站设置关键词
  • 怎样把自己的网站推广出去建设网站设计
  • 网站建设都包括哪些wordpress 4.0 打开慢
  • 图片瀑布流网站中山seo推广优化
  • 万链网站做的怎么样常宁seo外包
  • 怎么做网站的apiwordpress 关键词链接插件
  • 成都前几年网站建设公司电脑浏览器打不开怎么回事
  • 滁州网站设计国外网站打开速度慢的原因