Install IPA 0xE8008029 Error

使用最新的苹果开发者证书(2021.07.11)打包的 IPA 安装时具有错误:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
[DD] Mobile Device 'iPhone' connected
Trying to connect to mobile device running iOS ...
Transferring IPA to device 'iPhone' ...
... Transfer is 10% complete at phase 'TransferringPackage'
... Transfer is 20% complete at phase 'CopyingFile'
... Transfer is 30% complete at phase 'CopyingFile'
... Transfer is 40% complete at phase 'CopyingFile'
... Transfer is 50% complete at phase 'CopyingFile'
... Transfer is 60% complete at phase 'CopyingFile'
... Transfer is 80% complete at phase 'CopyingFile'
Installing IPA on device 'iPhone' ...
... Install is 5% complete at phase 'CreatingStagingDirectory'
... Install is 20% complete at phase 'InspectingPackage'
... Install is 40% complete at phase 'VerifyingApplication'
Install \ Update of "Blank425.ipa" failed with Unknown error 0xE8008029 in 13.65 seconds

或者有 0xE8008019 的错误:

1
2
3
4
5
Installing IPA on device 'iPhone' ...
... Install is 5% complete at phase 'CreatingStagingDirectory'
... Install is 20% complete at phase 'InspectingPackage'
... Install is 40% complete at phase 'VerifyingApplication'
Install \ Update of "Blank425.ipa" failed with Missing or invalid code signature (0xE8008019) in 0.27 seconds

这是因为使用了老的代码格式签名导致的。

在 UE4.25 中,cVersion2的值:

1
2
3
4
5
public class CodeDirectoryBlob : AbstractBlob
{
public const UInt32 cVersion2 = 0x20200;
// ...
}

在 4.27 中 IPhonePackager 做了修正,使用之前版本的 UE 打包出来的 IPA 使用 4.27 之后的 IPhonePackager 进行 re-signing 即可安装。

re-signing log:

我提取了 UE4.27 的 iPhonePackager 的代码和编译的可执行程序: