Unreal Engine 4 iOS Game Release Features

Greetings.

In this article I will list the difficulties and non-obvious moments that I personally encountered when releasing the game on iOS, as well as their solutions.

The game began to be created on Unreal Engine 4.18, now the last build in the store uses UE 4.24. At first the game was released on Android, after I started releasing it on iOS.

image

Who may be interested in the article:

  • UE 4 game developers who decide to put their work into the App Store.
  • iOS application developers (some parts of the article only talk about the Apple ecosystem without being tied to UE 4).


Disclaimer:
  • .
  • — , , .
  • - .
  • - , .


Spoiler
51 , iOS, «The status of your app, Sokopango, is now „Ready for Sale“.». 40 .


1. First steps in the App Store Connect


1.1 Apple ID Program Verification


After paying for the membership (registration / joining the Apple Developer Program) with a virtual card (this is the one where, when paying via the Internet, I need to indicate “DIGITAL CARD” instead of my name - this is at my bank, you may have a different card holder), it was necessary to confirm the identity, because My account information did not match the data of the card holder.
Here is a part of the text of the letter from the person checking my registration:
...
To proceed with your Apple Developer Program enrollment, we must verify the identity of the developer who will be using the account.

Please upload a copy of the developer's photo ID. The ID must meet verification requirements for your region:

  • Government-issued passport
  • Valid (not expired)
  • Includes the name in Roman characters *

* If the ID does not include a romanized name, you must also upload a solicitor-certified English translation.
...

I was lucky that I had a valid passport. I made a scan of it and sent it in reply to the letter. That day I joined the Apple Developer Program.

Therefore, if you pay a fee from a card whose holder information is different from your name, be prepared to confirm the identity of the developer.

1.2 Payment Confirmation


If the application will be profitable (it is paid, or there are built-in purchases), you must specify the payment data in your profile.

We go:

  • App Store Connect .
  • Agreements, taxes and banking .
  • We go to the "Paid applications."
  • We fill in the necessary data. This will be the contact information, tax form and indication of the currency bank account. In the tax form in the “Type of Beneficial Owner” I indicated “Individual / Sole proprietor”, therefore I always indicated my personal data (name and phone number), also indicated the foreign currency account that I opened in the personal account of the bank in a minute.
  • We send for verification, we wait for confirmation and the cherished status of "Active".

You can also read about this in Workflow for configuring in-app purchases .

1.3 Video for previewing the application


In the settings of the application page, in addition to screenshots, you can download more videos. A link to a YouTube video is simply inserted into Google Play. In the App Store, different quote:
To download video for previewing an application, you must use Safari and OS X version 10.10 and later.
As it turned out, pictures can be downloaded from any browser on any OS, and video only from Safari, which is only available on MacOS.

I already had a finished video, but it did not fit the size of the sides.

Brief specification on the video (error texts in the App Store Connect when the video failed to load):
  • iPhone 6.5-inch display - “App preview dimensions should be: 1920x886, 886x1920.”.
  • iPhone 5,5‑ — «App preview dimensions should be: 1920x1080, 1080x1920.».
  • iPad Pro (3- ) 12,9- — «App preview dimensions should be: 1600x1200, 1200x1600.».
  • iPad Pro (2- ) 12,9‑ — «App preview dimensions should be: 1200x900, 900x1200, 1600x1200, 1200x1600.».
Here you can see the specification for the video preview of the application.

The specification lists much more permissions for different devices. For my page there were 4 videos with permissions from the list above.

I did not want to make a new video, I had to edit the existing one. To change the resolution, I found on the Internet the first site I got to change the size of a video. Resolution changed by adding black bars to the picture. For me it was acceptable.

Also, my video was longer than 30 seconds (this is the maximum for the preview), so I had to cut it a little.

Also made it the first online editor that came across.

1.4 Other


  • Surprised that there is no category of Arcade games.
  • You cannot set an arbitrary price in purchases, unlike Google Play.

2. Assembly of the project


2.1 Project setup


All information is in the documentation . I looked at the settings separately (the " Build " and " Config " folders , and the " ProjectName.Target.cs ", " ProjectName.Build.cs " files ) in the ActionRPG and UnrealMatch3 template projects - I took a lot from there.

