PDA

View Full Version : Trouble building Unity SDK Example for iOS



aweissflog
May 11th, 2017, 11:12 AM
Hi, I'm trying to build the Unity Quickstart example for iOS and run into 2 problems.

The first is a C# compilation error because of a redeclared variable 'error' in TeamSpeakClient.cs line 181 (inside the #if UNITY_IPHONE block):


uint error;
if (!started && !connected)
{
#if UNITY_IPHONE && !UNITY_EDITOR
uint error = TeamSpeakInterface.ts3client_initClientLib(ref cbs, ref cbs_rare, (int)(LogTypes.LogType_FILE | LogTypes.LogType_CONSOLE), null,null);
#elif UNITY_ANDROID && !UNITY_EDITOR

Fixing this leads to the second problem, a "Plugins colliding with each other" for the libts3client.a library, here's the error from the Unity editor console:


Plugin 'libts3client.a' is used from several locations:
Assets/TeamSpeak/iOS/Data/simulator/libts3client.a would be copied to <PluginPath>/libts3client.a
Assets/TeamSpeak/iOS/Data/device/libts3client.a would be copied to <PluginPath>/libts3client.a
Please fix plugin settings and try again.

Is the iOS Unity support in a state where it is supposed to be working, or are there any known issues and I should wait until these are resolved?

Versions are: Unity 5.6.0f3 Personal, macOS 10.12.5 Beta, Xcode 8.3.2

Thanks!

thorwe
May 16th, 2017, 09:49 AM
An update for the Unity SDK Example is in the works.

UNITY_IPHONE has recently been deprecated by Unity for UNITY_IOS (not sure if that's your version, but a thing to keep in mind).
uint error = should ofc be error =

Unity doesn't handle it well that we got two sdk client libraries for the two architectures. We're looking into making that more convenient, you can workaround this by simply moving the .a that isn't part of your build target (i.e. when building for the simulator, moving the one in device/) out of the folder structure temporarily.

Alex_G
May 18th, 2017, 08:17 AM
Hi,

you can download the new unity3d 5 plugin from our website.

We fix the IOS and Android problems.

kind regards

Alex