diff --git a/flutter_appauth/CHANGELOG.md b/flutter_appauth/CHANGELOG.md index 065df982..b61949eb 100644 --- a/flutter_appauth/CHANGELOG.md +++ b/flutter_appauth/CHANGELOG.md @@ -1,6 +1,7 @@ ## [8.0.2] * [iOS][macOS] bumped AppAuth iOS dependency to 1.7.6 +* [iOS][macOS] added Swift Package Manager support ## [8.0.1] diff --git a/flutter_appauth/ios/Assets/.gitkeep b/flutter_appauth/ios/Assets/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/flutter_appauth/ios/flutter_appauth.podspec b/flutter_appauth/ios/flutter_appauth.podspec index 81c425e8..36b74a86 100644 --- a/flutter_appauth/ios/flutter_appauth.podspec +++ b/flutter_appauth/ios/flutter_appauth.podspec @@ -12,11 +12,11 @@ A new flutter plugin project. s.license = { :file => '../LICENSE' } s.author = { 'Your Company' => 'email@example.com' } s.source = { :path => '.' } - s.source_files = 'Classes/**/*' - s.public_header_files = 'Classes/**/*.h' + s.source_files = 'flutter_appauth/Sources/flutter_appauth/**/*.{h,m}' + s.public_header_files = 'flutter_appauth/Sources/flutter_appauth/include/**/*.h' s.dependency 'Flutter' s.dependency 'AppAuth', '1.7.6' s.ios.deployment_target = '11.0' - s.resource_bundles = {'flutter_appauth_privacy' => ['Resources/PrivacyInfo.xcprivacy']} + s.resource_bundles = {'flutter_appauth_privacy' => ['flutter_appauth/Sources/flutter_appauth/PrivacyInfo.xcprivacy']} end diff --git a/flutter_appauth/ios/flutter_appauth/Packages.swift b/flutter_appauth/ios/flutter_appauth/Packages.swift new file mode 100644 index 00000000..fea05daa --- /dev/null +++ b/flutter_appauth/ios/flutter_appauth/Packages.swift @@ -0,0 +1,27 @@ +// swift-tools-version: 5.9 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "flutter_appauth", + platforms: [ + .iOS("11.0") + ], + products: [ + .library(name: "flutter-appauth", targets: ["flutter_appauth"]) + ], + dependencies: [.package(url: "https://github.com/openid/AppAuth-iOS", exact: "1.7.6")], + targets: [ + .target( + name: "flutter_appauth", + dependencies: [], + resources: [ + .process("PrivacyInfo.xcprivacy") + ], + cSettings: [ + .headerSearchPath("include/flutter_appauth") + ] + ) + ] +) \ No newline at end of file diff --git a/flutter_appauth/ios/Classes/AppAuthIOSAuthorization.m b/flutter_appauth/ios/flutter_appauth/Sources/flutter_appauth/AppAuthIOSAuthorization.m similarity index 99% rename from flutter_appauth/ios/Classes/AppAuthIOSAuthorization.m rename to flutter_appauth/ios/flutter_appauth/Sources/flutter_appauth/AppAuthIOSAuthorization.m index 32e8c19b..d163c49d 100644 --- a/flutter_appauth/ios/Classes/AppAuthIOSAuthorization.m +++ b/flutter_appauth/ios/flutter_appauth/Sources/flutter_appauth/AppAuthIOSAuthorization.m @@ -1,4 +1,4 @@ -#import "AppAuthIOSAuthorization.h" +#import "./include/flutter_appauth/AppAuthIOSAuthorization.h" @implementation AppAuthIOSAuthorization diff --git a/flutter_appauth/macos/Classes/FlutterAppAuth.m b/flutter_appauth/ios/flutter_appauth/Sources/flutter_appauth/FlutterAppAuth.m similarity index 99% rename from flutter_appauth/macos/Classes/FlutterAppAuth.m rename to flutter_appauth/ios/flutter_appauth/Sources/flutter_appauth/FlutterAppAuth.m index 4b448d7b..8845b5a9 100644 --- a/flutter_appauth/macos/Classes/FlutterAppAuth.m +++ b/flutter_appauth/ios/flutter_appauth/Sources/flutter_appauth/FlutterAppAuth.m @@ -1,4 +1,4 @@ -#import "FlutterAppAuth.h" +#import "./include/flutter_appauth/FlutterAppAuth.h" @implementation FlutterAppAuth diff --git a/flutter_appauth/macos/Classes/FlutterAppauthPlugin.m b/flutter_appauth/ios/flutter_appauth/Sources/flutter_appauth/FlutterAppauthPlugin.m similarity index 99% rename from flutter_appauth/macos/Classes/FlutterAppauthPlugin.m rename to flutter_appauth/ios/flutter_appauth/Sources/flutter_appauth/FlutterAppauthPlugin.m index 293cf8c0..b87cb638 100644 --- a/flutter_appauth/macos/Classes/FlutterAppauthPlugin.m +++ b/flutter_appauth/ios/flutter_appauth/Sources/flutter_appauth/FlutterAppauthPlugin.m @@ -1,6 +1,6 @@ #import -#import "FlutterAppauthPlugin.h" +#import "./include/flutter_appauth/FlutterAppauthPlugin.h" @interface ArgumentProcessor : NSObject + (id _Nullable)processArgumentValue:(NSDictionary *)arguments diff --git a/flutter_appauth/ios/Classes/OIDExternalUserAgentIOSNoSSO.m b/flutter_appauth/ios/flutter_appauth/Sources/flutter_appauth/OIDExternalUserAgentIOSNoSSO.m similarity index 99% rename from flutter_appauth/ios/Classes/OIDExternalUserAgentIOSNoSSO.m rename to flutter_appauth/ios/flutter_appauth/Sources/flutter_appauth/OIDExternalUserAgentIOSNoSSO.m index 1ded133d..6ee87221 100644 --- a/flutter_appauth/ios/Classes/OIDExternalUserAgentIOSNoSSO.m +++ b/flutter_appauth/ios/flutter_appauth/Sources/flutter_appauth/OIDExternalUserAgentIOSNoSSO.m @@ -6,7 +6,7 @@ 13 or newer to avoid cookies being shared across the device. */ -#import "OIDExternalUserAgentIOSNoSSO.h" +#import "./include/flutter_appauth/OIDExternalUserAgentIOSNoSSO.h" #import #import diff --git a/flutter_appauth/ios/Classes/OIDExternalUserAgentIOSSafariViewController.m b/flutter_appauth/ios/flutter_appauth/Sources/flutter_appauth/OIDExternalUserAgentIOSSafariViewController.m similarity index 98% rename from flutter_appauth/ios/Classes/OIDExternalUserAgentIOSSafariViewController.m rename to flutter_appauth/ios/flutter_appauth/Sources/flutter_appauth/OIDExternalUserAgentIOSSafariViewController.m index ff6d3ce8..087a2e4c 100644 --- a/flutter_appauth/ios/Classes/OIDExternalUserAgentIOSSafariViewController.m +++ b/flutter_appauth/ios/flutter_appauth/Sources/flutter_appauth/OIDExternalUserAgentIOSSafariViewController.m @@ -14,7 +14,7 @@ limitations under the License. */ -#import "OIDExternalUserAgentIOSSafariViewController.h" +#import "./include/flutter_appauth/OIDExternalUserAgentIOSSafariViewController.h" #import diff --git a/flutter_appauth/ios/Resources/PrivacyInfo.xcprivacy b/flutter_appauth/ios/flutter_appauth/Sources/flutter_appauth/PrivacyInfo.xcprivacy similarity index 100% rename from flutter_appauth/ios/Resources/PrivacyInfo.xcprivacy rename to flutter_appauth/ios/flutter_appauth/Sources/flutter_appauth/PrivacyInfo.xcprivacy diff --git a/flutter_appauth/ios/Classes/AppAuthIOSAuthorization.h b/flutter_appauth/ios/flutter_appauth/Sources/flutter_appauth/include/flutter_appauth/AppAuthIOSAuthorization.h similarity index 100% rename from flutter_appauth/ios/Classes/AppAuthIOSAuthorization.h rename to flutter_appauth/ios/flutter_appauth/Sources/flutter_appauth/include/flutter_appauth/AppAuthIOSAuthorization.h diff --git a/flutter_appauth/ios/Classes/FlutterAppAuth.h b/flutter_appauth/ios/flutter_appauth/Sources/flutter_appauth/include/flutter_appauth/FlutterAppAuth.h similarity index 100% rename from flutter_appauth/ios/Classes/FlutterAppAuth.h rename to flutter_appauth/ios/flutter_appauth/Sources/flutter_appauth/include/flutter_appauth/FlutterAppAuth.h diff --git a/flutter_appauth/ios/Classes/FlutterAppauthPlugin.h b/flutter_appauth/ios/flutter_appauth/Sources/flutter_appauth/include/flutter_appauth/FlutterAppauthPlugin.h similarity index 100% rename from flutter_appauth/ios/Classes/FlutterAppauthPlugin.h rename to flutter_appauth/ios/flutter_appauth/Sources/flutter_appauth/include/flutter_appauth/FlutterAppauthPlugin.h diff --git a/flutter_appauth/ios/Classes/OIDExternalUserAgentIOSNoSSO.h b/flutter_appauth/ios/flutter_appauth/Sources/flutter_appauth/include/flutter_appauth/OIDExternalUserAgentIOSNoSSO.h similarity index 100% rename from flutter_appauth/ios/Classes/OIDExternalUserAgentIOSNoSSO.h rename to flutter_appauth/ios/flutter_appauth/Sources/flutter_appauth/include/flutter_appauth/OIDExternalUserAgentIOSNoSSO.h diff --git a/flutter_appauth/ios/Classes/OIDExternalUserAgentIOSSafariViewController.h b/flutter_appauth/ios/flutter_appauth/Sources/flutter_appauth/include/flutter_appauth/OIDExternalUserAgentIOSSafariViewController.h similarity index 100% rename from flutter_appauth/ios/Classes/OIDExternalUserAgentIOSSafariViewController.h rename to flutter_appauth/ios/flutter_appauth/Sources/flutter_appauth/include/flutter_appauth/OIDExternalUserAgentIOSSafariViewController.h diff --git a/flutter_appauth/macos/Assets/.gitkeep b/flutter_appauth/macos/Assets/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/flutter_appauth/macos/Classes/FlutterAppAuth.h b/flutter_appauth/macos/Classes/FlutterAppAuth.h deleted file mode 120000 index dc86a1a7..00000000 --- a/flutter_appauth/macos/Classes/FlutterAppAuth.h +++ /dev/null @@ -1 +0,0 @@ -../../ios/Classes/FlutterAppAuth.h \ No newline at end of file diff --git a/flutter_appauth/macos/Classes/FlutterAppauthPlugin.h b/flutter_appauth/macos/Classes/FlutterAppauthPlugin.h deleted file mode 120000 index aeed9748..00000000 --- a/flutter_appauth/macos/Classes/FlutterAppauthPlugin.h +++ /dev/null @@ -1 +0,0 @@ -../../ios/Classes/FlutterAppauthPlugin.h \ No newline at end of file diff --git a/flutter_appauth/macos/flutter_appauth.podspec b/flutter_appauth/macos/flutter_appauth.podspec index 1a73fd33..add1122e 100644 --- a/flutter_appauth/macos/flutter_appauth.podspec +++ b/flutter_appauth/macos/flutter_appauth.podspec @@ -12,10 +12,11 @@ A new flutter plugin project. s.license = { :file => '../LICENSE' } s.author = { 'Your Company' => 'email@example.com' } s.source = { :path => '.' } - s.source_files = 'Classes/**/*' - s.public_header_files = 'Classes/**/*.h' + s.source_files = 'flutter_appauth/Sources/flutter_appauth/**/*.{h,m}' + s.public_header_files = 'flutter_appauth/Sources/flutter_appauth/include/**/*.h' s.dependency 'FlutterMacOS' s.dependency 'AppAuth', '1.7.6' s.platform = :osx, '10.14' s.osx.deployment_target = "10.14" + s.resource_bundles = {'flutter_appauth_privacy' => ['flutter_appauth/Sources/flutter_appauth/PrivacyInfo.xcprivacy']} end diff --git a/flutter_appauth/macos/Classes/AppAuthMacOSAuthorization.m b/flutter_appauth/macos/flutter_appauth/Sources/flutter_appauth/AppAuthMacOSAuthorization.m similarity index 99% rename from flutter_appauth/macos/Classes/AppAuthMacOSAuthorization.m rename to flutter_appauth/macos/flutter_appauth/Sources/flutter_appauth/AppAuthMacOSAuthorization.m index 30a4694c..ea45e222 100644 --- a/flutter_appauth/macos/Classes/AppAuthMacOSAuthorization.m +++ b/flutter_appauth/macos/flutter_appauth/Sources/flutter_appauth/AppAuthMacOSAuthorization.m @@ -1,4 +1,4 @@ -#import "AppAuthMacOSAuthorization.h" +#import "./include/flutter_appauth/AppAuthMacOSAuthorization.h" @implementation AppAuthMacOSAuthorization diff --git a/flutter_appauth/ios/Classes/FlutterAppAuth.m b/flutter_appauth/macos/flutter_appauth/Sources/flutter_appauth/FlutterAppAuth.m similarity index 99% rename from flutter_appauth/ios/Classes/FlutterAppAuth.m rename to flutter_appauth/macos/flutter_appauth/Sources/flutter_appauth/FlutterAppAuth.m index 4b448d7b..8845b5a9 100644 --- a/flutter_appauth/ios/Classes/FlutterAppAuth.m +++ b/flutter_appauth/macos/flutter_appauth/Sources/flutter_appauth/FlutterAppAuth.m @@ -1,4 +1,4 @@ -#import "FlutterAppAuth.h" +#import "./include/flutter_appauth/FlutterAppAuth.h" @implementation FlutterAppAuth diff --git a/flutter_appauth/ios/Classes/FlutterAppauthPlugin.m b/flutter_appauth/macos/flutter_appauth/Sources/flutter_appauth/FlutterAppauthPlugin.m similarity index 99% rename from flutter_appauth/ios/Classes/FlutterAppauthPlugin.m rename to flutter_appauth/macos/flutter_appauth/Sources/flutter_appauth/FlutterAppauthPlugin.m index 293cf8c0..b87cb638 100644 --- a/flutter_appauth/ios/Classes/FlutterAppauthPlugin.m +++ b/flutter_appauth/macos/flutter_appauth/Sources/flutter_appauth/FlutterAppauthPlugin.m @@ -1,6 +1,6 @@ #import -#import "FlutterAppauthPlugin.h" +#import "./include/flutter_appauth/FlutterAppauthPlugin.h" @interface ArgumentProcessor : NSObject + (id _Nullable)processArgumentValue:(NSDictionary *)arguments diff --git a/flutter_appauth/macos/Classes/OIDExternalUserAgentMacNoSSO.m b/flutter_appauth/macos/flutter_appauth/Sources/flutter_appauth/OIDExternalUserAgentMacNoSSO.m similarity index 98% rename from flutter_appauth/macos/Classes/OIDExternalUserAgentMacNoSSO.m rename to flutter_appauth/macos/flutter_appauth/Sources/flutter_appauth/OIDExternalUserAgentMacNoSSO.m index 9af763cb..985c7f28 100644 --- a/flutter_appauth/macos/Classes/OIDExternalUserAgentMacNoSSO.m +++ b/flutter_appauth/macos/flutter_appauth/Sources/flutter_appauth/OIDExternalUserAgentMacNoSSO.m @@ -18,7 +18,7 @@ limitations under the License. */ -#import "OIDExternalUserAgentMacNoSSO.h" +#import "./include/flutter_appauth/OIDExternalUserAgentMacNoSSO.h" #import #import diff --git a/flutter_appauth/macos/flutter_appauth/Sources/flutter_appauth/Packages.swift b/flutter_appauth/macos/flutter_appauth/Sources/flutter_appauth/Packages.swift new file mode 100644 index 00000000..68df0b0e --- /dev/null +++ b/flutter_appauth/macos/flutter_appauth/Sources/flutter_appauth/Packages.swift @@ -0,0 +1,27 @@ +// swift-tools-version: 5.9 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "flutter_appauth", + platforms: [ + .macOS("10.14") + ], + products: [ + .library(name: "flutter-appauth", targets: ["flutter_appauth"]) + ], + dependencies: [.package(url: "https://github.com/openid/AppAuth-iOS", exact: "1.7.6")] + targets: [ + .target( + name: "flutter_appauth", + dependencies: [], + resources: [ + .process("PrivacyInfo.xcprivacy") + ], + cSettings: [ + .headerSearchPath("include/flutter_appauth") + ] + ) + ] +) \ No newline at end of file diff --git a/flutter_appauth/macos/flutter_appauth/Sources/flutter_appauth/PrivacyInfo.xcprivacy b/flutter_appauth/macos/flutter_appauth/Sources/flutter_appauth/PrivacyInfo.xcprivacy new file mode 120000 index 00000000..6ee50c7c --- /dev/null +++ b/flutter_appauth/macos/flutter_appauth/Sources/flutter_appauth/PrivacyInfo.xcprivacy @@ -0,0 +1 @@ +../../../../ios/flutter_appauth/Sources/flutter_appauth/PrivacyInfo.xcprivacy \ No newline at end of file diff --git a/flutter_appauth/macos/Classes/AppAuthMacOSAuthorization.h b/flutter_appauth/macos/flutter_appauth/Sources/flutter_appauth/include/flutter_appauth/AppAuthMacOSAuthorization.h similarity index 100% rename from flutter_appauth/macos/Classes/AppAuthMacOSAuthorization.h rename to flutter_appauth/macos/flutter_appauth/Sources/flutter_appauth/include/flutter_appauth/AppAuthMacOSAuthorization.h diff --git a/flutter_appauth/macos/flutter_appauth/Sources/flutter_appauth/include/flutter_appauth/FlutterAppAuth.h b/flutter_appauth/macos/flutter_appauth/Sources/flutter_appauth/include/flutter_appauth/FlutterAppAuth.h new file mode 120000 index 00000000..30a47dce --- /dev/null +++ b/flutter_appauth/macos/flutter_appauth/Sources/flutter_appauth/include/flutter_appauth/FlutterAppAuth.h @@ -0,0 +1 @@ +../../../../../../ios/flutter_appauth/Sources/flutter_appauth/include/flutter_appauth/FlutterAppAuth.h \ No newline at end of file diff --git a/flutter_appauth/macos/flutter_appauth/Sources/flutter_appauth/include/flutter_appauth/FlutterAppauthPlugin.h b/flutter_appauth/macos/flutter_appauth/Sources/flutter_appauth/include/flutter_appauth/FlutterAppauthPlugin.h new file mode 120000 index 00000000..56da9545 --- /dev/null +++ b/flutter_appauth/macos/flutter_appauth/Sources/flutter_appauth/include/flutter_appauth/FlutterAppauthPlugin.h @@ -0,0 +1 @@ +../../../../../../ios/flutter_appauth/Sources/flutter_appauth/include/flutter_appauth/FlutterAppauthPlugin.h \ No newline at end of file diff --git a/flutter_appauth/macos/Classes/OIDExternalUserAgentMacNoSSO.h b/flutter_appauth/macos/flutter_appauth/Sources/flutter_appauth/include/flutter_appauth/OIDExternalUserAgentMacNoSSO.h similarity index 100% rename from flutter_appauth/macos/Classes/OIDExternalUserAgentMacNoSSO.h rename to flutter_appauth/macos/flutter_appauth/Sources/flutter_appauth/include/flutter_appauth/OIDExternalUserAgentMacNoSSO.h