iOS Archive Fails

Reply by lukefoster007 | 2024-07-19 05:20:53

do you want me to add these too?

Ensure that your Unity project contains an Assets/link.xml file with the following content to prevent potential FileNotFoundException errors related to the libgrpc_csharp_ext.x64.dylib file:

Create Assets/Scripts/BuildIos.cs script in your Unity project. This script should be added to a game object within your scenes and will automate steps 2 and 3 during the post-build process:

#if UNITY_EDITOR && UNITY_IOS
using System.IO;
using UnityEngine;
using UnityEditor;
using UnityEditor.Callbacks;
using UnityEditor.iOS.Xcode;
public class BuildIos : MonoBehaviour
{
[PostProcessBuild]
public static void OnPostProcessBuild(BuildTarget target, string path)
{
var projectPath = PBXProject.GetPBXProjectPath(path);
var project = new PBXProject();
project.ReadFromString(File.ReadAllText(projectPath));
#if UNITY_2019_3_OR_NEWER
var targetGuid = project.GetUnityFrameworkTargetGuid();
#else
var targetGuid = project.TargetGuidByName(PBXProject.GetUnityTargetName());
#endif
project.AddFrameworkToProject(targetGuid, “libz.tbd”, false);
project.SetBuildProperty(targetGuid, “ENABLE_BITCODE”, “NO”);
File.WriteAllText(projectPath, project.WriteToString());
}
}
#endif

Reply by enormousvampire | 2024-07-19 05:21:56

Yes. The buildos file should be attached to an empty game object in your scene

Reply by enormousvampire | 2024-07-19 05:22:06

It will take care of the linking

Reply by lukefoster007 | 2024-07-19 05:22:16

how do i do that?

Reply by enormousvampire | 2024-07-19 05:23:35

Copy the contents provided in the chat. Make a new c sharp script called Buildios, paste the code and attach the script to a game object

Reply by lukefoster007 | 2024-07-19 05:24:18

In Assets/Convai/link.xml and Assets/Convai/Scripts/BuildIos.cs right?

Reply by enormousvampire | 2024-07-19 05:24:40

Yes

Reply by lukefoster007 | 2024-07-19 05:24:58

this is my current error

Images:

Reply by lukefoster007 | 2024-07-19 05:25:08

i’ll do In Assets/Convai/link.xml and Assets/Convai/Scripts/BuildIos.cs and update you

Reply by lukefoster007 | 2024-07-19 05:27:39

to which game object do you want me to attach Buildios?

Reply by enormousvampire | 2024-07-19 05:28:10

Any empty game object

Reply by lukefoster007 | 2024-07-19 05:30:10

this is my scene, do you want me to craete an empty gameobject in this?

Images:

Reply by lukefoster007 | 2024-07-19 05:31:33

is this okay?

Images:

Reply by lukefoster007 | 2024-07-19 05:38:38

i’m getting this

Images:

Reply by enormousvampire | 2024-07-19 07:37:28

This file that you’re pointing to is not used by our SDK

Reply by enormousvampire | 2024-07-19 07:38:05

I’m not sure what’s the purpose of this file and what it’s doing.

Is this a custom script you added ?

Reply by lukefoster007 | 2024-07-19 07:58:43

burst was added by convai

Reply by lukefoster007 | 2024-07-20 03:23:16

any idea how to fix this <@1023671043287699568> <@614184022121119745> ?

Images:

Reply by lukefoster007 | 2024-07-20 03:36:54

Images:

Reply by k3kalinix | 2024-07-20 06:40:49

Hey <@498573010601508884>