From 6248a5672b22ce778da0bc237ebcb06422b61754 Mon Sep 17 00:00:00 2001 From: Vijay Tholpadi Date: Mon, 22 Apr 2024 18:36:13 +0800 Subject: [PATCH 1/2] Add SPM support --- Package.swift | 25 +++++++++++++++++++++++++ Sources/SAMKeychain.h | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 Package.swift diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..7584d08 --- /dev/null +++ b/Package.swift @@ -0,0 +1,25 @@ +// swift-tools-version:5.9 +import PackageDescription + +let package = Package( + name: "SAMKeychain", + platforms: [ + .iOS(.v12) + ], + products: [ + .library( + name: "SAMKeychain", + targets: ["SAMKeychain"] + ) + ], + targets: [ + .target( + name: "SAMKeychain", + path: "Sources", + publicHeadersPath: ".", + cSettings: [ + .headerSearchPath("."), // For locating internal headers, adjust as needed + ] + ) + ] +) diff --git a/Sources/SAMKeychain.h b/Sources/SAMKeychain.h index 2af305d..c6a2822 100644 --- a/Sources/SAMKeychain.h +++ b/Sources/SAMKeychain.h @@ -200,4 +200,4 @@ extern NSString *const kSAMKeychainWhereKey; NS_ASSUME_NONNULL_END -#import +#import "SAMKeychainQuery.h" From ab3d81035f72b337dff8f76764878611899d7f76 Mon Sep 17 00:00:00 2001 From: Vijay Tholpadi Date: Fri, 30 Aug 2024 14:38:32 +0800 Subject: [PATCH 2/2] Fixes SAMKeychain resource to get localized string --- Package.swift | 4 ++++ Support/en.lproj/SAMKeychain.strings | Bin 0 -> 1580 bytes 2 files changed, 4 insertions(+) create mode 100644 Support/en.lproj/SAMKeychain.strings diff --git a/Package.swift b/Package.swift index 7584d08..5b67742 100644 --- a/Package.swift +++ b/Package.swift @@ -3,6 +3,7 @@ import PackageDescription let package = Package( name: "SAMKeychain", + defaultLocalization: "en", platforms: [ .iOS(.v12) ], @@ -16,6 +17,9 @@ let package = Package( .target( name: "SAMKeychain", path: "Sources", + resources: [ + .process("../Support/en.lproj/SAMKeychain.strings") + ], publicHeadersPath: ".", cSettings: [ .headerSearchPath("."), // For locating internal headers, adjust as needed diff --git a/Support/en.lproj/SAMKeychain.strings b/Support/en.lproj/SAMKeychain.strings new file mode 100644 index 0000000000000000000000000000000000000000..5c0f174aee47798dd598314b400c798a9cafa9db GIT binary patch literal 1580 zcmbW1&5qMR5QO{8Q&=21>^=bE5VS->h~;+=9KDINYi(j%{sHpxz*jx#*ozH99GscV z)O6QWSI^HMm-fsu`(!J7Yj3QuqiyWoax1N}4>qvUvX+6mv?uoT56D-bTC4e9a&}9! z*6uic;CyAhb)3xX1)n0+zMe7eSn0`EFy^x}nSJy8+7+L#VD`+mM0xIP#I7Y`0qYwO zC6OC2#W{1~=*Yc>Qw6pMSu+!d)_)t%luvdl_Il5}9COa#z26}x_jucPWD)=>m}4FxGJ7ER)MKiwZl2FhUaRJXxz+b(jxVpnb{&#Jt3^t67TPwwnM%4H?BC{G;96I$%|Fen(e&a<%ZelIyc zd3W^r?+Pq=Id~*h*M6(&k(2+8msA+wrpks-Zs93MX-6^tkDt0)uFcUTx+y%6yd#II zQ=|88+}Em&dU<|2oDe*vsT><|=KXd>2HkMWIL%YRD!DIuNQgj=m1y8!<2$`5$yHlU z%1ui(S-F?)ZQ3tm)~LsDzNJ{`{fpjL$E&v+93|b<<>AK}bwl?pA=YpHiy3@%`k+#rN>=*ZEcNkg3UN+vaa0nW@5_W%F@ literal 0 HcmV?d00001