我必须构建 ios 应用程序,但不使用 xcode。 问题在于向应用程序传递权利。
我的权利文件如下所示:
<?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>keychain-access-groups</key>
<array>
<string>$(AppIdentifierPrefix)com.domain</string>
</array>
</dict>
</plist>
xcode 将其格式化为这个(.xcent 文件):
<?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>application-identifier</key>
<string>A1B2C3D4E5.product.name</string>
<key>com.apple.developer.team-identifier</key>
<string>E5D4C3B2E1</string>
<key>get-task-allow</key>
<true/>
<key>keychain-access-groups</key>
<array>
<string>A1B2C3D4E5.com.domain</string>
</array>
</dict>
</plist>
使用命令:
builtin-productPackagingUtility app.entitlements -entitlements -format xml -o ${HOME}/Library/Developer/Xcode/DerivedData/app//Build/Intermediates/app.build/Debug-iphoneos/app.build/app.xcent
谁能解释一下这个命令到底做了什么以及我如何手动调用它?或者我怎样才能用手模拟这个命令调用?
谢谢。
最佳答案
如果您可以使用xcodebuild
,builtin-productPackagingUtility
将作为一个步骤被调用。您只需在命令行中提供权利作为build设置变量。
关于ios - 如何在没有 xcode 的情况下生成 xml 格式的权利?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24364406/