Skip to content

Commit 81922e7

Browse files
committed
refactor(apple): migrate iOS example to Swift Package Manager and remove CocoaPods
- Removed the `Podfile` and all CocoaPods-related configurations and build settings from the iOS example project - Updated `permission_handler/pubspec.yaml` to use a local path dependency for `permission_handler_apple` - Reconfigured the Xcode project to use Swift Package Manager (SPM) for Flutter plugin integration - Cleaned up `.xcconfig` files to remove references to legacy Pods framework configurations
1 parent 4b7467f commit 81922e7

4 files changed

Lines changed: 14 additions & 113 deletions

File tree

permission_handler/pubspec.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ dependencies:
2525
sdk: flutter
2626
meta: ^1.7.0
2727
permission_handler_android: ^13.0.0
28-
permission_handler_apple: ^9.4.7
28+
permission_handler_apple:
29+
path: ../permission_handler_apple # When permission_handler_apple is published, change this to:
30+
# permission_handler_apple: ^x.y.z
2931
permission_handler_html: ^0.1.1
3032
permission_handler_windows: ^0.2.1
3133
permission_handler_platform_interface: ^4.3.0
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 "Generated.xcconfig"

permission_handler_apple/example/ios/Podfile

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

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

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
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 */; };
16-
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; };
1717
/* End PBXBuildFile section */
1818

1919
/* Begin PBXCopyFilesBuildPhase section */
@@ -35,6 +35,7 @@
3535
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
3636
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
3737
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
38+
78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = "<group>"; };
3839
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
3940
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
4041
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
@@ -44,7 +45,6 @@
4445
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
4546
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
4647
F6BD02742B56D78D00C59EAA /* RunnerDebug.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = RunnerDebug.entitlements; sourceTree = "<group>"; };
47-
78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = "<group>"; };
4848
/* End PBXFileReference section */
4949

5050
/* Begin PBXFrameworksBuildPhase section */
@@ -116,9 +116,6 @@
116116

117117
/* Begin PBXNativeTarget section */
118118
97C146ED1CF9000F007C117D /* Runner */ = {
119-
packageProductDependencies = (
120-
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */,
121-
);
122119
isa = PBXNativeTarget;
123120
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
124121
buildPhases = (
@@ -134,6 +131,9 @@
134131
dependencies = (
135132
);
136133
name = Runner;
134+
packageProductDependencies = (
135+
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */,
136+
);
137137
productName = Runner;
138138
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
139139
productType = "com.apple.product-type.application";
@@ -142,9 +142,6 @@
142142

143143
/* Begin PBXProject section */
144144
97C146E61CF9000F007C117D /* Project object */ = {
145-
packageReferences = (
146-
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */,
147-
);
148145
isa = PBXProject;
149146
attributes = {
150147
LastUpgradeCheck = 1510;
@@ -165,6 +162,9 @@
165162
Base,
166163
);
167164
mainGroup = 97C146E51CF9000F007C117D;
165+
packageReferences = (
166+
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */,
167+
);
168168
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
169169
projectDirPath = "";
170170
projectRoot = "";
@@ -527,12 +527,14 @@
527527
defaultConfigurationName = Release;
528528
};
529529
/* End XCConfigurationList section */
530+
530531
/* Begin XCLocalSwiftPackageReference section */
531-
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */ = {
532+
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */ = {
532533
isa = XCLocalSwiftPackageReference;
533534
relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage;
534535
};
535536
/* End XCLocalSwiftPackageReference section */
537+
536538
/* Begin XCSwiftPackageProductDependency section */
537539
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = {
538540
isa = XCSwiftPackageProductDependency;

0 commit comments

Comments
 (0)