Download

AR Template won't build - 4.20.3 - iPhoneXs - iOS 12 - Xcode10

Hi there,

I’m extremely new to building for mobile devices so I apologise if I’m doing something silly!

So I’ve been assigned to my companies apple dev account, I have my certificates and provisions setup. I load the AR template and link all my apple stuff into the Project settings. I then go to ‘launch’ on my phone and when it goes to deploy it fails.

Log attached

[SPOILER]LogPlayLevel: Build settings from command line:
LogPlayLevel: CODE_SIGN_IDENTITY = iPhone Developer: removed
LogPlayLevel: PROVISIONING_PROFILE_SPECIFIER = bec1467c-6d38-4750-a874-5901490cc9b8
LogPlayLevel: SDKROOT = iphoneos12.0
LogPlayLevel: 2018-10-03 16:53:47.771 xcodebuild[25517:136488] +dataWithFirstBytes:1024 ofFile:"/Users/Shared/Epic Games/UE_4.20/Engine/Config/BaseEditorLayout.ini" failed, errno = 2
LogPlayLevel: 2018-10-03 16:53:47.832 xcodebuild[25517:136488] +dataWithFirstBytes:1024 ofFile:"/Users/Shared/Epic Games/UE_4.20/Engine/Plugins/Experimental/AlembicImporter/Source/ThirdParty/Alembic/alembic/houdini/SOP_AlembicIn/OPalembic/Object_1alembicarchive/Help" failed, errno = 2
LogPlayLevel: 2018-10-03 16:53:47.835 xcodebuild[25517:136488] +dataWithFirstBytes:1024 ofFile:"/Users/Shared/Epic Games/UE_4.20/Engine/Plugins/Experimental/AlembicImporter/Source/ThirdParty/Alembic/alembic/houdini/SOP_AlembicIn/OPalembic/Object_1alembicxform/Help" failed, errno = 2
LogPlayLevel: 2018-10-03 16:53:48.154 xcodebuild[25517:136488] +dataWithFirstBytes:1024 ofFile:"/Users/Shared/Epic Games/UE_4.20/Engine/Plugins/Experimental/AlembicImporter/Source/ThirdParty/Alembic/hdf5/tools/testfiles/tmulti-g.h5" failed, errno = 2
LogPlayLevel: 2018-10-03 16:53:48.163 xcodebuild[25517:136488] +dataWithFirstBytes:1024 ofFile:"/Users/Shared/Epic Games/UE_4.20/Engine/Plugins/Experimental/AlembicImporter/Source/ThirdParty/Alembic/hdf5/tools/testfiles/tnoddlfile.ddl" failed, errno = 2
LogPlayLevel: 2018-10-03 16:53:48.197 xcodebuild[25517:136488] +dataWithFirstBytes:1024 ofFile:"/Users/Shared/Epic Games/UE_4.20/Engine/Plugins/Experimental/AlembicImporter/Source/ThirdParty/Alembic/hdf5/tools/testfiles/twithddlfile.ddl" failed, errno = 2
LogPlayLevel: 2018-10-03 16:53:49.849 xcodebuild[25517:136488] +dataWithFirstBytes:1024 ofFile:"/Volumes/Mainframe/Jobs/0000_Internal/0000 Are we AR/Scenes/UE4/ARTest/Config/DefaultEditor.ini" failed, errno = 2
LogPlayLevel: note: Using new build system
LogPlayLevel: note: Planning build
LogPlayLevel: note: Constructing build description
LogPlayLevel: ProcessProductPackaging /Users/dannyprice/Library/MobileDevice/Provisioning\ Profiles/UE4_Prov.mobileprovision /Volumes/Mainframe/Jobs/0000_Internal/0000\ Are\ we\ AR/Scenes/UE4/ARTest/Binaries/IOS/Payload/ARTest.app/embedded.mobileprovision (in target: ARTest)
LogPlayLevel: cd /Volumes/Mainframe/Jobs/0000_Internal/0000\ Are\ we\ AR/Scenes/UE4/ARTest/Intermediate/ProjectFilesIOS
LogPlayLevel: builtin-productPackagingUtility /Users/dannyprice/Library/MobileDevice/Provisioning\ Profiles/UE4_Prov.mobileprovision -o /Volumes/Mainframe/Jobs/0000_Internal/0000\ Are\ we\ AR/Scenes/UE4/ARTest/Binaries/IOS/Payload/ARTest.app/embedded.mobileprovision
LogPlayLevel: WriteAuxiliaryFile /Volumes/Mainframe/Jobs/0000_Internal/0000\ Are\ we\ AR/Scenes/UE4/ARTest/Intermediate/ProjectFilesIOS/build/ARTest.build/Development-iphoneos/ARTest.build/DerivedSources/Entitlements.plist (in target: ARTest)
LogPlayLevel: cd /Volumes/Mainframe/Jobs/0000_Internal/0000\ Are\ we\ AR/Scenes/UE4/ARTest/Intermediate/ProjectFilesIOS
LogPlayLevel: write-file /Volumes/Mainframe/Jobs/0000_Internal/0000\ Are\ we\ AR/Scenes/UE4/ARTest/Intermediate/ProjectFilesIOS/build/ARTest.build/Development-iphoneos/ARTest.build/DerivedSources/Entitlements.plist
LogPlayLevel: ProcessProductPackaging “” /Volumes/Mainframe/Jobs/0000_Internal/0000\ Are\ we\ AR/Scenes/UE4/ARTest/Intermediate/ProjectFilesIOS/build/ARTest.build/Development-iphoneos/ARTest.build/ARTest.app.xcent (in target: ARTest)
LogPlayLevel: cd /Volumes/Mainframe/Jobs/0000_Internal/0000\ Are\ we\ AR/Scenes/UE4/ARTest/Intermediate/ProjectFilesIOS
LogPlayLevel: Entitlements:
LogPlayLevel: {
LogPlayLevel: “application-identifier” = “removed”;
LogPlayLevel: “com.apple.developer.team-identifier” = removed;
LogPlayLevel: “get-task-allow” = 1;
LogPlayLevel: }
LogPlayLevel: builtin-productPackagingUtility -entitlements -format xml -o /Volumes/Mainframe/Jobs/0000_Internal/0000\ Are\ we\ AR/Scenes/UE4/ARTest/Intermediate/ProjectFilesIOS/build/ARTest.build/Development-iphoneos/ARTest.build/ARTest.app.xcent
LogPlayLevel: ProcessInfoPlistFile /Volumes/Mainframe/Jobs/0000_Internal/0000\ Are\ we\ AR/Scenes/UE4/ARTest/Binaries/IOS/Payload/ARTest.app/Info.plist /Volumes/Mainframe/Jobs/0000_Internal/0000\ Are\ we\ AR/Scenes/UE4/ARTest/Intermediate/IOS/ARTest-Info.plist (in target: ARTest)
LogPlayLevel: cd /Volumes/Mainframe/Jobs/0000_Internal/0000\ Are\ we\ AR/Scenes/UE4/ARTest/Intermediate/ProjectFilesIOS
LogPlayLevel: builtin-infoPlistUtility /Volumes/Mainframe/Jobs/0000_Internal/0000\ Are\ we\ AR/Scenes/UE4/ARTest/Intermediate/IOS/ARTest-Info.plist -genpkginfo /Volumes/Mainframe/Jobs/0000_Internal/0000\ Are\ we\ AR/Scenes/UE4/ARTest/Binaries/IOS/Payload/ARTest.app/PkgInfo -expandbuildsettings -format xml -platform iphoneos -requiredArchitecture arm64
-o /Volumes/Mainframe/Jobs/0000_Internal/0000\ Are\ we\ AR/Scenes/UE4/ARTest/Binaries/IOS/Payload/ARTest.app/Info.plist
LogPlayLevel: CodeSign /Volumes/Mainframe/Jobs/0000_Internal/0000\ Are\ we\ AR/Scenes/UE4/ARTest/Binaries/IOS/Payload/ARTest.app (in target: ARTest)
LogPlayLevel: cd /Volumes/Mainframe/Jobs/0000_Internal/0000\ Are\ we\ AR/Scenes/UE4/ARTest/Intermediate/ProjectFilesIOS
LogPlayLevel: export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
LogPlayLevel: Signing Identity: “iPhone Developer: removed
LogPlayLevel: Provisioning Profile: “UE4_Prov”
LogPlayLevel: (bec1467c-6d38-4750-a874-5901490cc9b8)
LogPlayLevel: /usr/bin/codesign --force --sign 529DDDD88E61B53E29E38EC90077D60FA1777C52 --entitlements /Volumes/Mainframe/Jobs/0000_Internal/0000\ Are\ we\ AR/Scenes/UE4/ARTest/Intermediate/ProjectFilesIOS/build/ARTest.build/Development-iphoneos/ARTest.build/ARTest.app.xcent --timestamp=none /Volumes/Mainframe/Jobs/0000_Internal/0000\ Are\ we\ AR/Scene
s/UE4/ARTest/Binaries/IOS/Payload/ARTest.app
LogPlayLevel: /Volumes/Mainframe/Jobs/0000_Internal/0000 Are we AR/Scenes/UE4/ARTest/Binaries/IOS/Payload/ARTest.app: resource fork, Finder information, or similar detritus not allowed
LogPlayLevel: Command CodeSign failed with a nonzero exit code
LogPlayLevel: ** BUILD FAILED **
LogPlayLevel: The following build commands failed:
LogPlayLevel: CodeSign /Volumes/Mainframe/Jobs/0000_Internal/0000\ Are\ we\ AR/Scenes/UE4/ARTest/Binaries/IOS/Payload/ARTest.app
LogPlayLevel: (1 failure)
LogPlayLevel: Took 6.013009s to run env, ExitCode=65
LogPlayLevel: ERROR: CodeSign Failed
LogPlayLevel: (see /Users/dannyprice/Library/Logs/Unreal Engine/LocalBuildLogs/Log.txt for full exception trace)
LogPlayLevel: AutomationTool exiting with ExitCode=32 (Error_FailedToCodeSign)
LogPlayLevel: Completed Launch On Stage: Deploy Task, Time: 35.037365
LogPlayLevel: RunUAT ERROR: AutomationTool was unable to run successfully.
PackagingResults: Error: Launch failed! Failed to Code Sign[/SPOILER]