Be sure to have at least 1 certificate, profile and identifier (App ID / Bundle ID) in order to assemble and put the application on the App Store.

I had / have:

  • 2 certificates - for the store (type “iOS Distribution” - the assembly with this certificate will be uploaded to the App Store Connect) and for testing (type “iOS Development” - when the application is directly uploaded to the iPhone via USB).
  • 1 identifier.
  • 2 ( ) — . UDID iTunes.
  • 2 — ( , ).

2.2 MacOS


Thanks to Apple's policy, you need MacOS to build a project for iOS. I have Windows, cross-compilation, as for building under Linux, cannot be done.

There have been futile attempts to install / run a virtual MacOS image on my AMD Phenom.
I had to stop on a rental virtual machine. I searched and found this service .

Registration and payment are combined, i.e. you can’t just register, you have to pay right away (I saw this for the first time). I bought the tariff macOS Mojave Cloud Basic for $ 34.99 per month. Immediately after registration / payment I received a letter with instructions and access.

To access the remote server, you will need to install the NoMachine Enterprise Client.
I went in, updated the OS (it was not the latest version) and installed Xcode.

2.3 Remote compilation


VPS rented, set up the project, Xcode set - it's time to build the project.

But first you need to configure remote compilation, read the documentation .

You also need to temporarily disable the existing SSH client, otherwise there will be an error related to rsync during remote compilation (I don’t remember the error text).

I have Windows 10, I just renamed the folder " C: \ Windows \ System32 \ OpenSSH ".
After that, in the terminal, you can run the command " where ssh.exe " to verify that the OS does not have SSH clients available. My answer is “INFORMATION: I cannot find the files according to the given templates.”.

Helped post .

In my VPS, SSH did not need to be configured - everything worked out of the box.

I don’t remember why I saved it for myself , an article about setting up a remote project build - all of a sudden it will come in handy.

2.4 A little about the assembly of the project


My assembly takes an average of 20 to 50 minutes. 20 minutes when the content did not change, but could fix something in the configs.

But if there was an update to the engine, or something has seriously changed in the content, the assembly may increase. It increased on average up to 50 minutes.

When compiling remotely on VPS, the engine source code, project, temporary files, etc. are copied. All this lies in " [Home] / UE4 / ".

Depending on the project settings, the resulting IPA file may have a different size.
The size of the received file is affected only by the option “Build Configuration” (Project Settings - Project - Packaging) - Development or Shipping.

The “For Distribution” flag, as well as the selected certificate and profile, do not affect the size.

The only thing with the “For Distribution” flag set is the Distribution certificate and profile must be selected, otherwise the project will not be assembled.

Also, with the “For Distribution” flag set, the prefix “Distro_” is added to the file, and with the Shipping assembly, the suffix “-IOS-Shipping” is added.

For example, the dimensions of my assemblies:

  • Development-build - 186 Mb.
  • Shipping-assembly - 491 Mb.

Both files can be uploaded to the phone via USB for testing.

As for the large file obtained during the Shipping assembly, as I understand it, it contains resources for different devices.

Here is the information displayed on this file in the App Store Connect:

image

2.5 Assembly errors and solutions


2.5.1 Problem with profiles


Error:
Provision not found. A provision is required for deploying your app to the device.
Signing key not found. The app could not be digitally signed, because the signing key is not configured.
...
Solution: delete profiles from the directory " C: \ Users \ [UserName] \ AppData \ Local \ Apple Computer \ MobileDevice \ Provisioning Profiles " and re-import them into the project.

Errors may have come out due to the fact that I imported profiles and certificates both in the editor settings and through IPhonePackager.

As a result, there were several, although there should have been 2 pcs.

2.5.2 Problem with Xcode


Error:
Invalid SDK MacOSX.sdk, not found in /Library/Developer/CommandLineTools/Platforms/MacOSX.platform/Developer/SDKs
Invalid SDK iPhoneOS.sdk, not found in /Library/Developer/CommandLineTools/Platforms/iPhoneOSplatform

Solution: in the terminal, run the command " sudo xcode-select -r ".

2.5.3. Miscellaneous rsync related errors


Errors:
  • some files / attrs were not transferred (see previous errors) (code 23) at /home/lapo/packaging/rsync-3.0.4-1/src/rsync-3.0.4/main.c
  • rsync error: error in IPC code (code 14)
  • other
