Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #712 by removing FixColdStart() #713

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion Facebook.Unity.Editor/FacebookPostprocess.cs
Expand Up @@ -68,7 +68,6 @@ public static void OnPostProcessBuild(BuildTarget target, string path)
if (target.ToString() == "iOS" || target.ToString() == "iPhone")
{
UpdatePlist(path);
FixupFiles.FixColdStart(path);
FixupFiles.AddBuildFlag(path);
}

Expand Down
20 changes: 0 additions & 20 deletions Facebook.Unity.Editor/iOS/FixupFiles.cs
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