UE4 window打包ios備忘


 1、生成SHH key

2、安裝證書 *.cer,*.p12

 

以下轉自:http://wangjie.rocks/2017/11/30/ue4-ios-build-on-windows/

問題一

1
2
3
ssh_exchange_identification: Connection closed by remote host
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /home/lapo/packaging/rsync-3.0.4-1/src/rsync-3.0.4/io.c(632) [sender=3.0.4]

 

 

解決方法

首先保證遠程機器 OSX 上的 ssh 並發數配置足夠,使用命令查看

1
grep MaxStartups /etc/ssh/sshd_config

 

 

一般輸出如下格式 10/20/30 意思是連接達到10之后以20%的概率拒絕新連接直到30為止,可以根據需求調大第一個值並重啟

其次保證 RemoteToolChainPrivate.key 文件存在於 C:\Users\用戶名\AppData\Roaming\Unreal Engine\UnrealBuildTool\SSHKeys\遠程機器地址\mac 文件夾下,沒有的話需要在 Edit -> Project Settings... -> Platforms -> iOS -> Build 中進行配置,配置好遠程 OSX 機器的地址,用戶名,然后點擊 Generate SSH Key 生成

問題二

編譯失敗,出現如下錯誤

1
clang: error: argument unused during compilation: '-fno-objc-exceptions' [-Werror,-Wunused-command-line-argument]

 

解決方法

修改 Engine\Source\Programs\UnrealBuildTool\Platform\IOS\IOSToolChain.cs 文件,在 GetCompileArguments_Global 函數中增加 Result += " -Wno-unused-command-line-argument"; 禁用這個錯誤警告

問題三

出 Shipping 包出現鏈接錯誤,如下

1
2
3
ld: bitcode bundle could not be generated because '/Users/mac/UE4/Builds/xxx/Engine/Source/ThirdParty/PLCrashReporter/plcrashreporter-master-5ae3b0a/IOS/Release/libCrashReporter-iphoneos.a(libCrashReporter-iphoneos.a-arm64-master.o)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build for architecture arm64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

解決方法

目前的解決方法是在 Edit -> Project Settings... -> Platforms -> iOS -> Build 中取消 Support bitcode in Shipping

問題四

IPA 打包失敗,錯誤如下

1
IPP ERROR: Application exception: System.Security.Cryptography.CryptographicException ...

 

解決方法

Edit -> Project Settings... -> Platforms -> iOS -> Mobile Provision 中添加描述文件和證書,或者直接打開 Engine\Binaries\DotNET\IOS\IPhonePackager.exe 進行添加

描述文件和證書生成見官方文檔

問題五

以下轉自:https://www.cnblogs.com/kittywei/articles/7059993.html

System.Security.Cryptography.CryptographicException:該項不適於在指定狀態下使用

當 RSACryptoProvider 創建了密鑰文件但由於權限不足而無法刪除該密鑰文件時,會導致此錯誤;

解決方法 

方法1、若要更正此錯誤,請確認代理服務帳戶對“Documents and Settings”文件夾中 RSA 計算機密鑰文件夾(例如,C:\Documents and Settings\%userName%\AppData\Roaming\Microsoft\Crypto\RSA)的“完全控制”權限設置為“允許”。

方法2、C:\Documents and Settings\%userName%\AppData\Roaming\Microsoft\的Crypto目錄給刪掉,重新生成key

 

Windows 遠程編譯iOS若干問題

原文
http://wangjie.rocks/2017/11/30/ue4-ios-build-on-windows/

問題一
ssh_exchange_identification: Connection closed by remote hostrsync: connection unexpectedly closed (0 bytes received so far) [sender]rsync error: error in rsync protocol data stream (code 12) at /home/lapo/packaging/rsync-3.0.4-1/src/rsync-3.0.4/io.c(632) [sender=3.0.4] 

解決方法

首先保證遠程機器 OSX 上的 ssh 並發數配置足夠,使用命令查看

grep MaxStartups /etc/ssh/sshd_config 

一般輸出如下格式 10/20/30 意思是連接達到10之后以20%的概率拒絕新連接直到30為止,可以根據需求調大第一個值並重啟

其次保證 RemoteToolChainPrivate.key 文件存在於 C:\Users\用戶名\AppData\Roaming\Unreal Engine\UnrealBuildTool\SSHKeys\遠程機器地址\mac 文件夾下,沒有的話需要在 Edit -> Project Settings… -> Platforms -> iOS -> Build 中進行配置,配置好遠程 OSX 機器的地址,用戶名,然后點擊 Generate SSH Key 生成

問題二

編譯失敗,出現如下錯誤

clang: error: argument unused during compilation: '-fno-objc-exceptions' [-Werror,-Wunused-command-line-argument] 

解決方法

修改 Engine\Source\Programs\UnrealBuildTool\Platform\IOS\IOSToolChain.cs 文件,在 GetCompileArguments_Global 函數中增加 Result += “ -Wno-unused-command-line-argument”; 禁用這個錯誤警告

問題三

出 Shipping 包出現鏈接錯誤,如下

ld: bitcode bundle could not be generated because '/Users/mac/UE4/Builds/xxx/Engine/Source/ThirdParty/PLCrashReporter/plcrashreporter-master-5ae3b0a/IOS/Release/libCrashReporter-iphoneos.a(libCrashReporter-iphoneos.a-arm64-master.o)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build for architecture arm64clang: error: linker command failed with exit code 1 (use -v to see invocation) 

解決方法

目前的解決方法是在 Edit -> Project Settings… -> Platforms -> iOS -> Build 中取消 Support bitcode in Shipping

問題四

IPA 打包失敗,錯誤如下

IPP ERROR: Application exception: System.Security.Cryptography.CryptographicException ... 

解決方法

Edit -> Project Settings… -> Platforms -> iOS -> Mobile Provision 中添加描述文件和證書,或者直接打開 Engine\Binaries\DotNET\IOS\IPhonePackager.exe 進行添加

描述文件和證書生成見官方文檔

問題五

IPA打包失敗,錯誤提示:

doesn't match the entitlements file's value for the get-task-allow entitlement. 

解決辦法

TARGETS -> Capabilities 的開關全部關掉,然后重新build。如果需要開啟這些Capabilities,先構建成功一次后再開啟。

 

參考:
doesn’t match the entitlements file’s value for the get-task-allow entitlement.
https://www.jianshu.com/p/011670421594

iOS .entitlements文件
https://www.jianshu.com/p/24e55f608004


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM