Search Issue Tracker

Fixed in 5.4.2

Votes

5

Found in

5.4.0b15

Issue ID

793624

Regression

Yes

Unity does not include UnityEditor.iOS.Xcode in project file

iOS

-

How to reproduce:

1. Open a new project
2. Create a script and place it in a folder named 'Editor'.
3. Add "using UnityEditor.iOS.Xcode;" to the top of the script
4. Add "PBXProject project = new PBXProject();" to the Start() message
5. Save and switch back to Unity
- Note that Unity compiles the code successfully, but in the editor the code is displayed in red

- Reproduced in Version 5.4.0b17 (d34aa569a642), Version 5.3.4p4 (43a3882ae25c)
- Not reproducible in Version 5.2.4f1 (98095704e6fe)

Comments (36)

  1. zzzzzz789

    Nov 15, 2016 10:59

    Thank you Ethan! (ETHAN_VISUALVOCAL)

    The steps you posted on 10/13 - adding the reference manually to the project in Monodevelop has fixed the build issue for me. This still was effecting me on 5.4.2f2

  2. van800

    Oct 26, 2016 13:56

    I have added a hack that fixes this for Rider
    https://github.com/JetBrains/Unity3dRider/commit/3c3e05b6f4e5fb87c476cd673e45ac5891684b01

    (you may use this code in your own plugin, which will work for monodevelop)

  3. van800

    Oct 24, 2016 10:11

    Yeah, this is still an issue for MonoDevelop and Rider, but it is somehow fixed in Unity-VisualStudio.
    https://github.com/JetBrains/Unity3dRider/issues/15

  4. WillemKokke

    Oct 22, 2016 15:05

    Still very much happening in 5.4.2f1I'm afraid.

  5. MechEthan

    Oct 20, 2016 20:29

    SHAWHU - Sounds like you have an unrelated problem.

    You cannot reference UnityEditor libraries inside an Xcode project. Be sure to place any scripts you have referencing anything under UnityEditor (including UnityEditor.iOS.Xcode) under an "Editor" folder -- this will keep Unity from trying to export them to the Xcode project.

    The use case for this particular library is having the Unity Editor itself run some scripts that use the PBXProject class while producing the Xcode project, not to put it inside the Unity-built Xcode project.

  6. shawhu

    Oct 18, 2016 02:38

    actually, what I guess the best thing to do is to inform Unity3d and let them fix it or at least give an ack. the current status is still labeled fixed in 5.4.2 which is wrong. and they didn't have any official words about this issue. did they know about this? are they working on a fix? do they have a temp workaround?

  7. shawhu

    Oct 18, 2016 02:31

    editing preference is fine, but have you actually exported the project to use with xcode successfully? when we tried to export the project the added reference got somehow un-referenced in the process. we seems not be able to add the reference and make it work through the actual "exporting to xcode project" phase.

  8. fullmontag

    Oct 17, 2016 16:20

    definitely reproduced in 5.4.2
    fixed by #ETHAN_VISUALVOCAL comment above.
    but also look at
    http://stackoverflow.com/questions/37083314/how-do-i-edit-references-in-monodevelop
    if you have trouble editing preferences as he suggests

  9. shawhu

    Oct 17, 2016 10:54

    the workaround that manually add reference only works in unity editor. when we tried to compile to xcode project, the problem reappear again. So it's useless unless we can make it work in xcode. After all the whole meaning of this is to manipulate plist file automatically when generating xcode project structures.

  10. adamt

    Oct 16, 2016 23:03

    Same, still broken in 5.4.2. Interestingly, searching the 5.4.2 release notes for this issue ID doesn't bring up any results. Seems like one hand isn't talking to the other...

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.