Skip to content

Commit

Permalink
Remove build_phases from macos setup
Browse files Browse the repository at this point in the history
  • Loading branch information
pdenert committed Jan 31, 2025
1 parent 7c8c127 commit 0fefe26
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 71 deletions.
11 changes: 9 additions & 2 deletions dev/e2e_app/macos/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ PODS:
- CocoaAsyncSocket (~> 7.6)
- Flutter
- FlutterMacOS
- webview_flutter_wkwebview (0.0.1):
- Flutter
- FlutterMacOS

DEPENDENCIES:
- app_links (from `Flutter/ephemeral/.symlinks/plugins/app_links/macos`)
Expand All @@ -21,6 +24,7 @@ DEPENDENCIES:
- FlutterMacOS (from `Flutter/ephemeral`)
- geolocator_apple (from `Flutter/ephemeral/.symlinks/plugins/geolocator_apple/macos`)
- patrol (from `Flutter/ephemeral/.symlinks/plugins/patrol/darwin`)
- webview_flutter_wkwebview (from `Flutter/ephemeral/.symlinks/plugins/webview_flutter_wkwebview/darwin`)

SPEC REPOS:
trunk:
Expand All @@ -39,6 +43,8 @@ EXTERNAL SOURCES:
:path: Flutter/ephemeral/.symlinks/plugins/geolocator_apple/macos
patrol:
:path: Flutter/ephemeral/.symlinks/plugins/patrol/darwin
webview_flutter_wkwebview:
:path: Flutter/ephemeral/.symlinks/plugins/webview_flutter_wkwebview/darwin

SPEC CHECKSUMS:
app_links: 10e0a0ab602ffaf34d142cd4862f29d34b303b2a
Expand All @@ -47,8 +53,9 @@ SPEC CHECKSUMS:
flutter_timezone: 6b906d1740654acb16e50b639835628fea851037
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
geolocator_apple: 72a78ae3f3e4ec0db62117bd93e34523f5011d58
patrol: 0564cee315ff6c86fb802b3647db05cc2d3d0624
patrol: cf2cd48c7f3e5171610111994f7b466cd76d1f57
webview_flutter_wkwebview: 0982481e3d9c78fd5c6f62a002fcd24fc791f1e4

PODFILE CHECKSUM: 4dcdd5fa8959bf7a21c4e3da36b083ff9ad52d38

COCOAPODS: 1.15.2
COCOAPODS: 1.16.2
38 changes: 0 additions & 38 deletions dev/e2e_app/macos/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,9 @@
buildConfigurationList = 941724AC2A7BC66700F668BB /* Build configuration list for PBXNativeTarget "RunnerUITests" */;
buildPhases = (
3A083E9A6705B923206387D0 /* [CP] Check Pods Manifest.lock */,
94AA3E052A7BC91200E8815C /* macos_assemble build */,
9417249D2A7BC66700F668BB /* Sources */,
9417249E2A7BC66700F668BB /* Frameworks */,
9417249F2A7BC66700F668BB /* Resources */,
94AA3E072A7BC98400E8815C /* macos_assemble embed */,
4AB953C79502BD21EC05D5DB /* [CP] Embed Pods Frameworks */,
);
buildRules = (
Expand Down Expand Up @@ -426,42 +424,6 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
94AA3E052A7BC91200E8815C /* macos_assemble build */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "macos_assemble build";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "echo \"Runner macos_assemble build\"\n/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/macos_assemble.sh\" build\n";
};
94AA3E072A7BC98400E8815C /* macos_assemble embed */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "macos_assemble embed";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "echo \"Runner macos_assemble embed\"\n/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/macos_assemble.sh\" embed\n";
};
94AA3E082A7BD03700E8815C /* macos_assemble build */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down
6 changes: 5 additions & 1 deletion dev/e2e_app/macos/Runner/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import Cocoa
import FlutterMacOS

@NSApplicationMain
@main
class AppDelegate: FlutterAppDelegate {
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
return true
}

override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {
return true
}
}
30 changes: 0 additions & 30 deletions docs/documentation/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -385,36 +385,6 @@ Check out our video version of this tutorial on YouTube!
```
</Step>

<Step>
Go to **RunnerUITests** -> **Build Phases** and add 2 new "Run Script Phase" Build Phases.
Rename them to `xcode_backend build` and `xcode_backend embed_and_thin` by double clicking
on their names.

![Xcode config setup](/assets/macos_runner_build_phases_create.png)
</Step>

<Step>
Arrange the newly created Build Phases in the order shown in the screenshot below.

![Xcode config setup](/assets/macos_runner_build_phases.png)
</Step>

<Step>
Paste this code into the first `macos_assemble build` Build Phase:

```
/bin/sh "$FLUTTER_ROOT/packages/flutter_tools/bin/macos_assemble.sh" build
```
</Step>

<Step>
Paste this code into the second `macos_assemble embed` Build Phase:

```
/bin/sh "$FLUTTER_ROOT/packages/flutter_tools/bin/macos_assemble.sh" embed
```
</Step>

<Step>
Xcode by default also enables a "parallel execution" setting, which
breaks Patrol. Disable it **for all schemes** (if you have more than one):
Expand Down

0 comments on commit 0fefe26

Please sign in to comment.