Skip to content

Commit f4521f8

Browse files
chore: move macOS plugin to SPM and remove its podspec
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent f4bd6ee commit f4521f8

13 files changed

Lines changed: 84 additions & 145 deletions

File tree

‎example/macos/.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
# Xcode-related
66
**/dgph
77
**/xcuserdata/
8+
**/swiftpm/
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
21
#include "ephemeral/Flutter-Generated.xcconfig"
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
21
#include "ephemeral/Flutter-Generated.xcconfig"

‎example/macos/Podfile‎

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

‎example/macos/Runner.xcodeproj/project.pbxproj‎

Lines changed: 32 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 51;
6+
objectVersion = 54;
77
objects = {
88

99
/* Begin PBXAggregateTarget section */
@@ -26,7 +26,7 @@
2626
33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };
2727
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
2828
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
29-
90B9B075FD9D5B075E83BE96 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A8DB69DD1CEB9DE6D5A4070 /* Pods_Runner.framework */; };
29+
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; };
3030
/* End PBXBuildFile section */
3131

3232
/* Begin PBXContainerItemProxy section */
@@ -53,7 +53,6 @@
5353
/* End PBXCopyFilesBuildPhase section */
5454

5555
/* Begin PBXFileReference section */
56-
019D04A8C81D7599D2E638FA /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
5756
333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; };
5857
335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = "<group>"; };
5958
33CC10ED2044A3C60003C045 /* optimizely_flutter_sdk_example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = optimizely_flutter_sdk_example.app; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -68,19 +67,19 @@
6867
33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = "<group>"; };
6968
33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = "<group>"; };
7069
33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = "<group>"; };
71-
5A8DB69DD1CEB9DE6D5A4070 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
7270
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; };
73-
7EEA78DE428A25C4C9195EC6 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
74-
8D05B77804EBF39FD6D6D079 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
7571
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; };
72+
78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = "<group>"; };
73+
784666492D4C4C64000A1A5F /* FlutterFramework */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterFramework; path = ephemeral/Packages/.packages/FlutterFramework; sourceTree = "<group>"; };
74+
78DABEA22ED26510000E7860 /* optimizely_flutter_sdk */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = optimizely_flutter_sdk; path = ../../../macos/optimizely_flutter_sdk; sourceTree = "<group>"; };
7675
/* End PBXFileReference section */
7776

