Lately I've got the following scenario. There is a simple game created for Android platform with Unity3D on Windows. I wanted to help releasing the app for iOS with minimal effort, provided I have no knowledge about Android and Unity3D.
Step 1: Installing Unity3D for Mac OS X.
I downloaded and installed free Personal Edition from the Unity3D website. The latest version that I've got was 5.0.1.
Step 2: Creating an Xcode project from existing Unity3D project.
I've got a package containing the Unity3D project created on Windows and built for Android. After unpacking, I've pointed Unity Mac app to the root project folder (there was no single project file to select - all files were greyed out, which was a bit confusing). Unity have imported all the assets and opened the project window.
To target Unity to iOS platform, I went to File -> Build Settings menu. In the opened window I first tried Player Settings button, that showed me various settings for iOS project, like app icons, supported resolutions and orientations, target iOS version (it was set to iOS 6 which is quite uncommon now, so I changed to 7.1) and so on.
Then I selected iOS and clicked Switch Platform button. Unity opened the dialog saying that it is importing the assets. Then I clicked Build. In the dialog, selected destination where the Xcode project for iOS will be stored.
After successful build Unity app generated the Xcode project for iOS in the folder I've chosen. So we can leave Unity app for now and switch to Xcode. My Xcode version was 6.3.
Step 3: Building Xcode project.
The project didn't build right after opening. The reason is missing Google Ads iOS SDK library. I've downloaded the latest (7.1.0) version and added it to the project.
According to this page I made the following changes:
-
Added the following frameworks:
CoreTelephony
,EventKit
,EventKitUI
,MessageUI
,StoreKit
. - Set Enable Modules (C and Objective-C) to Yes in Build Settings.
- Added the -ObjC linker flag to Other Linker Flags in Build Settings
After that I was still having build errors due to the fact that classes under
Libraries/Plugins/iOS are targeting an older version of Google Ads iOS SDK library.
I've also had to remove some explicit calls of dealloc
and autorelease
since I'm using ARC. The code is on Github.
And here's the link to the app (U.S. App Store):