Welcome! › Forums › Unity Plugins › Mobile Speech Recognizer › [iOS] Unity 2019.3.0b11 – PBXProject.GetUnityTargetName() is deprecated.
Tagged: Mobile Speech Recognizer, unity, Xcode
- This topic has 8 replies, 2 voices, and was last updated 4 years, 9 months ago by Senthamizh.
-
AuthorPosts
-
November 18, 2019 at 3:54 pm #1849SenthamizhParticipant
After upgrading to the Unity 2019.3.0f11 I’ve come to know that the PBXProject.GetUnityTargetName() is deprecated. This results in Build error. I’ve tried with the given alternatives like PBXProject.GetUnityMainTargetGuid() & PBXProject.GetUnityFrameworkTargetGuid(). It didn’t work. Xcode 11.2.1 keeps throwing this error.
- This topic was modified 4 years, 9 months ago by Senthamizh.
November 19, 2019 at 2:32 pm #1852SenthamizhParticipantI tried changing the line 27 to string projectTarget = proj.TargetGuidByName(“Unity-iPhone”); directly. And this is what I’ve got.
November 19, 2019 at 5:04 pm #1855PiotrKeymasterHi,
It seems your project isn’t linked againstSpeech
framework.Open xcode project, select your target, go to “Build Phases”, “Link Binary With Libraries”, click on a plus icon in bototm left and add “Speech” framework.
November 20, 2019 at 7:56 am #1864SenthamizhParticipantHi,
I’ve added theSpeech
framework in Xcode as you said and I still get the same error.I’m guessing the problem is with the
"KKAddSpeechFrameworkOniOS"
script.I’ve tried using the
PBXProject.GetUnityMainTargetGuid();
&
PBXProject.GetUnityFrameworkTargetGuid();
instead of
PBXProject.GetUnityTargetName
at
string targetName =
and found by logging that
string projectTarget = proj.TargetGuidByName
returns Null value for both. But Build success with exception error. (In Unity only).
Removing the entire asset files and tried. Unity and Xcode builds without any issue.
Using the plugin is causing the issue. You probably need to update the asset maybe?
my current setup.
Unity 2019.3.0b11
Xcode Version 11.2.1 (11B500)November 20, 2019 at 9:57 am #1865PiotrKeymasterI am not sure why Unity broke this API, but as a workaround you can simply go to
KKAddSpeechFrameworkOniOS.cs
and setshouldRun
tofalse
.Then add
Speech
framework manually as I described above.November 20, 2019 at 2:30 pm #1866SenthamizhParticipantYeah I’ve tried what you said exactly and again it get build errors.
I’m attaching the them. Please check. Thanks.
November 20, 2019 at 6:08 pm #1868PiotrKeymasterRegarding screenshot from Unity about
PBXProject.TargetGuidByName
error – this is coming fromUnityAdsEditor
, not Speech Recognizer – it seems Unity broke their own plugin with this API change, you probably should file a bug for them 🙂Regarding xcode – not sure where you added, but there’s no way your project would have only one framework linked against. It should look like that:
December 9, 2019 at 1:54 pm #1917PiotrKeymasterThis issue is fixed in latest version.
December 10, 2019 at 4:39 am #1920SenthamizhParticipantGreat! Thanks, I will try it now. 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.