Skip to content

Commit 84d5b57

Browse files
committed
Clean up workflow: remove backup file logic and make rm commands concise
1 parent 87fe149 commit 84d5b57

File tree

6 files changed

+76
-156
lines changed

6 files changed

+76
-156
lines changed

.github/workflows/permission_handler_apple.yaml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -66,24 +66,9 @@ jobs:
6666
run: |
6767
if [ "${{ matrix.dependency-manager }}" = "spm" ]; then
6868
flutter config --enable-swift-package-manager
69-
# Remove CocoaPods integration for pure SPM testing
70-
cd ${{env.example-directory}}/ios
71-
if [ -f Podfile ]; then
72-
rm -f Podfile
73-
fi
74-
if [ -f Podfile.lock ]; then
75-
rm -f Podfile.lock
76-
fi
77-
if [ -d Pods ]; then
78-
rm -rf Pods
79-
fi
69+
cd ${{env.example-directory}}/ios && rm -rf Podfile Podfile.lock Pods
8070
else
8171
flutter config --no-enable-swift-package-manager
82-
# Restore Podfile for CocoaPods testing
83-
cd ${{env.example-directory}}/ios
84-
if [ -f Podfile.backup ]; then
85-
cp Podfile.backup Podfile
86-
fi
8772
fi
8873
8974
# Build iOS version of the example App

permission_handler_apple/example/ios/Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage/Package.swift

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,11 @@ let package = Package(
1515
.library(name: "FlutterGeneratedPluginSwiftPackage", type: .static, targets: ["FlutterGeneratedPluginSwiftPackage"])
1616
],
1717
dependencies: [
18-
.package(name: "url_launcher_ios", path: "/Users/ened/.pub-cache/hosted/pub.dev/url_launcher_ios-6.3.3/ios/url_launcher_ios")
18+
1919
],
2020
targets: [
2121
.target(
22-
name: "FlutterGeneratedPluginSwiftPackage",
23-
dependencies: [
24-
.product(name: "url-launcher-ios", package: "url_launcher_ios")
25-
]
22+
name: "FlutterGeneratedPluginSwiftPackage"
2623
)
2724
]
2825
)

permission_handler_apple/example/ios/Podfile.backup

Lines changed: 0 additions & 104 deletions
This file was deleted.

permission_handler_apple/example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 52 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
1111
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
1212
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
13+
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; };
1314
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
1415
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
1516
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
@@ -55,6 +56,7 @@
5556
isa = PBXFrameworksBuildPhase;
5657
buildActionMask = 2147483647;
5758
files = (
59+
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */,
5860
B501E7F22BA22C455255CE2E /* Pods_Runner.framework in Frameworks */,
5961
);
6062
runOnlyForDeploymentPostprocessing = 0;
@@ -140,14 +142,17 @@
140142
97C146EC1CF9000F007C117D /* Resources */,
141143
9705A1C41CF9048500538489 /* Embed Frameworks */,
142144
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
143-
D38B08CB85942E5D11545EE3 /* [CP] Embed Pods Frameworks */,
144-
A7B07F67421488A414C73AAD /* [CP] Copy Pods Resources */,
145+
62C3F028F2D07FE58E6CD320 /* [CP] Embed Pods Frameworks */,
146+
1397A7D7F3E4EE95598DD108 /* [CP] Copy Pods Resources */,
145147
);
146148
buildRules = (
147149
);
148150
dependencies = (
149151
);
150152
name = Runner;
153+
packageProductDependencies = (
154+
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */,
155+
);
151156
productName = Runner;
152157
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
153158
productType = "com.apple.product-type.application";
@@ -176,6 +181,9 @@
176181
Base,
177182
);
178183
mainGroup = 97C146E51CF9000F007C117D;
184+
packageReferences = (
185+
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */,
186+
);
179187
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
180188
projectDirPath = "";
181189
projectRoot = "";
@@ -200,6 +208,23 @@
200208
/* End PBXResourcesBuildPhase section */
201209

