You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I was trying to upload ios build using static library of yours and I found 2 issues in your build scripts causing issues.
Since you copy static library at build time from streaming assets to plugins folder, by default unity marks the Add to Embedded Binaries flag true which was causing your static library to be embedded as a binary into frameworks instead of just linking as a library. I had to use this post build script to fix that.
public static void FixLLMIOSPlugins()
{
// Path to your .a in Plugins/iOS (relative to Assets)
string pluginPath = "Assets/Plugins/iOS/LLMUnity/undreamai-v1.2.1-llamacpp/libundreamai_ios.a";
// Attempt to get the PluginImporter for this file
var importer = AssetImporter.GetAtPath(pluginPath) as PluginImporter;
if (importer == null)
{
Debug.LogError($"Could not find PluginImporter at path: {pluginPath}");
return;
}
// Ensure it’s enabled for iOS, but not embedded
importer.SetCompatibleWithPlatform(BuildTarget.iOS, true);
// Different Unity versions name these keys slightly differently,
// but typically "AddToEmbeddedBinaries" or "AddToXcodeEmbeddedFrameworks"
importer.SetPlatformData(BuildTarget.iOS, "AddToEmbeddedBinaries", "false");
// Make sure it’s added to Xcode, so it gets linked
importer.SetPlatformData(BuildTarget.iOS, "AddToXcode", "true");
// Some Unity versions also have:
// importer.SetPlatformData(BuildTarget.iOS, "AddToXcodeLinkFramework", "true");
importer.SaveAndReimport();
Debug.Log("Fixed iOS plugin import settings for: " + pluginPath);
}
After copying the library, your build scripts did not delete original files from streaming assets so it was being ended copied as raw files into ipa and app store did not allow it. So I had to make sure to remove them as well.
It would be great if you can fix these issues for future releases. Thanks,
Steps to reproduce
No response
LLMUnity version
No response
Operating System
None
The text was updated successfully, but these errors were encountered:
Describe the bug
Hi, I was trying to upload ios build using static library of yours and I found 2 issues in your build scripts causing issues.
It would be great if you can fix these issues for future releases. Thanks,
Steps to reproduce
No response
LLMUnity version
No response
Operating System
None
The text was updated successfully, but these errors were encountered: