icosa-foundation / open-brush

Open Brush is the open source, community led evolution of Tilt Brush! Forked from https://github.com/googlevr/tilt-brush
https://openbrush.app
Apache License 2.0
777 stars 166 forks source link

Fix iOS builds after the unity upgrade #733

Closed mikeage closed 1 week ago

mikeage commented 1 week ago

Set ld_classic via fastfile

Online sources suggest that the following change should also work, but I saw that it wasn't being passed to the link call. So we'll do it this way.

diff --git a/Assets/Editor/BuildTiltBrush.cs b/Assets/Editor/BuildTiltBrush.cs
index 8e5652fc..314d0eba 100644
--- a/Assets/Editor/BuildTiltBrush.cs
+++ b/Assets/Editor/BuildTiltBrush.cs
@@ -1824,6 +1824,9 @@ static class BuildTiltBrush
                     // TODO:Mikesky - I've disabled this disable, does bitcode work now?
                     //project.SetBuildProperty(pbxTarget, "ENABLE_BITCODE", "false");

+                    // Starting with the upgrade to Unity 2023, this seems to be required
+                    project.AddBuildProperty(pbxTarget, "OTHER_LDFLAGS", "-ld_classic");
+
                     File.WriteAllText(pbxPath, project.WriteToString());

                     string plistPath = path + "/Info.plist";

Additionally, this PR updates the fastlane action, and builds an ipa on all jobs. But we'll only push to testflight (or the app store) on a merge to main, like before. edit: no, this doesn't work because of the package name mismatch. maybe I'll fix this another day, but not here