如何在不使用xcode的情况下生成xml格式的权利?

我必须build立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设置variables提供即可。

这个库将会创build一个你可以用来编码的xcent文件。

https://github.com/sotownsend/iarrogant

注:我没有testing过这个库。

您还可以从xcodebuild创build的ipa中获取生成的xcent文件,并使用它来签署将来的版本。 随着权利更改,您将不得不保持这些文件的同步。