ARKit 2.0 on Windows

UE4 seems to have some problems with my provision and certificate.
Here some more info of my workflow:

  • I downloaded my developer certificate from the apple dev account: ios_development.cer and copied it to my PC.
    (checked if my mobile device iphone is also listed there).

  • Out of keychain access (system) I exported my key, the certificates.p12 file and copied it to my PC.

  • In Xcode 10 under Accounts and my Apple ID I pressed “download manuel files” and copied the provision files from ~/library/mobile devices to my PC.

  • I set up an Xcode AR template project with:
    my correct Bundle Identifier com.company.ARtest
    Team: My Mac Account Name (Personal Team)
    Provisioning Profile: Xcode Managed Profile
    Signing Certificate: the same certificate I exported the .p12 key file from.

  • In UE4 on my Win10 Machine I imported my provision file I downloaded via xcode earlier. It is valid.

  • Now when I am importing my ios_development.cer files as certificate, UE4 wants to have the key. When I try to load my certificates.p12 file,
    I get an error:

Failed to load or install certificate due to an error: Object reference not set to an instance of an object.

However, when I try to load my .p12 file directly as a certificate I am asked to type in the password and it is loaded as an valid certificate.

But still nothing turns green, even though my Bundle Identifier is 100% the same as in my Xcode Project and the provision files.
When I try to build I get errors that provision and signing key are not found.

Build configuration is set to Development under the packaging project settings. I though may be it tries to build for distribution with my developer only
account, but that doesn´t seem to be the problem.

I am really helpfull for any advise to point me in any direction what I need to check again. I am pretty lost right now.

I’ve been having similar build issues, but have gotten to a point where I can setup the unreal AR project and deploy to iphone 7 running ios 12. I am also developing on an 2018 imac that is updated to mohave and using xcode 10.

  1. I set up a a single page Xcode template and name the project.
    This creates my bundle identifer and appears like so in Xcode: com.MYTEAM.APPNAME

  2. I then go to the Apple Dev site and setup up my App Id matching what I did in Xcode.

  3. After the App Id is setup I create the matching provision and set it to my iphone, the app id i just made, and my cert for my mac.

  4. Then I download my cert and my provision from apples dev site to my downloads folder or the desktop. Basically somewhere easy to find them so you can add them to unreal.

  5. Next I launch Unreal using Engine 4.20.3 and setup the AR template setting the quality to mobile, quality to scaleable, with no starter content.

  6. Inside the project I got to project settings and upload my cert and provision I downloaded from the Apple dev site

  7. I enter my appname and bundle indentifer that matches xcode.

  8. I also set the ios version to 11 and change metal to 2.0

9 . I want to get started on the right foot with a good looking app so under rendering I go ahead and enable a bunch of defaults to be adjusted later they are
Turn on mobile hdr
Turn on mobile msaa set to 2x
Turn on bloom
Turn on Ambient Occlusion
Turn on Motion Blur

  1. Looking at the starter template plugins I noticed ARKit is not enabled so I turn it on.

  2. I also turn on AR Face kit hoping to use it later.

  3. I go through the rest of the plugins and notice there is a ton of stuff enabled I don’t need. for example The Magic Leap plugins are all enabled. I turn them off. The google AR plugin is also turned on, I turn it off.

  4. After going through the plugins it’s time to restart the engine.

  5. restart the engine and launch it to your iphone. Mine is building 100% every time on the first try.

This brings me to my problem. After you build the app and it is running on your phone the only way to stop it is to push the cancel button in Unreal. Without changing anything I build and launch the app again it builds and launches again I play around and then hit cancel to exit. Now this is when things get weird. I build and launch again and now I get failed to connect to bundle errors, failed to launch errors, etc… basically anything and everything begins to happen. So my question is what has happened? Nothing was changed? I know this sounds ridiculous but is there a limit to the number of times you can build an app? Is my bundle stuff still setup wrong? I’ve had the template build, played around on my phone, and then left to go get the kids from school so I shut everything down and bring my phone with me. I come back and turn everything back on. I open Xcode, I launch Unreal, I connect my phone and let it sync first, then try a build again without changing anything it suddenly fails. Def want to get this figured out. Starting from scratch everytime just to get a working build is driving me crazy. Granted I can now setup the AR template and get it working in less than 10 min.

I def feel like i’m missing something because I’m not doing anything with my keychain. I’m just using the cert and provision found on apples dev site that I’ve created. Together we can figure this out. HELP PLEASE.

I got rid of the Certificate/provision error. Both are still only marked as valid in the project settings, still nothing is marked green.
But now when I try to launch to my Macbook it starts building and finishes compiling shaders up to the point where it failes due to the missing** Project.target** file in Project\Binaries\IOS.
It seems that I am not the only one with that problem with 4.20.3

Is there anything I can try on mac to get this bundle error crap to stop happening? Like I said above, I can get everything to build 100% on the first try. Anytime after that is a crap shoot. Even without changing anything. Does anyone have any suggestions?

As it seems the build error concerning the missing .target file is a PC remote build problem.
I installed UE4 Mac version on my macbook and was able to launch the AR template with ARkit plugin onto my iphone without a problem.
My certificate and provision are marked as valid, but without green highlighting as well as they are in the PC version, but everything works nevertheless.

@xpgained
I can build only once as well. The second time I try to launch I get an error as well. Just open xcode, go to windows/devices and delete your Application from your selected device.
It seems launching and overriding the existing app doesn´t work, you need to delete it before every new build.

So remote build from a PC doesn´t seem to work at the moment. At least I gave up.

Another bummer is that the feature I was most keen to try out, the object detection, doesn´t seem to work.
When setting the AR session to object detection and launching, the app just closes after pressing the Start AR button.
I tried it on an iphone 6s and a brand new Ipad, both with up to date IOS. Well, that is another topic I have to take a look into.

Thanks so much for clearing this up DIO! This was driving me bonkers to the point of giving up. What a pain in the butt. So in xcode I can delete the build from my device. Just to clarify, I should do this from xcode and not directly on my phone?

Im not sure if you are still looking to turn them green since you have things functioning under some kind of understanding but in the past if i uncheck the provisions/certificate it would turn green for me and automatically choose the right one.

@gaaooee I’ve tried that before and had failures even when green. From my experience when i manually select them it works more consistently.

Heads up if you guys haven’t updated your apps yet. I tried to build the ar template under the newest UNreal update/with iOS 12/highest metal version and it fails to build. I would stick with 4.20.3 Unreal and iOS 11 with metal 2.0 for now.

Out of curiosity, what version is Metal up to if 2.0 isn’t the latest version?

@Antidamage You are correct 2.0 is the latest version of Metal accessible in Project Setting when using Unreal version 4.20.3 I was trying to clarify which metal to use in the 2nd statement. I was really talking about the combination of these things. Not just metal specifically. If you use the most recent Unreal release 4.21, you get access to iOS 12 and metal (2.1). If I setup everything as before and use the combination of the newest Unreal engine with iOS 12 and Metal 2.1 I get build errors I’ve never seen before. Hopefully that helps.

That’s something I can answer. Definitely roll with Metal 2.0 or greater. Metal 1.0 doesn’t work in iOS 12 as far as I’ve seen.