Windows - OSX - iOS Workflow

I am working on a project that is blueprint-based but has small segments of C++ in it to incorporate specific networking functions. It works like a dream on PC and Android. However, I recently bought an iPad and have been testing projects on iOS with varying results. This is the project I care most about and I need to be able to export it to my iPad for testing.

My Questions:

  1. Can I keep my C++ code or do I need to write XCode segments to replace what I’ve written?
  2. I have been given a mac mini from a friend to compile my project. Can I develop on my primary windows rig, send the project to the mac computer, hit compile and I’m set? Even better, can I use the UE4 Source Control to send changes to the mac?
  3. Will I even be able to compile my project on the mac mini? It has pathetic specs below UE4 minimum requirements but all I need it to do is run XCode and compile. No other development will be done on the computer. I can’t possibly justify purchasing a more powerful Apple machine simply to compile projects that I develop solely on my powerful windows computer. I was lucky enough to be given this baby Apple computer for now. The specs on the Mac Mini are: 2.4GHz Intel Core 2 Duo, 3GB 1067 MHz DDR3 RAM and a massive NVIDIA GeForce 320M graphics card.

iOS, OSX and XCode are brand new to me but I can’t possibly ignore them. It’s been a frustrating experience so far coming from someone who has tried to distance himself from Apple products. Hopefully I haven’t asked too many questions in this single thread but they are all closely related. I would be forever be grateful if someone answered one or all of these and extra tips are ALWAYS appreciated. Thanks so much in advance :).

Hello tehhax,

Always happy to see someone branching out to new platforms. I’ll answer your questions to the best of my knowledge.

  1. C++ code is still used for iOS development for the UE4 engine and can easily be transferred. If you wanted to transfer it manually to XCode, you would need to copy the .cpp and .h files and then generate the project as you would usually to generate the XCode project file.

  2. The easiest way to do this would be to set up Remote Build on your Mac to be able to build/package directly to iOS from your Windows PC using your Mac as the builder. You can find more about setting that up through this tutorial set up on the forums by one of the members of the community.
    Windows -> iOS Rsync/Remote Build Guide (4.8) - Mobile - Epic Developer Community Forums

  3. I’m not sure on this front as I’m not 100% sure what all goes into the Remote Build process. The compiling wouldn’t be an issue, but a Mac is also required for packaging/launching to an iOS device. I’ll need to ask around and find out how much the remote machine takes on load-wise to see if that would be possible. It would definitely be slower than the alternative but I’d imagine it would still work.

Hi ,

Thanks so much for the response! I have spent the last few days updating OSX, XCode and Unreal Engine on the mac mini. It was painfully slow but it’s finally all done and UE4 surprisingly runs on the little machine. I wanted to get it all set up so I could respond with a non-hypothetical question.

Before I set up remote building I simply want to export a project to iOS from OSX as a test. I spent all of last night trying to figure out this nightmare without any luck.

Do I need to make a new certificate and/or a new mobile provision if I want to export from the other computer? I’m very uncertain of how Apple’s wonky developer system works.

I downloaded the mobile provision and certificate that I’m using on my windows machine to the Mac. I then imported them to the UE4 project. On the project settings page under iOS, my certificate says indicates “Valid” but the provision says “No Valid Certificate Found”

I searched for answers quite comprehensively last night but my brain may have been waning because it got late. Have I missed any steps? I crawled through the “iOS getting started tutorial” you guys provided many times but I wasn’t able to figure out the problem.

I’m so close! I would really appreciate another response. You’re awesome!

You should be able to use the same certificate / mobile provisions across multiple computers if you followed the steps. To be clear, was this the documentation you were following?

I suggest creating a blank project first now that you’re able to package to see if that works correctly. If it does, that will at least let you know that the logic of your project is the problem. Have you tried running the game in Standalone to see if the same crash occurs there? Have there been any crash logs generated by the crash that occurs? If so, it would be helpful to see those.

Ok so I reset the provision, re authenticated in apple developer account and then re downloaded it. It’s valid now! I think resetting it (in XCode preferences → account details) was the trick. Hooray!

Unfortunately, the app is crashing on the iPad just after the splash screen. I’m so close I can taste it but I’m really not sure the best way to debug this.

I can play the game on OSX in the editor no problem. The C++ code I wrote is working just fine while playing in the editor on the mac.

I also tried generating an XCode project with the uproject file. I ran the XCode project and tried exporting the game to my iPad again but it still crashes after the splash screen. I didn’t receive any errors when building in editor, compiling C++ code in editor or launching.

Thanks a bunch for these responses. I haven’t had a chance to follow up during the holidays but now I’m back at it. I have been fiddling for a while longer thinking it was an issue with cooking content or building with no luck. I most recently built the project with xcode, packaged in the editor it built and still get the crash after splash screen. I have not got any errors during the building or packaging process.

I only recently figured out how to get crash logs from apps. Is there any way this output will help?

I’ve attached it as a txt file

Edit: I uploaded the wrong (raw) crash log. This is the proper easy to read symbolified version.

Have you been able to give a fresh project a try? There isn’t anything that immediately jumps out from that log but I’ll continue looking into it.

I exported a pure blueprint project (first person shooter template) from Mac → iOS without a problem. I am going to add a C++ class to it and see if that breaks it. Working with such a slow mac machine makes each test unbearably slow.

**Just to avoid any potential confusion. This is what I’ve been doing. Please let me know if I’m missing any steps or if I need to try something else: **

  1. Generated XCode project from uproject
  2. In XCode I build then go to Product → Run. Scheme is MyProject->My Mac.
  3. UE4 eventually runs. I build & compile C++ code.
  4. I have tried using Launch → iPad as well as packaging an ipa and adding through iTunes.
  5. After about an hour of exporting I finally get the app on my device and it crashes after slash screen. I cry a little bit each time.

