更新Xcode8.3后,选项' -exportSigningIdentity ',' -exportProvisioningProfile '和' -exportFormat '已从' xcodebuild -exportArchive '中删除。
当我尝试获取分发应用时,我收到以下错误:
xcodebuild:错误:无效选项' -exportProvisioningProfile'。
那么当项目设置启用自动签名时,如何从MyApp.xcarchive获取分发MyApp.ipa?
答案 0 :(得分:22)
听起来您想要从现有的xcarchive在命令行上创建IPA。从Xcode 7开始,首选的方法是(来自Sub advancedMultipleCriteriaFilter()
Dim cellRng As Range, tableObject As Range, subSelection As Range
Dim filterCriteria() As String, filterFields() As Integer
Dim i As Integer
Application.ScreenUpdating = False
'Call removeSpace
If Selection.Rows.Count > 1 Then
MsgBox "Cannot apply filter to multiple rows within the same column. Please make another selection and try again.", vbInformation, "Selection Error!"
Exit Sub
End If
i = 1
ReDim filterCriteria(1 To Selection.Cells.Count) As String
ReDim filterFields(1 To Selection.Cells.Count) As Integer
Set tableObject = Selection.CurrentRegion
For Each subSelection In Selection.Areas
For Each cellRng In subSelection
filterCriteria(i) = cellRng.Text
filterFields(i) = cellRng.Column - tableObject.Cells(1, 1).Column + 1
i = i + 1
Next cellRng
Next subSelection
With tableObject
For i = 1 To UBound(filterCriteria)
.AutoFilter field:=filterFields(i), Criteria1:=filterCriteria(i)
Next i
End With
Call GetLastRow
Set tableObject = Nothing
Application.ScreenUpdating = True
End Sub
Sub resetFilters()
Dim sht As Worksheet
Dim LastRow As Range
Application.ScreenUpdating = False
On Error Resume Next
If ActiveSheet.FilterMode Then
ActiveSheet.ShowAllData
End If
Range("A3:T3").ClearContents
Application.ScreenUpdating = True
Call GetLastRow
End Sub
Private Sub GetLastRow()
'Step 1: Declare Your Variables.
Dim LastRow As Long
'Step 2: Capture the last used row number.
LastRow = Cells(Rows.Count, 8).End(xlUp).Row
'Step 3: Select the next row down
Cells(LastRow, 8).Offset(1, 0).Select
End Sub
):
man xcodebuild
所以在你的情况下:
xcodebuild -exportArchive -archivePath xcarchivepath -exportPath destinationpath -exportOptionsPlist path
exportOptions.plist是一个PLIST文件,其中包含配置IPA导出的各种参数。有关所有可用选项,请参阅xcodebuild -exportArchive -archivePath MyApp.xcarchive -exportPath MyApp.ipa -exportOptionsPlist exportOptions.plist
。您必须至少指定xcodebuild -help
的条目(app-store,ad-hoc,enterprise等 - 默认为开发)。如果您只想导出App-Store分发,该文件应如下所示:
method
答案 1 :(得分:2)
只需替换此参数:
-exportProvisioningProfile" MyProvisioningProfile"
使用:
PROVISIONING_PROFILE_SPECIFIER =" MyProvisioningProfile"
希望它有所帮助。
答案 2 :(得分:0)
设置Automatic Signing Enabled
时,Xcode会根据配置文件自动生成。
但是为了让你的命令工作,你需要第一次手动导出存档。 完成后,Xcode将生成配置文件(它在Apple Developer网站上以“XC”开头)。
然后您的xcodebuild
命令将起作用。
产品 - > 存档强>
一旦完成
Windows - > 组织者 - > 选择最新版本 - > 导出(上传到App Store 下的右侧pannel)
如果您需要其他信息,请随时通知我。