7877
/* Begin PBXFrameworksBuildPhase section */
7978
33CC10EA2044A3C60003C045 /* Frameworks */ = {
8079
isa = PBXFrameworksBuildPhase;
8180
buildActionMask = 2147483647;
8281
files = (
83-
90B9B075FD9D5B075E83BE96 /* Pods_Runner.framework in Frameworks */,
82+
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */,
8483
);
8584
runOnlyForDeploymentPostprocessing = 0;
8685
};
@@ -104,8 +103,6 @@
104103
33FAB671232836740065AC1E /* Runner */,
105104
33CEB47122A05771004F2AC0 /* Flutter */,
106105
33CC10EE2044A3C60003C045 /* Products */,
107-
D73912EC22F37F3D000D13A0 /* Frameworks */,
108-
F74646C1D5F338EF32BE10E1 /* Pods */,
109106
);
110107
sourceTree = "<group>";
111108
};
@@ -131,6 +128,9 @@
131128
33CEB47122A05771004F2AC0 /* Flutter */ = {
132129
isa = PBXGroup;
133130
children = (
131+
78DABEA22ED26510000E7860 /* optimizely_flutter_sdk */,
132+
784666492D4C4C64000A1A5F /* FlutterFramework */,
133+
78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */,
134134
335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */,
135135
33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */,
136136
33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */,
@@ -152,39 +152,21 @@
152152
path = Runner;
153153
sourceTree = "<group>";
154154
};
155-
D73912EC22F37F3D000D13A0 /* Frameworks */ = {
156-
isa = PBXGroup;
157-
children = (
158-
5A8DB69DD1CEB9DE6D5A4070 /* Pods_Runner.framework */,
159-
);
160-
name = Frameworks;
161-
sourceTree = "<group>";
162-
};
163-
F74646C1D5F338EF32BE10E1 /* Pods */ = {
164-
isa = PBXGroup;
165-
children = (
166-
7EEA78DE428A25C4C9195EC6 /* Pods-Runner.debug.xcconfig */,
167-
8D05B77804EBF39FD6D6D079 /* Pods-Runner.release.xcconfig */,
168-
019D04A8C81D7599D2E638FA /* Pods-Runner.profile.xcconfig */,
169-
);
170-
name = Pods;
171-
path = Pods;
172-
sourceTree = "<group>";
173-
};
174155
/* End PBXGroup section */
175156

176157
/* Begin PBXNativeTarget section */
177158
33CC10EC2044A3C60003C045 /* Runner */ = {
159+
packageProductDependencies = (
160+
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */,
161+
);
178162
isa = PBXNativeTarget;
179163
buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */;
180164
buildPhases = (
181-
834CC0346DE4E8E368DFDFD4 /* [CP] Check Pods Manifest.lock */,
182165
33CC10E92044A3C60003C045 /* Sources */,
183166
33CC10EA2044A3C60003C045 /* Frameworks */,
184167
33CC10EB2044A3C60003C045 /* Resources */,
185168
33CC110E2044A8840003C045 /* Bundle Framework */,
186169
3399D490228B24CF009A79C7 /* ShellScript */,
187-
F96AA93D7120056FD027BD50 /* [CP] Embed Pods Frameworks */,
188170
);
189171
buildRules = (
190172
);
@@ -200,10 +182,13 @@
200182

201183
/* Begin PBXProject section */
202184
33CC10E52044A3C60003C045 /* Project object */ = {
185+
packageReferences = (
186+
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */,
187+
);
203188
isa = PBXProject;
204189
attributes = {
205190
LastSwiftUpdateCheck = 0920;
206-
LastUpgradeCheck = 1300;
191+
LastUpgradeCheck = 1510;
207192
ORGANIZATIONNAME = "";
208193
TargetAttributes = {
209194
33CC10EC2044A3C60003C045 = {
@@ -256,6 +241,7 @@
256241
/* Begin PBXShellScriptBuildPhase section */
257242
3399D490228B24CF009A79C7 /* ShellScript */ = {
258243
isa = PBXShellScriptBuildPhase;
244+
alwaysOutOfDate = 1;
259245
buildActionMask = 2147483647;
260246
files = (
261247
);
@@ -291,45 +277,6 @@
291277
shellPath = /bin/sh;
292278
shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
293279
};
294-
834CC0346DE4E8E368DFDFD4 /* [CP] Check Pods Manifest.lock */ = {
295-
isa = PBXShellScriptBuildPhase;
296-
buildActionMask = 2147483647;
297-
files = (
298-
);
299-
inputFileListPaths = (
300-
);
301-
inputPaths = (
302-
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
303-
"${PODS_ROOT}/Manifest.lock",
304-
);
305-
name = "[CP] Check Pods Manifest.lock";
306-
outputFileListPaths = (
307-
);
308-
outputPaths = (
309-
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
310-
);
311-
runOnlyForDeploymentPostprocessing = 0;
312-
shellPath = /bin/sh;
313-
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";
314-
showEnvVarsInLog = 0;
315-
};
316-
F96AA93D7120056FD027BD50 /* [CP] Embed Pods Frameworks */ = {
317-
isa = PBXShellScriptBuildPhase;
318-
buildActionMask = 2147483647;
319-
files = (
320-
);
321-
inputFileListPaths = (
322-
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
323-
);
324-
name = "[CP] Embed Pods Frameworks";
325-
outputFileListPaths = (
326-
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
327-
);
328-
runOnlyForDeploymentPostprocessing = 0;
329-
shellPath = /bin/sh;
330-
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
331-
showEnvVarsInLog = 0;
332-
};
333280
/* End PBXShellScriptBuildPhase section */
334281

335282
/* Begin PBXSourcesBuildPhase section */
@@ -404,7 +351,7 @@
404351
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
405352
GCC_WARN_UNUSED_FUNCTION = YES;
406353
GCC_WARN_UNUSED_VARIABLE = YES;
407-
MACOSX_DEPLOYMENT_TARGET = 10.11;
354+
MACOSX_DEPLOYMENT_TARGET = 10.15;
408355
MTL_ENABLE_DEBUG_INFO = NO;
409356
SDKROOT = macosx;
410357
SWIFT_COMPILATION_MODE = wholemodule;
@@ -483,7 +430,7 @@
483430
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
484431
GCC_WARN_UNUSED_FUNCTION = YES;
485432
GCC_WARN_UNUSED_VARIABLE = YES;
486-
MACOSX_DEPLOYMENT_TARGET = 10.11;
433+
MACOSX_DEPLOYMENT_TARGET = 10.15;
487434
MTL_ENABLE_DEBUG_INFO = YES;
488435
ONLY_ACTIVE_ARCH = YES;
489436
SDKROOT = macosx;
@@ -530,7 +477,7 @@
530477
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
531478
GCC_WARN_UNUSED_FUNCTION = YES;
532479
GCC_WARN_UNUSED_VARIABLE = YES;
533-
MACOSX_DEPLOYMENT_TARGET = 10.11;
480+
MACOSX_DEPLOYMENT_TARGET = 10.15;
534481
MTL_ENABLE_DEBUG_INFO = NO;
535482
SDKROOT = macosx;
536483
SWIFT_COMPILATION_MODE = wholemodule;
@@ -627,6 +574,18 @@
627574
defaultConfigurationName = Release;
628575
};
629576
/* End XCConfigurationList section */
577+
/* Begin XCLocalSwiftPackageReference section */
578+
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */ = {
579+
isa = XCLocalSwiftPackageReference;
580+
relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage;
581+
};
582+
/* End XCLocalSwiftPackageReference section */
583+
/* Begin XCSwiftPackageProductDependency section */
584+
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = {
585+
isa = XCSwiftPackageProductDependency;
586+
productName = FlutterGeneratedPluginSwiftPackage;
587+
};
588+
/* End XCSwiftPackageProductDependency section */
630589
};
631590
rootObject = 33CC10E52044A3C60003C045 /* Project object */;
632591
}

‎example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme‎

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,28 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1300"
3+
LastUpgradeVersion = "1510"
44
version = "1.3">
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 = "&quot;$FLUTTER_ROOT&quot;/packages/flutter_tools/bin/macos_assemble.sh prepare&#10;">
14+
<EnvironmentBuildable>
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
18+
BuildableName = "optimizely_flutter_sdk_example.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"
@@ -48,6 +66,7 @@
4866
ignoresPersistentStateOnLaunch = "NO"
4967
debugDocumentVersioning = "YES"
5068
debugServiceExtension = "internal"
69+
enableGPUValidationMode = "1"
5170
allowLocationSimulation = "YES">
5271
<BuildableProductRunnable
5372
runnableDebuggingMode = "0">

‎example/macos/Runner.xcworkspace/contents.xcworkspacedata‎

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
import Cocoa
22
import FlutterMacOS
33

4-
@NSApplicationMain
4+
@main
55
class AppDelegate: FlutterAppDelegate {
66
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
77
return true
88
}
9+
10+
override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {
11+
return true
12+
}
913
}

‎macos/.gitignore‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.build/
2+
.swiftpm/

‎macos/optimizely_flutter_sdk.podspec‎

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

0 commit comments

Comments
 (0)