Does it matter what configuration I use in XCode (ie. DevelopmentEditor, DebugGame, etc)? I just tried DevelopmentEditor and that didn’t help at all.

I have tried changing quality settings. It was on high quality desktop before but still crashes on scalable for mobile.

You have no idea how much I appreciate you looking into this more. I am getting more and more disheartened by this every day. I just want to get back to working on the game :(.

To give you an idea of the frustration I’m going through: the last export took 75 minutes. That means every single time I want to see if I’ve fixed it, it takes about an hour to export the app that just crashes. I’ve probably done this close to 100 times and I’m going insane.

Everything looks correct. As far as the scheme (Build Configuration) goes, you can use any of the ones that don’t include the word “Editor”. Development would probably be best.

Would it help if I provided you with my project files? If so what is the best way to safely and securely send them to you? I obviously don’t want to post the files here. What files/folders do you need? I’m currently (slowly) adding a C++ class to the blank first person shooter example. I’m going to put a quick hello world function in there and see what happens. I am completely out of ideas after this.

EDIT: I have finally added the C++ class to the test project and have successfully exported to the tablet! I just added a simple printstring function that is certainly working. This leads me to believe that the issue is in the C++ on my other project. I could still be wrong. Is there somewhere I can post the .cpp and .h source for someone to check for incompatibilities?

You can send them to me through a private message on our forums. You’ll still need to upload it somewhere else like Dropbox or Onedrive but the link that you send me will not be shared with anyone outside the company. I’m glad to hear that you’ve got a basic project working at least.


Alright I’ve got my project (mostly) running on the tablet now! I figured instead of making you crawl through the project I would at least figure out where the C++ was going wrong. I’m just going to post it here to help others who may come across it.

I’ve figured out that my HTTP post request C++ function is failing. Please tell me you see something wrong with this code! It works on android, windows and my mac mini (osx) PIE. It does not work on iOS though. It just causes the app to crash.

Here is the code:

//perform a post request
bool ASandboxNetworkActor::SendPostRequest(FString TheHost, FString JSONData){
	FHttpModule* HttpMod = &FHttpModule::Get();
	if (!HttpMod) { return false; }
	if (!HttpMod->IsHttpEnabled()) { return false; }

	FString TargetHost = TheHost;
	TSharedRef <IHttpRequest> Request = HttpMod->CreateRequest();
	Request->SetHeader("User-Agent", "SandboxNetworkAgent/1.0");
	Request->SetHeader("Content-Type", "text/html");

	Request->OnProcessRequestComplete().BindUObject(this, &ASandboxNetworkActor::HTTPOnResponseReceived);
	if (!Request->ProcessRequest()) { return false; }
	return true;

//Callback function when HTTP response is received from GET or POST method
//This function sends the response string to the BP event HTTPRequestDataReceived
void ASandboxNetworkActor::HTTPOnResponseReceived(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful)

Please help! I’m so close!

I couldn’t say just from looking at that as network code isn’t my expertise but do you get any different crash logs from when it crashes, or is it the same ones from before? I’ll be asking a co-worker who knows more about this specific area of code to see if we can figure something out.

I’m still getting the same logs - unfortunately all I did was isolate the issue causing the crash. I would imagine the Http GET function I’m using won’t work either if it’s an issue with UE4 Http functions.

Please let me know if your co-worker says anything about the function I shared! The function works on all platforms except iOS. Maybe there is a platform-specific library I need to include? Do I need to explicitly give the app access to internet on the iPad perhaps? I looked around for C++ iOS compatibility issues in UE4 but couldn’t find anything. If there is a better way to perform an HTTP request I am not married to this code and am open to suggestions!

I really appreciate your help with this!

Unfortunately that code doesn’t say much. Suggestions would be things such as checking your method for connecting, case sensitivity in your true/false checks and also checking to see if the iOS device is trusted by the Mac.

Hi Matt,

I’ve been looking around for more information and still can’t figure out for the life of me what is going wrong. I took a few steps back. I made a new project and added the code I mentioned was causing the crash. It caused a crash as expected in the new project as well. The new project also compiles and executes the code perfectly on OSX but not iOS.

As for your suggestions:

  1. How do I check or set my method for connecting? I don’t see any relevant settings in settings->iOS (within UE4). My iPad is 110% connected to the internet. I tried using the Network Link Conditioner in iOS developer settings with no luck.

  2. true and false are lowercase, correct? (“true”, “false”). You can see in the code I posted that they are indeed lowercase. I imagine I would be getting a compile or build error if I had the wrong case.

  3. Do you mean that I should check if my mac is trusted by the iOS device? I believe I was prompted to trust the mac when it was initially plugged in. I selected trust. I can’t seem to find any information on where to find a list of trusted devices on the mac or iPad. I did not set up 2 step verification if that matters.

Just because I forgot to mention: I have added HTTP to the build.cs file as well as #include “Http.h” to the header file. It wouldn’t compile otherwise. Is there any conflicts with the Http library with iOS?

I simply want to use my PHP system to communicate between devices. Just simple GET and POST requests. I am using this to talk between mobile devices on the internet (not LAN) and I don’t want to run a dedicated server.

Has anyone managed to perform a GET and/or POST request on iOS? I just need to get the response from a PHP file/website. Is there any way someone on your end could test the code on iOS and another platform to see the incompatibility I’m seeing?

Is there anywhere I need to grant my app permissions? Perhaps in Apple developer console or in UE4?

I finally figured out the networking issue! It is super helpful using NSLog to figure out the cause of these crashes. I had no idea it existed until someone in another question mentioned it.

I created a new question and figured out the answer because this one became quite long winded.

For anyone else having the same issue: