Skip to content

Instantly share code, notes, and snippets.

@edwios
Last active January 31, 2020 09:08
Show Gist options
  • Save edwios/bab3dc3fa3a79e7b97ed6f181d135ce1 to your computer and use it in GitHub Desktop.
Save edwios/bab3dc3fa3a79e7b97ed6f181d135ce1 to your computer and use it in GitHub Desktop.
IWCT for iOS

IWCT (Unity-IBM) Patches

There are a number of fatal exceptions that will throw when IWCT is compiled under iOS. Followings are the changes required for IWCT to work on the iOS.

Patch InstantPreview.cs

Path: /Assets/GoogleVR/Scripts/InstantPreview/Internal/InstantPreview.cs


private static void RunCommand(string fileName, string arguments, out string output, out string errors)
{
	if (string.IsNullOrEmpty(fileName)) {
	    output = "";
	    errors = "";
	    return;

Patch WaveFile.cs

Path: /Assets/IBMSdkCore/Utilities/WaveFile.cs


public static AudioClip ParseWAV(string clipName, byte[] data)
{
	if (data.Length == 0) {
		return null;
	}

Patch WatsonLogic.cs

Path: /Assets/Scripts/WatsonLogic.cs

private void OnError(string error)
{
	Active = false;
	Log.Debug("AvatarPatternError.OnError", "Error! {0}", error);
	OnListen();
}
private void Start()
{
        LogSystem.InstallDefaultReactors();
        eventActions = GameObject.FindObjectOfType<EventActions>();
	eventActions = new EventActions();

Replace Newtonsoft JSON

Replace Newtonsoft JSON with AOT IILC commpatible version.

Path: /Assets/IBMSdkCore/ThirdParty/JsonDotNet/AOT/Newtonsoft.Json.dll Replace by the one from Daddon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment