Start a new topic

Error while using Cloud Build for iOS

I'm attempting my first Unity iOS cloud build, and I haven't been terribly successful.  The build fails with the error "WikitudeSDK not found in dylib search path".

After looking at other forum posts, I've tried adding a post process build script, but I'm still pretty new at this, so I may have made an error.


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using UnityEditor.Callbacks;
using UnityEditor.iOS.Xcode;
using UnityEditor.iOS.Xcode.Extensions;

public class iOSPostProcessBuild 

    public static void OnPostProcessBuild(BuildTarget buildTarget, string path)
        if (buildTarget == BuildTarget.iOS)
            string projectPath = path + "/Unity-iPhone.xcodeproj/project.pbxproj";

            PBXProject pbxProject = new PBXProject();

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

            string frameworkPath = "Frameworks/Plugins/iOS/WikitudeNativeSDK.framework";
            string fileGuid = pbxProject.FindFileGuidByProjectPath(frameworkPath);

            pbxProject.AddFileToBuild(target, fileGuid);
            pbxProject.AddFileToEmbedFrameworks(target, fileGuid);
            foreach (var configName in pbxProject.BuildConfigNames())
                var configGuid = pbxProject.BuildConfigByName(target, configName);
                pbxProject.SetBuildPropertyForConfig(configGuid, "LD_RUNPATH_SEARCH_PATHS", "$(inherited) @executable_path/Frameworks");



1 Comment


This is the version that we're using for our CI builds:

static void UpdateXcode(BuildTarget buildTarget, string pathToBuildProject) {
    if (buildTarget == BuildTarget.iOS) {
        var projectPath = Path.Combine(Path.Combine(pathToBuildProject, "Unity-iPhone.xcodeproj"), "project.pbxproj");
        var project = new PBXProject();

        var framework = project.FindFileGuidByProjectPath("Frameworks/WikitudeSDK.framework");
        var target = project.TargetGuidByName(PBXProject.GetUnityTargetName());
        project.AddFileToEmbedFrameworks(target, framework);


If this still doesn't work, please specify which version of the Wikitude SDK, Unity Editor and Xcode you're using.

Thank you,


Login or Signup to post a comment