Skip to content

Commit

Permalink
Merge pull request #2510 from leancodepl/remove-build-phases-ios
Browse files Browse the repository at this point in the history
Remove build phases ios
  • Loading branch information
pdenert authored Feb 3, 2025
2 parents ef6b441 + 5e37ee6 commit 48504be
Show file tree
Hide file tree
Showing 17 changed files with 165 additions and 339 deletions.
15 changes: 8 additions & 7 deletions dev/e2e_app/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- app_links (0.0.1):
- app_links (0.0.2):
- Flutter
- CocoaAsyncSocket (7.6.5)
- Flutter (1.0.0)
Expand All @@ -17,6 +17,7 @@ PODS:
- Flutter
- webview_flutter_wkwebview (0.0.1):
- Flutter
- FlutterMacOS

DEPENDENCIES:
- app_links (from `.symlinks/plugins/app_links/ios`)
Expand All @@ -26,7 +27,7 @@ DEPENDENCIES:
- geolocator_apple (from `.symlinks/plugins/geolocator_apple/ios`)
- patrol (from `.symlinks/plugins/patrol/darwin`)
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
- webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`)
- webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/darwin`)

SPEC REPOS:
trunk:
Expand All @@ -48,19 +49,19 @@ EXTERNAL SOURCES:
permission_handler_apple:
:path: ".symlinks/plugins/permission_handler_apple/ios"
webview_flutter_wkwebview:
:path: ".symlinks/plugins/webview_flutter_wkwebview/ios"
:path: ".symlinks/plugins/webview_flutter_wkwebview/darwin"

SPEC CHECKSUMS:
app_links: e70ca16b4b0f88253b3b3660200d4a10b4ea9795
app_links: e7a6750a915a9e161c58d91bc610e8cd1d4d0ad0
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_local_notifications: 4cde75091f6327eb8517fa068a0a5950212d2086
flutter_timezone: ffb07bdad3c6276af8dada0f11978d8a1f8a20bb
geolocator_apple: cc556e6844d508c95df1e87e3ea6fa4e58c50401
geolocator_apple: 9bcea1918ff7f0062d98345d238ae12718acfbc1
patrol: 0564cee315ff6c86fb802b3647db05cc2d3d0624
permission_handler_apple: e76247795d700c14ea09e3a2d8855d41ee80a2e6
webview_flutter_wkwebview: 2e2d318f21a5e036e2c3f26171342e95908bd60a
webview_flutter_wkwebview: 0982481e3d9c78fd5c6f62a002fcd24fc791f1e4

PODFILE CHECKSUM: 5424a237bba16bfe751b9ef19da1cf80e4941454

COCOAPODS: 1.15.2
COCOAPODS: 1.16.2
38 changes: 0 additions & 38 deletions dev/e2e_app/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,9 @@
buildConfigurationList = 983964E12978A956007EB76F /* Build configuration list for PBXNativeTarget "RunnerUITests" */;
buildPhases = (
57A729EC2F3211B458286925 /* [CP] Check Pods Manifest.lock */,
983964E62978A9F4007EB76F /* xcode_backend build */,
983964D52978A956007EB76F /* Sources */,
983964D62978A956007EB76F /* Frameworks */,
983964D72978A956007EB76F /* Resources */,
983964E52978A9D4007EB76F /* xcode_backend embed_and_thin */,
B778A6D350303A188769B23C /* [CP] Embed Pods Frameworks */,
);
buildRules = (
Expand Down Expand Up @@ -421,42 +419,6 @@
shellPath = /bin/sh;
shellScript = "echo \"Runner xcode_backend build\"\n/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\n";
};
983964E52978A9D4007EB76F /* xcode_backend embed_and_thin */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "xcode_backend embed_and_thin";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "echo \"RunnerUITests xcode_backend embed_and_thin\"\n/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin\n";
};
983964E62978A9F4007EB76F /* xcode_backend build */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "xcode_backend build";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "echo \"RunnerUITests xcode_backend build\"\n/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\n";
};
B778A6D350303A188769B23C /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down
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
}
}
10 changes: 5 additions & 5 deletions dev/e2e_app/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -499,23 +499,23 @@ packages:
path: "../../packages/patrol"
relative: true
source: path
version: "3.13.2"
version: "3.14.0"
patrol_finders:
dependency: transitive
description:
name: patrol_finders
sha256: "5a1e2b4c6636e89645fc596d68224cfe6cca28e11c855b98dd0df9bed0d80405"
sha256: "4c6d78e00362fd15d7c21cfac110e501d08ada7d77000bad139b0c3c2e27ccaf"
url: "https://pub.dev"
source: hosted
version: "2.6.0"
version: "2.7.0"
patrol_log:
dependency: transitive
description:
name: patrol_log
sha256: ad5d7b759d16071ca16aa9b27eb4f106ce23079792d4312941874dbc33e795cb
sha256: "98b2701400c7a00b11533ab942bdeb44c3c714746e7cdb12e6cb93b6d06361da"
url: "https://pub.dev"
source: hosted
version: "0.2.2"
version: "0.3.0"
permission_handler:
dependency: "direct main"
description:
Expand Down
59 changes: 0 additions & 59 deletions docs/documentation/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -292,35 +292,6 @@ Check out our video version of this tutorial on YouTube!
![Xcode config setup](/assets/ios_runner_configs.png)
</Step>

<Step>
Go to **RunnerUITests** -> **Build Phases** and add 2 new "Run Script Phase" Build Phases.
Name them `xcode_backend build` and `xcode_backend embed_and_thin`.

![Xcode config setup](/assets/ios_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/ios_runner_build_phases.png)
</Step>

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

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

<Step>
Paste this code into the `xcode_backend embed_and_thin` Build Phase:

```
/bin/sh "$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh" embed_and_thin
```
</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 Expand Up @@ -414,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
2 changes: 2 additions & 0 deletions packages/patrol/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## Unreleased

- Remove adding build phases from iOS and macOS setup. (#2510)
- Remove build phases from the example app. (#2510)
- Bump patrol plugin iOS and macOS deployment targets to 12.0. (#2514)
- Bump Gradle version in the example app so it's possible to build them on the
latest JDK 23 (#2503)
Expand Down
2 changes: 2 additions & 0 deletions packages/patrol/example/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
*.swp
.DS_Store
.atom/
.build/
.buildlog/
.history
.svn/
.swiftpm/
migrate_working_dir/

# IntelliJ related
Expand Down
2 changes: 1 addition & 1 deletion packages/patrol/example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ android {

defaultConfig {
applicationId "pl.leancode.patrol.example"
minSdkVersion 21
minSdkVersion 23
targetSdkVersion 35
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
Expand Down
2 changes: 1 addition & 1 deletion packages/patrol/example/ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>11.0</string>
<string>12.0</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion packages/patrol/example/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
platform :ios, '12.0'
platform :ios, '13.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
Loading

0 comments on commit 48504be

Please sign in to comment.