iPhone6/6+ and iOS8/Xcode6 first hand on experience with Unity

I wanted to share a first hands on experience with you on how to build apps for iPhone6/6+ with Unity 4.5.4. :sunglasses:
In general it can be seen as update guide to get your apps made with Unity onto the iPhone6/6+ or other iOS8 devices using Unity 4.5.4p1 on a Mac 10.9.5.

Requirements:

  • Development Mac
  • Activated iOS Device
  • Unity 4.5.4p1
  • Itunes 11.4
  • Xcode 6.0.1
  • Command Line Tools 6.0

Setup device for development
If you have not setup your iPhone6/6+ already, keep in mind you need an active sim card to activate the phone. Enabling your iOS device for development mode is not necessary anymore in the new Xcode.
You still have to add your phone to the development profiles! A short form on how to do that, can be found below**- [/B].**
- Download Unity Update*
Unity 4.5.4p1 - adds support for Xcode 6 and iPhone6/6+. Build can be downloaded at here.
- Download Xcode, iTunes, Command Line tools*
If you use iTunes 11.4, Xcode 5.1.1 or below and Command Line Tools 5.1 or below, you will need to upgrade to the latest version. Your Mac Software Update will already suggest you to update different updates. Xcode 6.0.1 and the Command Line Tools 6.0 need to be installed. Keep in mind, that you will be required to enter the Mac root password and accept new Terms & Conditions. Furthermore, your mac will be restarting during the installations.
- Note:* If you have not installed Xcode yet, you can download it for free in the App Store. If you installed Xcode for the first time you will have to download the Command Line tools too.
Go to Xcode → Preferences->Downloads and install Command Line tools
- Build and Deploy the game*
Now you should be ready to go!
- Start Unity Engine 4.5.4p1
- Load
- Angry Bots
- new empty project
- your app
- Switch platform to iPhone in Build Settings
- Build And Run
That’s it, feel free to ask any questions if you encounter problems during upgrade. :hushed:
It’s weekend, might take a while until you get a response from me, but anyone is welcome to answer (as always)!
- *- Howto get iOS Developer Certificates[/B]**
- *A good guide can be found here on the apple developer site. This is just a small howto used as quickstart.**
- - Attach your iOS device to Mac*
- *- Join the iOS developer programs.**
- - On your Mac open Keychain Access application*
- *- Navigate in menu to Keychain Access → Certificate Assistant → Request a Certificate From…**
- - In Certificate Assistant dialog choose Save to disk and click continue and save*
- - Login into http://developer.apple.com/ios**__
- *- On the right side of the page choose “Certificates, Identifiers & Profiles”**
__- - On the new page click Certificates

- - On Certificates page top right click “+” button*
- - Upload your signing certificate request you made at the point 3.a*
- *- Click Generate and download new certificate, double click on the downloaded file installs the certificate.**
- Open Xcode Organizer window (Window → Organizer)
- *- Right click on device and choose “Add to development portal”**
- - Login with your credentials you used to join the iOS dev program*
- *- Go back to browser window you used for certificate generation:**
- - Now go to Provisioning profiles section in browser*
- - On Provisioning profiles page click “+” button*
- - Choose “iOS Development” provisioning*
- - For App ID choose any useful :wink: Click continue*
- - Select all certificates; Click continue*
- - Select all devices; Click continue*
- - Enter some meaningful name like “MyAllDevices” :slight_smile: Click generate*
- - Download generated provisioning and double click downloaded file to install it in Xcode*
- *- Now you are ready to deploy your apps to iOS device.**
- Edit*: 13.01.2015
- IPA Sizes*
- *To get the minimal .ipa Size of Unity Apps:**
- Go to the iOS Player Settings set Stripping Level to Use micro mscorlib.
- *- Build the project. Tested with Unity 4.5.4 and Unity 4.6.1p3.**
- - Open the XCode project*
- - Archive rather than build the project*
- *- Go to Window->Organizer into the Archives tab and press estimate size.**
This will result in 12.4MB estimated (14.1MB real) .ipa size in Unity 4.5.4 and before. It results in 16.4MB estimated (17.2MB in real) .ipa size in 4.5.4p1 and above due to:
- *Additional files added:**
- - LaunchImage-700@2x.png - 160KB*
- - LaunchImage-800-667h@2x.png - 166KB*
- - LaunchImage-800-Landscape-736h@3x.png - 540KB*
- - LaunchImage-800-Portrait-736h@3x.png - 445KB*
- - LaunchImage@2x.png - 160KB*
- - LaunchScreen.nib - 3KB*
- - LaunchScreenImage-Landscape.png - 540KB*
- - LaunchScreenImage-Portrait.png - 445KB*
- - System.Core.dll - 10KB*
- - UnityEngine.UI.dll - 99KB*
- *Bigger files:**
- - The executable - 600KB*
- - sharedassets0.assets - 4KB*
- - unity_builtin_extra - 6KB*
- - mscorlib.dll - 2KB*
- - UnityEngine.dll - 25KB*
- *Sum up:**
- new images: 2456KB*
- new files: 112KB*
- bigger files: 637KB*
- *total of 3205 KB more space used.**
- FYI: dSYM are bigger now too ~5MB*

5 Likes

Hi David,

