Search Unity

How do you get iOS support for Unity pro (New to unity)

Discussion in 'Getting Started' started by Mr.NiceGuy, Jan 13, 2016.

  1. Mr.NiceGuy

    Mr.NiceGuy

    Joined:
    Jan 4, 2013
    Posts:
    31
    Hello,

    I got unity 5 pro and I wanted to try out my level on the iPhone and I dont seem to have support so I can export it. How can I get support for it? Do I download it some where? Or do you update your unity somewhere ? I got the latest unity so I dont know what I am doing wrong.

    Thank you
     
  2. Mr.NiceGuy

    Mr.NiceGuy

    Joined:
    Jan 4, 2013
    Posts:
    31
    I am running windows btw
     
  3. jhocking

    jhocking

    Joined:
    Nov 21, 2009
    Posts:
    814
    The newest Unity installer has checkboxes for each platform you're going to support. Did you check iOS while installing?
     
  4. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,512
    It is, as jhocking said, an option when installing Unity.
    installer-options.PNG

    Additionally, if you weren't already aware, you'll need a Mac to actually be able to open the exported files and publish an iOS app.
     
  5. jhocking

    jhocking

    Joined:
    Nov 21, 2009
    Posts:
    814
    oh right, I missed
    iOS development requires a mac
     
  6. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,512
    My assumption is that as long as you enable the iOS Build Support checkbox when installing Unity, you'll be able to Publish for iOS from within Unity. You just can't do anything with the produced XCode project. This would allow you to have a PC where you do your game development, and a Mac that gets the XCode files to build the app.

    I haven't actually tried this, so I don't know if it works that way.
     
  7. Mr.NiceGuy

    Mr.NiceGuy

    Joined:
    Jan 4, 2013
    Posts:
    31
    OH! ok thank you so much guys. I did it now but I am having a new issue. I did the install, is it normal to only go up to 9.0 on iOS build? I mean the highest is Unkown which is weird. I have my iPhone updated to 9.2. Will that be a problem if I build the game and run it on xcode? Also I do have a macbook pro for the xcode part. Thanks guys.
     
  8. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,512
    9.0 is fine. You're targeting the minimum OS version, and generally the X.0 releases are fine for iOS as far as I know, since that's when big feature changes are added or removed.
     
  9. Mr.NiceGuy

    Mr.NiceGuy

    Joined:
    Jan 4, 2013
    Posts:
    31
    Ok cool!! Thank you! Also will I need a Apple Developers account to test my app on my phone? Because I keep getting errors on my xcode.
     
  10. Mr.NiceGuy

    Mr.NiceGuy

    Joined:
    Jan 4, 2013
    Posts:
    31
    The unity build went perfect. But now I am trying to test it on my iPhone and I am getting these two errors constantly. I here are the screen shots. Screen Shot 2016-01-14 at 1.35.03 PM.png
     
  11. Mr.NiceGuy

    Mr.NiceGuy

    Joined:
    Jan 4, 2013
    Posts:
    31
    Is it the way I build my game? I put it as development build and release build.
     
  12. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,512
    Not too long ago, Apple revised their development policy so that you can now build directly to a device you own without having a Developer account. You'll still need the account to publish, but that's down the road still.

    One thing you want to make sure to not do is use Xcode's auto-resolve issue feature. There'll be hundreds of warnings when you open a Unity-generated project, but they'll be fine as long as you don't let Xcode fix them. If you try letting Xcode fix them, you'll end up with more errors once you attempt to build. What you do have to fix are the errors, and these you should look into and resolve manually.

    I have limited experience publishing iOS apps, and don't read ObjectiveC errors too well, so I just look for key words that jump out at me. One that I'm seeing is armv7. Remember that with iOS 8 or 9, Apple requires all apps to support 64-bit architecture (arm64). When you're building in Unity, make sure you set the Architecture setting to either ARM64 or Universal.

    Build again, and retry.
     
  13. Mr.NiceGuy

    Mr.NiceGuy

    Joined:
    Jan 4, 2013
    Posts:
    31
    Thank you so much. I will give it a shot. Thanks!!!
     
  14. Mr.NiceGuy

    Mr.NiceGuy

    Joined:
    Jan 4, 2013
    Posts:
    31
    I wanted to ask also. Is it ok to build in 8.1? But still play it in 9.2 devices? Or does it need to be 9.0 and up for them to run? Also When do you recommend for building my game. What settings should I have? Here is a screen shot of them. Screen Shot 2016-01-15 at 6.40.49 AM.png Screen Shot 2016-01-15 at 6.44.41 AM.png
     
  15. Mr.NiceGuy

    Mr.NiceGuy

    Joined:
    Jan 4, 2013
    Posts:
    31
    Also I wanted to know. Where can I find the xcode auto resolve thing you mentioned earlier? Thank you.
     
  16. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,512
    Is it ok to build in 8.1? But still play it in 9.2 devices? Or does it need to be 9.0 and up for them to run?
    The target iOS Version is the minimum version the user must have to be able to install your app, or even see it in the App Store. It's perfectly fine to target older versions as long as you're sure you don't need features only available in newer versions of iOS.

    For example, Game Center changes a bit with each major release. iOS 7 introduced exhanges to Turn-Based matches, so you could have things happen between player turns. If you're making use of exchanges, you cannot target iOS 6.x. Generally, you'll want to target the lowest version possible that has the features you need to maximize your audience. iOS users are actually really good about updating their devices, as seen here, but every extra user you can acquire helps.

    When building my game, what settings should I have?
    This is a tough question, and will differ a bit from project to project. The iOS subforum has a few topics about this, including some about how to fix potential il2cpp errors, reducing build size, and how to avoid code issues that will get your app rejected by Apple.

    The settings you currently have should be sufficient for building and testing as far as I can see. Maybe switch on Development/Debugging from your build menu to be able to get better readability with your errors.

    Where can I find the xcode auto resolve thing you mentioned earlier?
    You're not supposed to use it, remember? So don't worry about it. ;)

    But seriously, I'm at work and my MacBook is at home, so I can't tell you off the top of my head. Trust me, though, better to ignore the warnings and resolve errors yourself.
     
    Mr.NiceGuy likes this.
  17. Mr.NiceGuy

    Mr.NiceGuy

    Joined:
    Jan 4, 2013
    Posts:
    31
    Ahh ok thank you so much!! I will check out the articles you gave me. Also the reason for the xcode auto resolve. I wanted to find it so I can see if I had it turned on or not. :D Thank you tho. I will make a new build with this in mind! As for my game. Its really a demo level of the camera being animated to move around the level. So only animations and particles are being used. So thats perfect! Thank you. I am going to do a rebuild again.
     
  18. Mr.NiceGuy

    Mr.NiceGuy

    Joined:
    Jan 4, 2013
    Posts:
    31
    Ok so I did a build with the new settings you suggested and it worked. Thank you! But! Now I have a new build error in xcode. I got the same level I built successfully and added the "Google Cardboard VR" to it and it works great in unity and when I build it it works but when I go to Xcode and try to build on my iPhone this is what I get as a error. Have any idea what it is? Also here is my google cardboard settings in screen shot along with build error. Thank you. Screen Shot 2016-01-15 at 4.21.13 PM.png new shot.png
     
  19. Mr.NiceGuy

    Mr.NiceGuy

    Joined:
    Jan 4, 2013
    Posts:
    31
  20. Mr.NiceGuy

    Mr.NiceGuy

    Joined:
    Jan 4, 2013
    Posts:
    31
  21. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,512
    Debugging external libraries and specific build errors (especially remotely) is beyond my ability. You're better off Googling those specific errors, cross-referencing with whatever libraries you're adding, which version of iOS you're running/building for, etc.

    You might want to back up a bit and get an empty project built and running first, so you can be sure it isn't an issue with your general config settings. Then add one thing in, build and check. Rinse and repeat. Doing it that way helps narrow in on what the culprit might be.
     
  22. Mr.NiceGuy

    Mr.NiceGuy

    Joined:
    Jan 4, 2013
    Posts:
    31
    I did what you said and everything was fine until I added the Google Cardboard into my game. I saw the same issue with google Cardboard and someone said you need to add "Security.Framework" into your build. So now what I want to know is where can I find this "frame.work" so I can add it to xCode.
     
  23. Mr.NiceGuy

    Mr.NiceGuy

    Joined:
    Jan 4, 2013
    Posts:
    31
  24. Mr.NiceGuy

    Mr.NiceGuy

    Joined:
    Jan 4, 2013
    Posts:
    31
  25. jhocking

    jhocking

    Joined:
    Nov 21, 2009
    Posts:
    814
    As Schneider said, you're not really asking about Unity anymore, so you'll probably find answers in a place that's about Xcode or Google Cardboard.

    The one Unity-specific thing is that you can automate adjustments to the Xcode project, so that you don't have to adjust it manually every build. Be warned though that it's not really beginner stuff; lookup PostProcessBuildAttribute
     
    Schneider21 likes this.
  26. Mr.NiceGuy

    Mr.NiceGuy

    Joined:
    Jan 4, 2013
    Posts:
    31
    Alright thank you so much. Also how do I automate it?