Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Unity 5 Android & ios Setup & Build- Tips & Tricks

Discussion in 'Community Learning & Teaching' started by OJ3D, Aug 27, 2015.

?

How valuable did you find these tips?

  1. Very Valuable

    7 vote(s)
    100.0%
  2. Somewhat Valuable

    0 vote(s)
    0.0%
  3. Not So Valuable

    0 vote(s)
    0.0%
  1. OJ3D

    OJ3D

    Joined:
    Feb 13, 2014
    Posts:
    33
    To Unity Noobs ( Includes myself) -

    For the last couple months I've been working on an app as a proof of concept for both Android and ios. I've worked with Unity beforehand but wanted to see what I could create solo. Anyway, if you're new to unity you'll know how much research goes solely into figuring out what to do in the beginning - especially code wise. Thank god for both the scripting manual, YouTube, and the community.

    The biggest piece of information that I found more important than anything throughout this process was the Platform Setup & Deployment process- You know the "How the Hell do I get this thing Built and on my Device?" question. Oh yeah, you have to include the numerous head banging errors and setup steps that weren't necessarily entirely clear.

    Anyway, because of all the awesome community finds, I wanted to give back and share my findings that I hope helps anyone in need. I can't promise it'll fix all your errors, but it should give you some general guidance in the right direction. This is information I compiled throughout my endeavor and is listed both for Android and ios (especially the dreaded Xcode setup instructions)

    Anyway, hope you guys can find something useful in what I compiled. I provided the instructions below and as an attachment.
    Check out my latest App on the Android Store - Bloated Bob
    Coming to ios real soon.

    Cheers!

    OJ
    @OJ3Dme
    oj3dme@gmail.com




    Unity3D
    Platform Setup & Deployment
    Tips & Instructions
    August 26, 2015


    upload_2015-8-27_14-6-46.png Android

    • Download latest Java SDK
    • Download latest Android Studio
      • This also downloads the Android SDK exe
      • Remember- x86 is for a 32-bit OS, and x64 is for a 64-bit OS
    • Run and install all

    • Run the Android Stduio and install the SDKs desired in App SDK manager (or find the executable at C:\Users\YOUR_USER_NAME\AppData\Local\Android\sdk)

    • Set System Environmental Variables (Java Setup)
      • Go to My Computer > Properties – You show now be in System

      • Go to Advanced System Properties

      • Click Environmental Variables

      • Set the JAVA_HOME environment variable to your Java SDK installation path (for example, C:\Program Files\Java\jdk1.7.0_45).
      • Add the Java SDK's bin folder to your PATH environment variable (for example, C:\Program Files\Java\jdk1.7.0_45\bin)
      • Reboot Computer
    • Every now and then look for Updates - Go in Android Studio/Run from the .exe and update update the SDKs of interest (most likely the latest version of Android SDK should do). As for Java SDK, same. Look for the latest at the Path above. It may require re-setup of the Enviromental Variables (step before this) to point to the latest directory. Check in Unity's "Preferences Options" to make sure the Android SDK and Java SDK directories are pointing correctly( the next step).
    • Go to Unity and Set External Tools
      • Go to Edit > Preferences > External Tools

      • Define Android SDK Location Path

      • Define JDK Location Path
    • Any other external Plugins – Follow requirements and directions
    • Recommended Player Settings for Builds:
        • Rendering
        • Rendering Path - Forward
        • Auto Graphics API – Yes
        • Multithreading - No
        • Static Batching - Yes
        • Dynamic Batching - Yes
        • GPU Skinning - No
        • Identification
        • Bundle Identifier : com.YourEntityName.YourGameName
        • Bundle Version : your version number
        • Build Version Code : your code number
        • Min API Level : Select Earlier Version ( I selected 4.0 )
        • Configuration
        • Device Filter : Ar Mv 7 ( Shrinks File Build Size) – FAT Can Be used too
        • Install Location : Auto
        • Internet Access : Auto
        • Write Access : Your Choice ( I selected Internal)
        • Android Game : Yes
        • Optimization
        • Api Compatibility Level : .NET 2.0 Subset
        • SDK Version : Your Choice
        • Target ios version : 6.0 (To support earlier Devices)
        • Stripping : Use micro mscorlib
        • Vertex Compression : Mixed
    upload_2015-8-27_14-6-52.png ios

    • Download latest Mac OSX and Xcode (which comes with the ios SDKs)

    • Download and install the latest cocoapads using Terminal/Ruby install instructions

    • Install latest Unity3D Patches or get download the latest Unity
    • Patches could help resolve ios-xcode issues before they happen
    • Recommended Player Settings for Builds:
        • Rendering
        • Rendering Path - Forward
        • Auto Graphics API - Yes
        • Static Batching - Yes
        • Dynamic Batching - Yes
        • GPU Skinning - No
        • Identification
        • Bundle Identifier : com.YourEntityName.YourGameName
        • Bundle Version : your version number
        • Configuration
        • Scripting Backend : IL2CPP
        • Target Device : Iphone + IPad
        • Target Res : Native
        • Accelerometer Freq : 60Hz
        • Behavior in Background: Suspend
        • Architecture : Universal
        • Optimization
        • Api Compatibility Level : .NET 2.0 Subset
        • SDK Version : Your Choice
        • Target ios version : 6.0 (To support earlier Devices)
        • Stripping : Disabled
        • Script Call Optimization : Slow and Safe
        • Vertex Compression : Mixed
    Xcode

      • Recommended*
        • GameCenter.framework
        • AddressBook.framework
        • AssestsLibrary.framework
        • CoreData.framework
        • CoreTelephony.framework
        • CoreText.framework
        • Security.framework
        • libc++.dylib
        • libz.dylib
        • CoreMotion.framework
        • Check to make sure they made it in Under the “Build Phase” frameworks/library tab
    • If issues occur, delete frameworks, update again and rebuild

    • Under Both Project and Target Platform “Build Settings”
      • Search – Modules
        • Enable Modules (C & Objective C) – Yes
      • Search –Library Search Paths
        • Remove quotations “ “ from existing paths if any exist for ex: “$(SRCROOT)” should be like $(SRCROOT)
      • Search – Other Linker Flags
        • Add $(OTHER_LDFLAGS)

        • Add -ObjC
      • Search - Code Signing
        • Debug/Release – Select Appropriate Dev Cert ( Developer or Distribution)
      • Search - ios Deployment Target
        • Select the earliest IOS to provide app to earlier ios iPhone models
    • Errors
      • Warning: Directory not found for option
        • Click on project targets > Click on Build Settings > Under Library Search Paths, delete the paths*
      • Under Build Settings > Standard Architectures: armv7, and arm64
    • For IPhone Testing
      • Plug phone in (Test with a real phone! - Apple will reject your app if you don't) the simulator will not suffice and catch everything

      • Go to Developer Apple Member Center portal to create certificate/Signing for Apple device
    • Xcode Downloads (not through Mac Store)->
    • First Go:https://developer.apple.com/support/development/
    • Then click on Xcode which takes you here - https://developer.apple.com/support/xcode/
    • Click on the Beta Page Downloads which takes you here - https://developer.apple.com/downloads/
     
    Last edited: Apr 4, 2016
  2. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Awesome - thanks for giving back.
    This will come in handy.
     
    OJ3D likes this.
unityunity