202210
/* Begin PBXShellScriptBuildPhase section */
211+
1397A7D7F3E4EE95598DD108 /* [CP] Copy Pods Resources */ = {
212+
isa = PBXShellScriptBuildPhase;
213+
buildActionMask = 2147483647;
214+
files = (
215+
);
216+
inputFileListPaths = (
217+
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
218+
);
219+
name = "[CP] Copy Pods Resources";
220+
outputFileListPaths = (
221+
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
222+
);
223+
runOnlyForDeploymentPostprocessing = 0;
224+
shellPath = /bin/sh;
225+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
226+
showEnvVarsInLog = 0;
227+
};
203228
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
204229
isa = PBXShellScriptBuildPhase;
205230
alwaysOutOfDate = 1;
@@ -238,54 +263,37 @@
238263
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";
239264
showEnvVarsInLog = 0;
240265
};
241-
9740EEB61CF901F6004384FC /* Run Script */ = {
242-
isa = PBXShellScriptBuildPhase;
243-
alwaysOutOfDate = 1;
244-
buildActionMask = 2147483647;
245-
files = (
246-
);
247-
inputPaths = (
248-
);
249-
name = "Run Script";
250-
outputPaths = (
251-
);
252-
runOnlyForDeploymentPostprocessing = 0;
253-
shellPath = /bin/sh;
254-
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
255-
};
256-
A7B07F67421488A414C73AAD /* [CP] Copy Pods Resources */ = {
266+
62C3F028F2D07FE58E6CD320 /* [CP] Embed Pods Frameworks */ = {
257267
isa = PBXShellScriptBuildPhase;
258268
buildActionMask = 2147483647;
259269
files = (
260270
);
261271
inputFileListPaths = (
262-
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
272+
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
263273
);
264-
name = "[CP] Copy Pods Resources";
274+
name = "[CP] Embed Pods Frameworks";
265275
outputFileListPaths = (
266-
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
276+
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
267277
);
268278
runOnlyForDeploymentPostprocessing = 0;
269279
shellPath = /bin/sh;
270-
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
280+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
271281
showEnvVarsInLog = 0;
272282
};
273-
D38B08CB85942E5D11545EE3 /* [CP] Embed Pods Frameworks */ = {
283+
9740EEB61CF901F6004384FC /* Run Script */ = {
274284
isa = PBXShellScriptBuildPhase;
285+
alwaysOutOfDate = 1;
275286
buildActionMask = 2147483647;
276287
files = (
277288
);
278-
inputFileListPaths = (
279-
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
289+
inputPaths = (
280290
);
281-
name = "[CP] Embed Pods Frameworks";
282-
outputFileListPaths = (
283-
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
291+
name = "Run Script";
292+
outputPaths = (
284293
);
285294
runOnlyForDeploymentPostprocessing = 0;
286295
shellPath = /bin/sh;
287-
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
288-
showEnvVarsInLog = 0;
296+
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
289297
};
290298
/* End PBXShellScriptBuildPhase section */
291299

@@ -594,6 +602,20 @@
594602
defaultConfigurationName = Release;
595603
};
596604
/* End XCConfigurationList section */
605+
606+
/* Begin XCLocalSwiftPackageReference section */
607+
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */ = {
608+
isa = XCLocalSwiftPackageReference;
609+
relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage;
610+
};
611+
/* End XCLocalSwiftPackageReference section */
612+
613+
/* Begin XCSwiftPackageProductDependency section */
614+
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = {
615+
isa = XCSwiftPackageProductDependency;
616+
productName = FlutterGeneratedPluginSwiftPackage;
617+
};
618+
/* End XCSwiftPackageProductDependency section */
597619
};
598620
rootObject = 97C146E61CF9000F007C117D /* Project object */;
599621
}

permission_handler_apple/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,24 @@
55
<BuildAction
66
parallelizeBuildables = "YES"
77
buildImplicitDependencies = "YES">
8+
<PreActions>
9+
<ExecutionAction
10+
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
11+
<ActionContent
12+
title = "Run Prepare Flutter Framework Script"
13+
scriptText = "/bin/sh &quot;$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh&quot; prepare&#10;">
14+
<EnvironmentBuildable>
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
18+
BuildableName = "Runner.app"
19+
BlueprintName = "Runner"
20+
ReferencedContainer = "container:Runner.xcodeproj">
21+
</BuildableReference>
22+
</EnvironmentBuildable>
23+
</ActionContent>
24+
</ExecutionAction>
25+
</PreActions>
826
<BuildActionEntries>
927
<BuildActionEntry
1028
buildForTesting = "YES"

permission_handler_apple/ios/permission_handler_apple/Package.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ let package = Package(
2626
.headerSearchPath("include/permission_handler_apple"),
2727
.define("PERMISSION_HANDLER_APPLE", to: "1")
2828
],
29+
cxxSettings: [
30+
.headerSearchPath("include")
31+
],
2932
linkerSettings: [
30-
.linkedFramework("Flutter", .when(platforms: [.iOS])),
3133
.linkedFramework("UIKit", .when(platforms: [.iOS])),
3234
.linkedFramework("Foundation"),
3335
.linkedFramework("CoreBluetooth", .when(platforms: [.iOS])),

0 commit comments

Comments
 (0)