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.
  2. Dismiss Notice

Guide to Building to iOS?

Discussion in 'iOS and tvOS' started by ALAN!, Mar 1, 2015.

  1. ALAN!

    ALAN!

    Joined:
    Jan 26, 2013
    Posts:
    16
    Is there just a simple guide out there for the steps to build a Unity project on iOS?

    I updated to the latest versions of Unity, iOS, and Xcode. I bought the $99/year company Apple developer license for my LLC. I registered my device, got my certificate and provisioning profile. When I hit Build & Run in Unity, it seems to go well, goes over to Xcode, builds it, and Xcode says it successfully deploys the game to my iPhone, but my iPhone doesn't seem to respond. No new app is created and the game doesn't play.

    After about 5 minutes, if I don't do anything, this message pops up:


    Here's a screenshot of my Xcode, while it says the game is "running" (though it isn't really). Is there anything I haven't set up correctly?

     
  2. arkon

    arkon

    Joined:
    Jun 27, 2011
    Posts:
    1,122
    Make sure you have a provisioning profile for it and a developer certificate installed. Then make sure your iPad is in developer mode. To check that go to iPad settings and look to see if you have a developer tab there. (I can't remember how you turn on developer mode, I think it's automatic when you run something with a developer certificate and profile.
     
  3. ALAN!

    ALAN!

    Joined:
    Jan 26, 2013
    Posts:
    16
    From what I understand, Developer Tools is no longer a menu in General Settings with the latest iOS. You activate Developer Mode on an iOS device by connecting it to Xcode and selecting Use device for Development, which I've done.
     
  4. ALAN!

    ALAN!

    Joined:
    Jan 26, 2013
    Posts:
    16
    Don't mean to be a pest or anything, but does anyone have any idea I could try? Would really appreciate it!! Still haven't made much headway.
     
  5. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,409
    just a suggestion, but check available storage space on the device?
     
  6. ALAN!

    ALAN!

    Joined:
    Jan 26, 2013
    Posts:
    16
    Yes, there's a lot of space on my iPhone.

    I built a new version of the project from Unity. Now there are several errors within XCode:



    ——



    ——




    ——

    Does anyone know any resource or anything I can use to learn how to deal with these errors?
     
  7. arkon

    arkon

    Joined:
    Jun 27, 2011
    Posts:
    1,122
    Ok, no there isn't any help out there for stuff like this. First you need at least a successful build and deployment on a blank project to make sure the whole process is working ok. So create a new blank project. Add 1 scene with nothing but a camera in it. Add some simple GUI text in an OnGUI section. edit project settings and add this scene to the scenes dialog. fill in the target settings properly, make sure you have something like com.company.test as the bundle identifier. and test as the project name in product name box.

    Make sure the target in build setting is set to IOS.
    Build from the build settings dialog (don't do build and run)
    when done, open project in Xcode. open Xcode 1st then load other and find the file Unity-iPhone.xcodeproj
    once it's in Xcode make sure at the top it says Unity-IPhone>name of your iPhone or iPad
    change the team to your team in general settings.
    devices universal
    on build settings tab co to code signing and click on provisioning profile and add your wildcard profile
    In the code signing identity add you debug developer identity.
    build in Xcode by pressing the > button at the top.

    if you follow this it should all work and run on the device. do this before you do your main project then let me know what happens.
     
  8. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,066
    I haven't done a build for iOS in a while, but "back in the old days" there was always a problem with "Build & Run". Safer to just "Build", then open the project up manually in Xcode and go from there.
     
  9. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,033
    I'd read this guide very carefully, then make a blank project in Xcode to verify that you can build at all to the device. What SteveJ said was also very much a thing back when I tried it last. Heck, even build and run on OS X has flaked out occasionally in previous Xcode versions!

    I'd also recommend getting the very latest Xcode beta if you aren't already using it.
     
  10. ALAN!

    ALAN!

    Joined:
    Jan 26, 2013
    Posts:
    16
    Thanks for all your advice guys (and/or gals)!

    When I try to build a blank project with just some GUI text and a simple cube, it builds an app to my phone, but when I open the app, it just shows me a blue screen, with no GUI text. I also get all these dang errors in Xcode after I build:



    Has anyone seen this before?
     
  11. martonekler

    martonekler

    Unity Technologies

    Joined:
    Feb 5, 2015
    Posts:
    31
    Hi ALAN!

    Is the scene showing correctly inside Unity editor in play mode?
    When running on the device, do you screen a uniform blue color or maybe the blue area of the skybox?
    Could you also share what exact version of Xcode, iOS and Unity are you using and what device?

    Thanks!