Skip to content

Commit

Permalink
Fix facebook#712 by removing FixColdStart()
Browse files Browse the repository at this point in the history
Due to Unity trampoline changes this is now misbehaving and modifying one function below (`isBackgroundLaunchOptions`) which causes a crash - see facebook#712
  • Loading branch information
xTheEc0 committed Jan 23, 2024
1 parent 9abd766 commit c70f5d5
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions Facebook.Unity.Editor/iOS/FixupFiles.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,6 @@ namespace Facebook.Unity.Editor

public class FixupFiles
{
private static string didFinishLaunchingWithOptions =
@"(?x) # Verbose mode
(didFinishLaunchingWithOptions.+ # Find this function...
(?:.*\n)+? # Match as few lines as possible until...
\s*return\ )NO(\;\n # return NO;
\}) # }";

public static void FixColdStart(string path)
{
string fullPath = Path.Combine(path, Path.Combine("Classes", "UnityAppController.mm"));
string data = Load(fullPath);

data = Regex.Replace(
data,
didFinishLaunchingWithOptions,
"$1YES$2");

Save(fullPath, data);
}

public static void AddBuildFlag(string path)
{
string projPath = Path.Combine(path, Path.Combine("Unity-iPhone.xcodeproj", "project.pbxproj"));
Expand Down

0 comments on commit c70f5d5

Please sign in to comment.