Download

How do you Cook Content for iOS?

This may be a really beginner level question, but I currently can only Cook Content for Mac when running the UE4 editor on Mac OS X.

The reason I want to only cook the content for iOS, is so that I can later run the development version through Xcode for debugging. As it stands, right now when running the development build through Xcode 7.3 to my iPhone 5, I get an assertion failed:


Assertion failed: HasFoundDataDirectory [File:/Users/Yusuf/Documents/UE4_Source/UnrealEngine-4.10/Engine/Source/Runtime/Core/Private/Internationalization/ICUInternationalization.cpp] [Line: 117] 
ICU data directory was not discovered:

According to an answer here, I simply need to cook the content for iOS first and then running through Xcode should be without issue. The problem is that I do not have the option for selecting platform.

Here’s a screenshot of the problem
dcfc35c4718cd2f2cc1dc81458c2e5caf88be231.png

How would I go about cooking for iOS? I do see something related to content cooking, but the instructions appear to be for Windows only.

OS: Mac OS X El Capitan 10.11.4
Editor: 4.10.4 (tried both on binary and source)

If you run Package Project -> iOS it will run the cooking process for iOS. Probably there is a more elegant way like with the command you linked to but in any case I’ve found that package process works well enough for me.

Oddly enough, it does not do the trick for Xcode. When I packaged for Development, I figured it would cook and store it too. Xcode still complained though. I appreciate the response regardless :slight_smile:

After working it out with my colleague, we’ve successfully figured out the steps. Hopefully, these steps can guide others and who knows, maybe it can make it’s way into the documentation too.

Open a Terminal and CD into the Engine’s directory/folder. In my case, I CD straight to the executable of the UE4Editor. In OS X, if you right click the UE4Editor and click ‘Show Package Contents’ you’ll find that there are more folders inside.

702d0cfde84fc9fb8658ade90f5601498e40db7b.png

We want to CD all the way in until we reach the executable, not the .app file. So, in my case, the directory is:


/Users/Shared/UnrealEngine/4.10/Engine/Binaries/Mac/UE4Editor.app/Contents/MacOS/

Then, to actually run the cook command, this is what I did following the documentation:


./UE4Editor /Users/Yusuf/ProjectABC/ProjectABC.uproject -run=cook -targetplatform=IOS -iterate -Compressed

2387d8fa943379a6bf4eda681cac8ee7bc6a86cc.png

Cook_running.png

It works!

Thanks for the solution, Sabun.

Based on the log errors, I think you need to upgrade to a new Mac! :cool:

You can also use the Launcher to cook content for iOS only. It is available from Editor using …Window…ProjectLauncher

:slight_smile:

Thank you for pointing me in a new direction. Am I to understand that by opening the Project Launcher, creating a new Custom Launch Profile, turning everything off/unticked with the exception of setting Cook to ‘By The Book’ and ticking iOS I will achieve the exact same results as running the commandlet manually as above? I haven’t tested it yet since I’m not at the work computer at the moment, but it seems like this is what you’re pointing me at. A little more elaboration or some steps are always appreciated for the sake of clarification.