Any help would be greatly appreciated.

Cheers,
Danny

It’s a code-sign failure. This is probably the most tedious but also the easiest part to get right. Some tips:

  1. Build on Mac exclusively, no matter what you’re developing on.
  2. Don’t manually download any certificates or profiles, use XCode to download “manual profiles”.
  3. Before using XCode to download your profiles, go to ~/Library/MobileDevice/ and delete all of the existing provisioning profiles
  4. If you made your certificate today, go and set your Mac’s date forward by one day, just for today. In some timezones it will always fail otherwise.
  5. Open your certificates in XCode and make the one for yourself as permissive as possible so it doesn’t ask for your key every time.
  6. Uncheck automatic signing in project settings.
  7. If you made a dev profile, uncheck shipping and distribution. Vice versa if you made a distribution profile for testflight.
  8. Only use the dev profile for the Launch button. Only use the distribution profile for the packaging route.
  9. Build to some location outside of your project folder, it can be hard to find what you want over and over again otherwise.
  10. Don’t select any profiles in project settings, let it choose one automatically. If you’re not sure what it’s selecting, delete all of your profiles and fetch them again so that you only have a couple of valid options.
  11. For the sake of easy development always use the same bundle for all of your projects. You can reconfigure a specific certificate when you get to the testflight stage. Sometimes wildcards don’t work very well so eliminate this first if you’re having problems. Always specify the exact bundle identifier, don’t use [PROJECT_NAME] as it’s unreliable.

