在这方面我找不到任何相关的信息(也许是我使用了错误的搜索关键词..):
我们正在尝试为我们的应用程序构建一个合理的持续集成环境。为了有一个真正明智的实现,构建服务器应该能够通过命令行自动刷新所使用的苹果设备配置文件,类似于X-Code组织者的功能,但是自动化的。
是否有任何线索表明这是可能的?
在这方面我找不到任何相关的信息(也许是我使用了错误的搜索关键词..):
我们正在尝试为我们的应用程序构建一个合理的持续集成环境。为了有一个真正明智的实现,构建服务器应该能够通过命令行自动刷新所使用的苹果设备配置文件,类似于X-Code组织者的功能,但是自动化的。
是否有任何线索表明这是可能的?
以下是我的bash脚本,其中脚本的第一个参数($1)代表新配置文件的位置。
rm -Rf ~/Library/MobileDevice/Provisioning\ Profiles/*
cp "$1"/*.* ~/Library/MobileDevice/Provisioning\ Profiles/
基本上,那个~/Library/MobileDevice/Provisioning Profiles/文件夹中的任何内容都可以用来进行构建(并将显示在Xcode中)。
如果您想搭建一个CI系统,我最近就如何使用Hudson进行演示,并发布了一些幻灯片和笔记在这里。如果您有任何问题,请发送电子邮件给我,我的电子邮件地址在我的网站上。
<provid>.mobileprovision
,这是在使用XCode(我使用的是4.2)导入文件时发生的事情。这意味着对于xcrun ... PackageApplication
命令中的 --embed
参数可以保持稳定,从而使自动化变得更加容易。 - ckhanios profiles:download:all --type distribution
另一种方法是使用企业开发许可证(每年$300),该许可证允许您为设备构建应用程序而无需进行任何配备!因此,您可以构建您的应用程序,并将其发送到设备,而无需去苹果开发中心或注册任何新设备。ios profiles:download:all --distribution
即可轻松完成。 - Tomasz DubikFastlane
开发的一个工具 sigh
的链接,用于管理配置文件(创建、下载、更新、修复):https://github.com/fastlane/fastlane/tree/master/sigh#readme - Toland Hon尝试使用https://github.com/lacostej/apple-dev中的apple_dev_center.rb。
它可以解析苹果开发者网站上的信息,并自动下载配置文件,使您可以将它们复制到正确的位置。
我一直在尝试让这个工作起来,终于成功了!
可以使用fastlane sigh仅下载和安装你需要的临时配置文件。
fastlane sigh renew --adhoc -n "provisional_profile_name"
--app_identifier "your_app_identifier" -u "apple_login _username" --ignore_profiles_with_different_name
Sigh
可以为您管理配置文件。但是,它不支持安装您已经获取的配置文件。然而,我仍然发现查看他们的源代码以了解他们如何在下载后安装配置文件非常有价值。def self.install_profile(profile)
UI.message "Installing provisioning profile..."
profile_path = File.expand_path("~") + "/Library/MobileDevice/Provisioning Profiles/"
uuid = ENV["SIGH_UUID"] || ENV["SIGH_UDID"]
profile_filename = uuid + ".mobileprovision"
destination = profile_path + profile_filename
# If the directory doesn't exist, make it first
unless File.directory?(profile_path)
FileUtils.mkdir_p(profile_path)
end
# copy to Xcode provisioning profile directory
FileUtils.copy profile, destination
if File.exist? destination
UI.success "Profile installed at \"#{destination}\""
else
UI.user_error!("Failed installation of provisioning profile at location: #{destination}")
end
end
我有一个脚本可以为我执行本地安装:
#!/bin/bash -euo pipefail
BASH_SOURCE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$BASH_SOURCE_DIR"
# by default bash passes the glob characters if nothing matched the glob
# disable that
# https://dev59.com/h2Mk5IYBdhLWcg3w3xvq#18887210
shopt -s nullglob
# this creates a proper bash array, which we need since our profiles
# have funny characters in them
MOBILE_PROVISIONS=(*.mobileprovision)
# re-enable default nullglob behavior
shopt -u nullglob
# On a brand new machine that has never run any app on a development device
# the ~/Library/MobileDevice/"Provisioning Profiles" directory doesn't exist
mkdir -p ~/Library/MobileDevice/"Provisioning Profiles"
for mobileprovision in "${MOBILE_PROVISIONS[@]}"
do
uuid=$( ./uuid-from-mobileprovision.bash "${mobileprovision}" )
cp "${mobileprovision}" ~/Library/MobileDevice/"Provisioning Profiles"/"${uuid}".mobileprovision
done
这取决于另一个名为uuid-from-mobileprovision.bash
的脚本:
#!/bin/bash -euo pipefail
if [ ! -f "${1}" ]
then
echo "Usage: $0 <path/to/mobileprovision/file>" 1>&2
exit 1
fi
UUID=$( grep --text --after-context=1 UUID "${1}" | grep --ignore-case --only-matching "[-A-Z0-9]\{36\}" )
if [ -z "${UUID}" ]
then
echo "Invalid mobileprovision file: ${1}" 1>&2
exit 2
else
echo "${UUID}"
fi
user_details_data
的权限。 - Elliott B
$ open vnc://server
;-) - mpontillo