Solution: restart the assembly. I sometimes have to restart it 2-3 times to get the project going. Moreover, the assembly can be interrupted both at the beginning and near the end.

2.5.4. Development build failure


Error:
Provisioning profile «Development» doesn't match the entitlements file's value for the get-task-allow entitlement
Code signing is required for product type 'Application' in SDK 'iOS 12.2'

Solution: this post helped .
In the list of identifiers I went to the right one, set the flag on iCloud, saved it.
There was a message that the profiles would become invalid - and it happened.
An attempt to build (for verification) is an error. It should be so.
Again I went to my identifier, now I removed the flag on iCloud, saved it.
The assembly was successful.

Then I had to delete invalid profiles from the project and make new ones. Or you can try to log into the profile on the site, save it locally, and reload it into the project.

2.5.5 Certificate Issues


Error:
The key cannot be used in the specified state

I deleted the certificates from the project settings, tried to add them again, when adding it required a password - entered. Again the assembly with an error, I do not remember which one.

Solution: deleting certificates (from the certificate store, see section 2.6.a ) and profiles (from the catalog, see section 2.5.1 ), re-generation (if necessary), importing into the project.

What I did - instead of importing existing certificates and profiles, I regenerated everything and then added it to the project. When adding certificates, a password was no longer required, but it was required to specify the file " * KeyPair.key ".
After that, the project was successfully assembled.

2.6 A bit about certificates


  1. . IE, , . " MMC".
  2. 2 , 2-3 , «Maximum number of certificates generated». , , .

3


3.1


To test on the phone when installing the application via USB, you need to use the Development certificate and the Development profile with the specified device UDID.
Accordingly, the project should be assembled with this certificate and profile. As I wrote above, it does not matter which option is selected in the “Build Configuration” - Development or Shipping, but the “For Distribution” flag should be unchecked.

3.2 IPhonePackager


The application is installed through the IPhonePackager program (path " [EnginePath] \ Engine \ Binaries \ DotNET \ IOS \ IPhonePackager.exe ").
At startup, a dialog box for selecting a project will open, it must be closed. In the program that opens, go to the Advanced Tools tab - click on the Install IPA to hardware ... button - select an ipa file - wait for a successful installation.
My installation on the phone takes from 20 to 80 seconds (depending on the file size and moon phase).

I periodically could not install the application through IPhonePackager (it was actual before the transition to UE 4.24).

Error (before UE 4.24): “Install \ Update of“ FileName.ipa “failed with Package Extraction Failed Error in ...”

The peculiarity of the error is that either the sending of the file hangs (it is sent in parts), or it is very quickly copied to the phone (for example, half a gigabyte per second).

Solution (did not always work): reconnect the cable to the phone, or stick another cable, or restart the phone. But sometimes none of this helped (although iTunes saw the phone), so I had to postpone testing.

3.3 TestFlight


You can also test the application through TestFlight. Testing closed, by invitation.

In the App Store Connect under TestFlight:

  • in the "App Store Connect Users" subsection, add yourself.
  • in the "Testers and Groups" subsection, add a group of testers, then add the e-mail of users who will test the application. They will receive letters of invitation and a code that will enable them to connect to the testing program - to install the application under test.

The created group of testers has 2 sections: Testers and Assemblies :
  • in the " testers " are the mailing addresses of users who will be connected to the testing, as well as a link to the application by which these users can install the application.
  • in " assemblies " are available assemblies for testing - those that will be specified manually.

You will also need to install the TestFlight application on your phone .

The developer, administrator or account holder will not need to enter a code. The latest downloaded version of the application will be available almost immediately after downloading to the App Store Connect.

But everyone else should be invited (an activation code will be sent), and the version that will be indicated in the tester group will be available to them.

4 Download on the App Store Connect


If UE version 4.24 is installed (Xcode 11 is required) and higher, Transporter will be required to download the application to the App Store Connect .

If UE version 4.23 is installed (Xcode 10 is required) and below, the Application Loader is used:
image

In Transporter, the Apple ID credentials are used to log in, and in Application Loader only the login from it is necessary, and the password will have to be generated, you can read about it on official page Using app-specific passwords .