Search your build output for “error” and pay attention to the first result when you’re building, it’ll usually give you enough info. If not go to the log file it always mentions. The log is ******** hard to find, it’s always at: ‎⁨~/Library⁩/Logs⁩/Unreal Engine⁩/LocalBuildLogs/ - there’ll always be two, check the one mentioned in the build output.

Drag the paths in this list into your Finder quick access list, you’ll use them a lot.

This is good general advice @Antidamage
Thanks for posting!

@Antidamage First off thanks for the detailed reply!

I’ll go through these steps later today, essentially I’ll start again :smiley: ha

Unfortunately starting again is the best way to solve things with deployment. :slight_smile:

Slight amendment, according to this thread here you don’t want to set your certs to “always trust” as it leads to a startup crash for many apps (not just UE): https://forums.developer.apple.com/thread/106711

Yeah dude setting up can be a royal pain in the ass… what exactly glitch are you stuck on?

I’ve been having the same problem getting everything setup for Unreal AR IOS development, but 6 hours later and I finally got everything to build and deploy to my iphone 7 on ios 12. Now I have a new problem. Now I get the cannot open the app because the developer is untrusted prompt. I cancel it and go to the general settings on my iphone to Verify and Trust it, but the option for device management is gone. So the question is how can I trust the app i’ve deployed to my iphone?

So i’ve been able to get past this. I can now setup the Unreal AR template in Unreal engine 4.20.3, using and imac running Mohave, with an iphone 7 running ios 12, with a project setup with Xcode 10. With metal set to 2.0 and IOS set to 11. I can get this all setup in 10 min or less and have it build the first time. My problems arise after the first build. Without changing anything things start to fail. Help Please.