Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

X code Can not build Test unity game.

Discussion in 'iOS and tvOS' started by vrmalleus, May 4, 2018.

  1. vrmalleus

    vrmalleus

    Joined:
    Mar 2, 2018
    Posts:
    3
    Running this test for iOS:
    https://unity3d.com/learn/tutorials/topics/mobile-touch/building-your-unity-game-ios-device-testing

    when I click on Run in Xcode after getting to all of the steps, ( page 18 in the above), I get this error:
    Code Signing Error Group
    "Unity-iPhone" requires a provisioning profile. Select a provisioning profile for the "ReleaseForRunning" build configuration in the project editor.
    Code signing is required for product type 'Application' in SDK 'iOS 11.3'

    Not sure what I'm doing wrong...Help please?
     
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    5,922
    You need an Apple Provisioning Profile as the message states. The link you shared has more information, search for "provisioning"
     
  3. mushdevstudio

    mushdevstudio

    Joined:
    May 9, 2014
    Posts:
    36
    I am getting the same error since moving to Unity 2018 from 5.5.5
     
    leni8ec likes this.
  4. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    5,922
  5. mushdevstudio

    mushdevstudio

    Joined:
    May 9, 2014
    Posts:
    36
    OK it is a problem with the info.plist file.

    To replicate this run this command "plutil info.plist" from terminal in the directory where info.plist is located.

    For me it then told me that " Encountered unexpected character [ on line 2 while parsing inline DTD"

    So because i could not edit the info.plist in Xcode (I was getting a "The data couldn't be read because it isn't in the correct format" dialog box) - I opened the info.plist file with textedit and removed the second line "<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"[]>"

    After that all was good and the build worked fine.
     
    leni8ec likes this.
  6. mushdevstudio

    mushdevstudio

    Joined:
    May 9, 2014
    Posts:
    36
    Jeff not to come across rude and please do not take this personally as I genuinely appreciate you trying to help - but a link to "Building your Unity game to an iOS device for testing" is hardly an answer to the original question.

    After successfully building for iOS and indeed deploying on the app store for a while now this new error that has appeared needed a bit more investigation than a hand ball off to a link could provide.
     
  7. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    5,922
    The original question was about requiring a provisioning profile, which the link describes. You have to scroll down a bit to find it. It sounded to me like this was the OP's first attempt at XCode development, and suggesting to a newbie to edit the plist file on a brand new project would not be my first choice. Had they said "but I already have a provisioning profile", then yes. Granted, to your point, you did say you had it working in 5.5.5, so obviously you already have one. My bad. But you have a different error than the OP, perhaps you meant you have an additional error.
     
  8. mushdevstudio

    mushdevstudio

    Joined:
    May 9, 2014
    Posts:
    36
    Yep totally understand Jeff - Thanks for your help. I should have elaborated - it certainly is a big jump from 5.5.5 to 2018 so I am amazed that this was my biggest hurdle. Anyway all is well that ends well and I hope this helps future troubleshooters :)

    BTW do you know why Unity 2018 inserts the "<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"[]>" in the xml as it seems causes Xcode to think there is an error in the info.plist file?
     
  9. blazinteen15

    blazinteen15

    Joined:
    May 17, 2018
    Posts:
    2
    WOW, jeff "you're really helpful" P.S I have the same issue even though I added my developer id to xcode. I even tried selecting a code signing in the info.plist it still wont work. what do I do???
     
  10. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    5,922
    @blazinteen15 Please show a screenshot of where you are selecting your provisioning profile in XCode.
    Provisioning.png
     
    jasonparks_fb likes this.
  11. blazinteen15

    blazinteen15

    Joined:
    May 17, 2018
    Posts:
    2
    Jeff, I solved the issue.I had selected auto management for signing in general section but had manually assigned provisioning profile(old preference/setting maybe? because it was set automatically for some reason) in build settings, so changing it there to auto fixed it.

    Best,
    Haroon
     
    UnityTester33 likes this.
  12. jipsen

    jipsen

    Joined:
    May 22, 2018
    Posts:
    6
    I had the same issue: "Unity-iPhone" requires a provisioning profile. Select a provisioning profile for the "ReleaseForRunning" build configuration in the project editor.

    I fixed it by selecting Automatically manage signing. It was not selected to begin with and when I tried to download the profiles, it didn't find anything. By selecting auto manage signing, it ran without this error.