Since I have Windows, I need to transfer ipa files to VPS. I am using the Firefox Send service . It’s convenient for me because you don’t need to log in - opened a website, uploaded a file, received a link, downloaded a file in a virtual machine.

5 In-game purchases


5.1 Settings in the App Store Connect


Before sending the application for verification, I immediately created in-game purchases. As it turned out, they are checked / approved along with the application.
For approved purchases, it is advisable to attach a screenshot of the
shopping window (for each purchase), where the button for making a purchase will be visible. I had 1 screenshot for all purchases. The screenshot itself was taken from the editor (not from the game), and corrected.

Because the screenshot should be a certain size (640x920 pixels), I had to press parts of the image to each other. Thus, the appearance of the shopping window in the screenshot and in the game is different.

image

Buttons for purchases must be visible, even if nothing happens when you click on them.

At first I hid the purchase buttons, showed them only after receiving information on them (price, name, currency, etc.) - no need to do this. Because of this, my application and purchases did not pass verification.

5.2 Option "bUseStoreV2" in the configuration file and method "RestoreInAppPurchase"


By default, the option " bUseStoreV2 = true " is enabled for the project , see " [EngineFolder] /Config/IOS/IOSEngine.ini ". In-game purchases didn’t work with her. And this problem was not for me alone, based on the number of posts on the forum and AnswerHub.

Solution: I registered the line " bUseStoreV2 = false " in the file " [UnrealProject] /Config/IOS/IOSEngine.ini ". If there is no file, we create it - we look at examples of projects, or we search on the Internet.

Of course, with every purchase you will have to enter your Apple ID username / password, but for me it is better than nothing, and there was no time to understand.

Purchase data recovery didn’t work for me yet (method " RestoreInAppPurchase"), and most importantly, the prices for purchases were not displayed (the" ReadInAppPurchaseInformation method ), although everything worked fine on Android. After some time, I removed the use of " RestoreInAppPurchase " (I had an advertisement, which could be turned off, but then I removed the advertisement, and accordingly this purchase, too, and there was no need to restore data on purchased purchases), and, miraculously, after that loading prices in the game.

6 Review / Verification


As it was the first time with me.
15.06 — 1- , 14 . . , ( ). , , .

18.06 — 2- , 2- . , , . , , , .

21.06 — 3- . 9 , , .

30.06 — 4- , 9 . , 2.3.1 ( - ). , — . ( . 5.1), . . — , ( ). , . — , . , -, (. . 5.1). ( , , , ). , .

, , — , , . . , , , .

17.07 — 5- , 7 . , 2.3.1. . , , . . , , .

26.07 — 6- , 18 , 18 .

Conclusions (subjectively):

  • on Google Play, it was easy for me to check for approval of the application in the store, here everyone will look under a magnifying glass. Perhaps there are bots, people here. What's better? I do not know.
  • the answers based on the results of the check for the most part do not carry any information about what needs to be fixed.
  • unobvious moments - the purchases were rejected, and I found out only when I decided to go to the page with their settings, there were no messages.
  • To speed up the launch of the verification, scribble it in all instances of Apple - write messages in the solution center, file an appeal (from the solution center), ask questions to the verification team.

7 Summary of Article


My checklist, which I compiled for myself (an approximate analogue of the official page ), to release the application on iOS:

  1. register and pay for participation in the developer program .
  2. if you have Windows, you can use VPS with macOS.
  3. when compiling remotely on macOS, you only need to install Xcode, Unreal Launcher / Editor / etc. no need to install.
  4. — .
  5. — 2 . — development distribution/shipping — .
  6. — .
  7. — .
  8. SSH MacOS . , , PyTTY.
  9. project assembly - article . Attention: when assembling with the “For Distribution” flag, you need to select the distribution profile / certificate, otherwise select the development profile / certificate. Selected in the project settings, or in the file " Config / DefaultEngine.ini " section " [/Script/IOSRuntimeSettings.IOSRuntimeSettings] ", MobileProvision / SigningCertificate - lines.
  10. device testing - article .

8 Conclusion


All this happened to me in the summer of 2019. I could forget something and not describe it that way, some moments may become irrelevant.

I would be glad if this information helps someone.

All Articles