Skip to content

Commit

Permalink
added Swift Package Manager support
Browse files Browse the repository at this point in the history
  • Loading branch information
MaikuB committed Dec 10, 2024
1 parent 5ece406 commit 099aadc
Show file tree
Hide file tree
Showing 29 changed files with 73 additions and 16 deletions.
1 change: 1 addition & 0 deletions flutter_appauth/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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]

Expand Down
Empty file.
6 changes: 3 additions & 3 deletions flutter_appauth/ios/flutter_appauth.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ A new flutter plugin project.
s.license = { :file => '../LICENSE' }
s.author = { 'Your Company' => '[email protected]' }
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

27 changes: 27 additions & 0 deletions flutter_appauth/ios/flutter_appauth/Packages.swift
Original file line number Diff line number Diff line change
@@ -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")
]
)
]
)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#import "AppAuthIOSAuthorization.h"
#import "./include/flutter_appauth/AppAuthIOSAuthorization.h"

@implementation AppAuthIOSAuthorization

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#import "FlutterAppAuth.h"
#import "./include/flutter_appauth/FlutterAppAuth.h"

@implementation FlutterAppAuth

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#import <TargetConditionals.h>

#import "FlutterAppauthPlugin.h"
#import "./include/flutter_appauth/FlutterAppauthPlugin.h"

@interface ArgumentProcessor : NSObject
+ (id _Nullable)processArgumentValue:(NSDictionary *)arguments
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <AuthenticationServices/AuthenticationServices.h>
#import <SafariServices/SafariServices.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
limitations under the License.
*/

#import "OIDExternalUserAgentIOSSafariViewController.h"
#import "./include/flutter_appauth/OIDExternalUserAgentIOSSafariViewController.h"

#import <SafariServices/SafariServices.h>

Expand Down
Empty file.
1 change: 0 additions & 1 deletion flutter_appauth/macos/Classes/FlutterAppAuth.h

This file was deleted.

1 change: 0 additions & 1 deletion flutter_appauth/macos/Classes/FlutterAppauthPlugin.h

This file was deleted.

5 changes: 3 additions & 2 deletions flutter_appauth/macos/flutter_appauth.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ A new flutter plugin project.
s.license = { :file => '../LICENSE' }
s.author = { 'Your Company' => '[email protected]' }
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#import "AppAuthMacOSAuthorization.h"
#import "./include/flutter_appauth/AppAuthMacOSAuthorization.h"

@implementation AppAuthMacOSAuthorization

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#import "FlutterAppAuth.h"
#import "./include/flutter_appauth/FlutterAppAuth.h"

@implementation FlutterAppAuth

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#import <TargetConditionals.h>

#import "FlutterAppauthPlugin.h"
#import "./include/flutter_appauth/FlutterAppauthPlugin.h"

@interface ArgumentProcessor : NSObject
+ (id _Nullable)processArgumentValue:(NSDictionary *)arguments
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
limitations under the License.
*/

#import "OIDExternalUserAgentMacNoSSO.h"
#import "./include/flutter_appauth/OIDExternalUserAgentMacNoSSO.h"

#import <AuthenticationServices/AuthenticationServices.h>
#import <Cocoa/Cocoa.h>
Expand Down
Original file line number Diff line number Diff line change
@@ -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")
]
)
]
)

0 comments on commit 099aadc

Please sign in to comment.