- Home /
Adding framework for IOS
Hello, I am newbie at Unity game development. Please excuse me if my question is not convenient.
I try to integrate Kidoz SDK in my game using this integration guide :
https://github.com/Kidoz-SDK/KIDOZ_Unity_SDK_Example
It works perfectly for the android version. I can see banners and other ads on my android test device.
On the other hand, I don't have a mac and I develop the game on my PC and built the game on Unity Cloud for IOS version. So I couldn't use XCODE.
What my problem is Kidoz is initialized successfully on my iPhone test device but get errors while loading ads.
In integration guide , "When compiling for iOS please add the following frameworks: libsqlite3.tbd, webkit.framework" is written.
I think I may have problems in adding frameworks. I create a folder named Editor in Assets and write the script below :
using System.IO;
using UnityEngine;
using UnityEditor;
using UnityEditor.Callbacks;
using UnityEditor.iOS.Xcode;
public class BuildPostProcessor
{
[PostProcessBuild]
public static void OnPostProcessBuild(BuildTarget target, string path)
{
if (target == BuildTarget.iOS)
{
PBXProject project = new PBXProject();
string sPath = PBXProject.GetPBXProjectPath(path);
project.ReadFromFile(sPath);
string g = project.GetUnityFrameworkTargetGuid();
ModifyFrameworksSettings(project, g, sPath);
File.WriteAllText(sPath, project.WriteToString());
}
}
static void ModifyFrameworksSettings(PBXProject project, string g, string sPath)
{
Debug.Log(">> Automation, Frameworks... <<");
project.AddFrameworkToProject(g, "webkit.framework", false);
project.AddFrameworkToProject(g, "libsqlite3.tbd", false);
project.AddBuildProperty(g,
"ENABLE_BITCODE",
"false");
}
}
I also search for frameworks and download them to my local and try to add them with scripting for building but nothing happens.
In the end, app is successfully built on cloud but gets error on runtime while ads are loaded.
Any help is appreciated. Thank you.
Your answer