Will the update solve the render scaling issues on the iPhone 6+ ? currently it seems that Unity apps render at 720p and then they scale up to the full 1080p resolution, which makes everything looks pixelated, i don’t have an iPhone 6+ available for development so i can’t test it out.

Thanks in advance!

Will we get aspect ratio or resolution in the editor game view for the iPhone 6 and iPhone 6 Plus in 4.6?

BTW: I had an issue with 4.5.1p4. For no reason Unity was opened twice and I was forced to shutdown the hard way (power button)

Yes. iOS looks for correct sized iPhone 6+ splash screen (or splash screen .xib file) to see if your app supports higher res. We have added support to set iPhone 6+ splash screen in player settings.

We had a short discussion internally, and decided to skip it for now - we don’t want to clutter the menu as it’s getting unwieldy large. But you can easily add those entries yourself: just click on the menu and select “+” sign. Aspect ratios of both devices are 16:9 and resolutions of 1334x750 and 1920x1080.

2 Likes

Actually it is 2208 x 1242 which will be downscaled to 1920x1080 - just make a screenshot on the device.

[http://forum.unity3d.com/threads/iphone-6-plus-screen-width.269264/

E](http://forum.unity3d.com/threads/iphone-6-plus-screen-width.269264/)DIT: I was wrong. According to Apple it should be really 1920x1080 when rendering 3D content in fullscreen mode. (Metal and OpenGL ES)

As I already confirmed in your linked thread, I confirm it again that the native resolution of iPhone6+ is 1080p.

1 Like

Has anyone noticed a major increase in app size after upgrading to Xcode 6?

I’m finding that our app, which is just under 100MB Xcode 5, has an “estimated app store size” of 157MB in Xcode 6.

I haven’t actually submitted it because it wants me to revoke and regenerate my signing certificates, which I don’t want to do as I am planning to submit my next update with Xcode 5. So until then I don’t have an actual IPA I can dig into to see what has changed. The archive before submission is still roughly the same size.

This is pretty worrying though as staying under 100MB is important, and I’m not sure how I’m going to claw back a sudden unexplained 50MB increase.

1 Like

I noticed our estimated app size went up huge too, but when I actually export the IPA, its not that size, so I am not sure if that estimate feature is broken. I hope so =)

1 Like

Estimate size is how big it is expected to be on the App Store. That has always been different to the ipa size.

I believe in XCode 6 the estimated size changed to how big the app will be when installed. I had a similar increase of +50% in the estimated size between XCode 5 and 6.

Hi,

There is a bug with this release, “Disable Audio” in audio settings has no effect, unity seems to still mess with the AVAudioSession when it launches, that was not the case in Unity 4.3, it used to leave the iOS core audio session category intact if you check “Disable Audio” in project settings, i need that since i’m using a native audio plug in instead of the Fmod audio.

If this bug won’t be fixed anytime soon, Will i be able to add iPhone 6+ support manually if i upgrade to Xcode 6 and add the required screenshots in the .xib file (while still using Unity4.3)?

Has anyone had a chance to test which of the splash screens does the iPhone 6+ select in a build made with Unity 4.5.4f1 ?

Hi guys, I recently submitted a project that had to support all the splash screens including iPhone6 and iPhone6+. With the current build 4.5.4p1, the new iPhone6 iOS8 splash screens are bundled but never referenced to in the SplashScreen.mm generated in the xCode project from Unity. I have modified the SplashScreen.mm to reference the proper new splash screen files (namely, the @3x for 667 and 736). It also includes a fix for iPhone6+ since it can have both a portrait and a landscape splash screen which seems to be only available for the iPad as well. I hope it helps others and can get rolled into a future build.

Note: It isn’t exactly the cleanest or most streamlined implementation. It uses certain flags to rebuild the image name string for all the extraneous cases.

1795158–114313–SplashScreen.txt (9.46 KB)

2 Likes

@Sampora if you update to Unity 4.5.4p2 and use the fix of qoobit it should be correct.
Thank you @qoobit . That’s a pretty nice fix!
@F.Salka please report a reproducable bug report if possible.

Are Qoobit’s fix (or an equivalent) inlcuded in Unity 4.5.4p3? We’re still seeing the same issue with iPhone 6/6+ splash screens being incorrect with p3.

If not in p3, when will these fixes be integrated into an official patch release?

iPhone6/6+ fixes are expected to be part of next week patch release.

1 Like

will this patch work with unity_update-4.6.0b17 ? it would be great if we could have those fixes plus the new UI.

No, patch releases are not synced with beta releases. But when 4.5.5 (official release) is released, it will go to the next beta release which comes after the 4.5.5 release. But most of the fixes will be released with 4.5.5p1 (patch release) which means that they go to beta after 4.5.6 (official release) was released which will take another month probably. More information on 4.6 beta releases can be found here.

The new patch 4.5.5p1 is live, which brings a lot of fixes for iPhone6(+) and iOS 8!

1 Like

Hi David,

if (scale > 1.0f)
    szSuffix = "@2x";
else if (scale > 2.0f)
    szSuffix = "@3x";

The @3x Scale will never get executed in the SplashScreen fix that was submitted last week.

Also, can we look at options for future updates? Maybe take the best fitting resolution? Or find a way to get which ever splash screen was loaded by iOS?

Cheers,
~C

1 Like