Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecated Building Method in 2019.3+ #51

Closed
daltonbr opened this issue Jun 11, 2020 · 3 comments · Fixed by #52
Closed

Deprecated Building Method in 2019.3+ #51

daltonbr opened this issue Jun 11, 2020 · 3 comments · Fixed by #52
Assignees

Comments

@daltonbr
Copy link

At line 33 in Cardboard/Editor/CardboardEditorHelper.cs

string target = proj.TargetGuidByName("Unity-iPhone");

Got this error

Error building Player: Exception: Calling TargetGuidByName with name='Unity-iPhone' is deprecated. There are two targets now, call GetUnityMainTargetGuid() - for app or GetUnityFrameworkTargetGuid() - for source/plugins to get Guid instead.

My trivial solution was this.

#if UNITY_2019_3_OR_NEWER
            string target = proj.GetUnityMainTargetGuid();
#else
            string target = proj.TargetGuidByName("Unity-iPhone");
#endif
@cai-mobfish cai-mobfish self-assigned this Jun 11, 2020
@cai-mobfish
Copy link
Contributor

Just going to create this issue and found this issue is already created.

2 points here:

  • TargetGuidByName should not be used.
  • Unity has now an extra targets, called UnityFramework, its bitcode has to be set to no in order to compile successfully. So multiple targets should be used to disable bitcode.

Fix is in testing and is on the way.

@cai-mobfish cai-mobfish linked a pull request Jun 11, 2020 that will close this issue
@cai-mobfish cai-mobfish added this to the ReleaseCandidate 0.8 milestone Jun 11, 2020
@daltonbr
Copy link
Author

Very interesting, I was a bit confused by the documentation.
Great job @cai-mobfish! 👏

@cai-mobfish
Copy link
Contributor

cai-mobfish commented Jun 12, 2020

@daltonbr You can create a new ticket if documentation is not clear for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants