UE4 ios环境搭建备忘

1、windows、mac安装证书

2、安装xcode

sudo xcode-select --switch /Applications/Xcode10.1.app   -- 路径可以拖入
sudo gem install xcodeproj

3、错误处理

Setting up Mono
    Running command : Engine/Binaries/DotNET/UnrealBuildTool.exe ZBGame IOS Development -SkipRulesCompile -XmlConfigCache=/Users/jb-mac/UE4/Builds/DESKTOP-H8OVF9H/E/PWMGame/3DS2Game/Branches/3DS2Inland190918Final/Engine/Engine/Intermediate/Build/XmlConfigCache.bin -remoteini=/Users/jb-mac/UE4/Builds/DESKTOP-H8OVF9H/E/PWMGame/3DS2Game/Branches/3DS2Inland190918Final/Client -Project=/Users/jb-mac/UE4/Builds/DESKTOP-H8OVF9H/E/PWMGame/3DS2Game/Branches/3DS2Inland190918Final/Client/ZBGame.uproject -skipdeploy -Log=/Users/jb-mac/UE4/Builds/DESKTOP-H8OVF9H/E/PWMGame/3DS2Game/Branches/3DS2Inland190918Final/Engine/Engine/Programs/AutomationTool/Saved/Logs/UBT-ZBGame-IOS-Development_Remote.txt -Manifest=/Users/jb-mac/UE4/Builds/DESKTOP-H8OVF9H/E/PWMGame/3DS2Game/Branches/3DS2Inland190918Final/Client/Intermediate/Remote/ZBGame/IOS/Development/Manifest.xml -CreateStub -NoUBTMakefiles -ImportProvision=/Users/jb-mac/UE4/Builds/DESKTOP-H8OVF9H/E/PWMGame/3DS2Game/Branches/3DS2Inland190918Final/Client/Intermediate/Remote/ZBGame/IOS/Development/dev_zb1.mobileprovision -ImportCertificate=/Users/jb-mac/UE4/Builds/DESKTOP-H8OVF9H/E/PWMGame/3DS2Game/Branches/3DS2Inland190918Final/Client/Intermediate/Remote/ZBGame/IOS/Development/Certificate.p12 -ImportCertificatePassword=A
    *** EMSCRIPTEN_ROOT directory NOT FOUND: /Users/jb-mac/UE4/Builds/DESKTOP-H8OVF9H/E/PWMGame/3DS2Game/Branches/3DS2Inland190918Final/Engine/Engine/Extras/ThirdPartyNotUE/emsdk/emscripten/1.38.20
    *** NODE_JS NOT FOUND: /Users/jb-mac/UE4/Builds/DESKTOP-H8OVF9H/E/PWMGame/3DS2Game/Branches/3DS2Inland190918Final/Engine/Engine/Extras/ThirdPartyNotUE/emsdk/Mac/node/8.9.1_64bit/bin/node
    *** LLVMROOT directory NOT FOUND: /Users/jb-mac/UE4/Builds/DESKTOP-H8OVF9H/E/PWMGame/3DS2Game/Branches/3DS2Inland190918Final/Engine/Engine/Extras/ThirdPartyNotUE/emsdk/Mac/clang/e1.38.20_64bit
    ZBGame IOS Development -SkipRulesCompile -XmlConfigCache=/Users/jb-mac/UE4/Builds/DESKTOP-H8OVF9H/E/PWMGame/3DS2Game/Branches/3DS2Inland190918Final/Engine/Engine/Intermediate/Build/XmlConfigCache.bin -remoteini=/Users/jb-mac/UE4/Builds/DESKTOP-H8OVF9H/E/PWMGame/3DS2Game/Branches/3DS2Inland190918Final/Client -Project=/Users/jb-mac/UE4/Builds/DESKTOP-H8OVF9H/E/PWMGame/3DS2Game/Branches/3DS2Inland190918Final/Client/ZBGame.uproject -skipdeploy -Log=/Users/jb-mac/UE4/Builds/DESKTOP-H8OVF9H/E/PWMGame/3DS2Game/Branches/3DS2Inland190918Final/Engine/Engine/Programs/AutomationTool/Saved/Logs/UBT-ZBGame-IOS-Development_Remote.txt -Manifest=/Users/jb-mac/UE4/Builds/DESKTOP-H8OVF9H/E/PWMGame/3DS2Game/Branches/3DS2Inland190918Final/Client/Intermediate/Remote/ZBGame/IOS/Development/Manifest.xml -CreateStub -NoUBTMakefiles -ImportProvision=/Users/jb-mac/UE4/Builds/DESKTOP-H8OVF9H/E/PWMGame/3DS2Game/Branches/3DS2Inland190918Final/Client/Intermediate/Remote/ZBGame/IOS/Development/dev_zb1.mobileprovision -ImportCertificate=/Users/jb-mac/UE4/Builds/DESKTOP-H8OVF9H/E/PWMGame/3DS2Game/Branches/3DS2Inland190918Final/Client/Intermediate/Remote/ZBGame/IOS/Development/Certificate.p12 -ImportCertificatePassword=A
    Triggered an exception while looking for SDK directory in Xcode.app
    System.IO.DirectoryNotFoundException: Could not find a part of the path '/Applications/xcode10.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs'.
      at System.IO.__Error.WinIOError (System.Int32 errorCode, System.String maybeFullPath) [0x000f7] in <98fac219bd4e453693d76fda7bd96ab0>:0
      at System.IO.FileSystemEnumerableIterator`1[TSource].HandleError (System.Int32 hr, System.String path) [0x00006] in <98fac219bd4e453693d76fda7bd96ab0>:0
      at System.IO.FileSystemEnumerableIterator`1[TSource].CommonInit () [0x00054] in <98fac219bd4e453693d76fda7bd96ab0>:0
      at System.IO.FileSystemEnumerableIterator`1[TSource]..ctor (System.String path, System.String originalUserPath, System.String searchPattern, System.IO.SearchOption searchOption, System.IO.SearchResultHandler`1[TSource] resultHandler, System.Boolean checkHost) [0x000d6] in <98fac219bd4e453693d76fda7bd96ab0>:0
      at System.IO.FileSystemEnumerableFactory.CreateFileNameIterator (System.String path, System.String originalUserPath, System.String searchPattern, System.Boolean includeFiles, System.Boolean includeDirs, System.IO.SearchOption searchOption, System.Boolean checkHost) [0x00009] in <98fac219bd4e453693d76fda7bd96ab0>:0
      at System.IO.Directory.InternalGetFileDirectoryNames (System.String path, System.String userPathOriginal, System.String searchPattern, System.Boolean includeFiles, System.Boolean includeDirs, System.IO.SearchOption searchOption, System.Boolean checkHost) [0x00000] in <98fac219bd4e453693d76fda7bd96ab0>:0
      at System.IO.Directory.InternalGetDirectories (System.String path, System.String searchPattern, System.IO.SearchOption searchOption) [0x00000] in <98fac219bd4e453693d76fda7bd96ab0>:0
      at System.IO.Directory.GetDirectories (System.String path) [0x0000e] in <98fac219bd4e453693d76fda7bd96ab0>:0
      at UnrealBuildTool.AppleToolChainSettings.SelectSDK (System.String BaseSDKDir, System.String OSPrefix, System.String& PlatformSDKVersion, System.Boolean bVerbose) [0x00018] in <ce47cf5825fd4d26bbf096f28ea5583c>:0
    ERROR: Invalid SDK MacOSX.sdk, not found in /Applications/xcode10.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
  [Remote] Downloading E:PWMGame3DS2GameBranches3DS2Inland190918FinalEngineEngineProgramsAutomationToolSavedLogsUBT-ZBGame-IOS-Development_Remote.txt
  Total execution time: 808.22 seconds

原文地址:https://www.cnblogs.com/sevenyuan/p/11581538.html