智慧 + 毅力 = 无所不能

正确性、健壮性、可靠性、效率、易用性、可读性、可复用性、兼容性、可移植性...
随笔 - 991, 文章 - 0, 评论 - 27, 阅读 - 341万

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

UE4 window打包ios备忘

Posted on   Bill Yuan  阅读(2082)  评论(0编辑  收藏  举报

 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

(评论功能已被禁用)
编辑推荐:
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
阅读排行:
· 地球OL攻略 —— 某应届生求职总结
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· .NET周刊【3月第1期 2025-03-02】
· [AI/GPT/综述] AI Agent的设计模式综述
历史上的今天:
2017-11-07 俞敏洪:我创业24年感悟的3条CEO守则
2017-11-07 做开发十年,我总结出了这些开发经验
2017-11-07 UE4如何检测目标在锥形视野内
2017-11-07 UE4 几个好用的插件和Wiki教程
点击右上角即可分享
微信分享提示