Skip to content

Commit acbbf7e

Browse files
committed
feat(secure_storage): add Swift Package Manager support to amplify_secure_storage
Migrate amplify_secure_storage iOS and macOS plugins to support Swift Package Manager while maintaining backward compatibility with CocoaPods. Changes: - Add Package.swift for both iOS and macOS platforms - Move sources from Classes/ to amplify_secure_storage/Sources/amplify_secure_storage/ - Move Obj-C public headers to include/amplify_secure_storage/ (iOS) - Move PrivacyInfo.xcprivacy to SPM Sources directory - Update podspec source_files and resource_bundles paths - Update Pigeon swiftOut path for new directory structure - Update Obj-C import path for relocated header - Add .build/ and .swiftpm/ to .gitignore"
1 parent a2a418b commit acbbf7e

21 files changed

Lines changed: 117 additions & 56 deletions

File tree

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ amplify_outputs*.dart
4343
# Smithy
4444
.smithy.lsp.log
4545

46+
# Swift Package Manager
47+
.build/
48+
.swiftpm/
49+
4650
# Custom Actions output
4751
**/*.cjs.deps
4852
.flutter-plugins-dependencies

packages/secure_storage/amplify_secure_storage/example/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
*.swp
66
.DS_Store
77
.atom/
8+
.build/
89
.buildlog/
910
.history
1011
.svn/
12+
.swiftpm/
1113
migrate_working_dir/
1214

1315
# IntelliJ related

packages/secure_storage/amplify_secure_storage/example/ios/Flutter/AppFrameworkInfo.plist

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/secure_storage/amplify_secure_storage/example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 24 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/secure_storage/amplify_secure_storage/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/secure_storage/amplify_secure_storage/ios/.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
*.swp
88
profile
99

10+
.build/
11+
.swiftpm/
12+
1013
DerivedData/
1114
build/
1215
GeneratedPluginRegistrant.h
@@ -35,4 +38,4 @@ Icon?
3538

3639
/Flutter/Generated.xcconfig
3740
/Flutter/ephemeral/
38-
/Flutter/flutter_export_environment.sh
41+
/Flutter/flutter_export_environment.sh

packages/secure_storage/amplify_secure_storage/ios/Classes/AmplifySecureStoragePlugin.h

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

packages/secure_storage/amplify_secure_storage/ios/Classes/AmplifySecureStoragePlugin.m

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

packages/secure_storage/amplify_secure_storage/ios/Classes/amplify_secure_storage.h

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

packages/secure_storage/amplify_secure_storage/ios/amplify_secure_storage.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ A new Flutter plugin project.
1313
s.license = { :file => '../LICENSE' }
1414
s.author = { 'Your Company' => 'email@example.com' }
1515
s.source = { :path => '.' }
16-
s.source_files = 'Classes/**/*'
16+
s.source_files = 'amplify_secure_storage/Sources/amplify_secure_storage/**/*.swift'
1717
s.dependency 'Flutter'
1818
s.platform = :ios, '13.0'
1919

2020
# Flutter.framework does not contain a i386 slice.
2121
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }
2222
s.swift_version = '5.9'
23-
s.resource_bundles = {'amplify_secure_storage_privacy' => ['Resources/PrivacyInfo.xcprivacy']}
23+
s.resource_bundles = {'amplify_secure_storage_privacy' => ['amplify_secure_storage/Sources/amplify_secure_storage/PrivacyInfo.xcprivacy']}
2424
end

0 commit comments

Comments
 (0)