File tree Expand file tree Collapse file tree 3 files changed +17
-25
lines changed Expand file tree Collapse file tree 3 files changed +17
-25
lines changed Original file line number Diff line number Diff line change 11// swift-tools-version:5.5
2- // The swift-tools-version declares the minimum version of Swift required to build this package.
32
43import PackageDescription
54
65let package = Package (
7- name: " Twift " ,
8- products: [
9- // Products define the executables and libraries a package produces, and make them visible to other packages.
10- . library(
11- name: " Twift " ,
12- targets: [ " Twift " ] ) ,
13- ] ,
14- dependencies: [
15- // Dependencies declare other packages that this package depends on.
16- // .package(url: /* package url */, from: "1.0.0"),
17- ] ,
18- targets: [
19- // Targets are the basic building blocks of a package. A target can define a module or a test suite.
20- // Targets can depend on other targets in this package, and on products in packages this package depends on.
21- . target(
22- name: " Twift " ,
23- dependencies: [ ] ) ,
24- . testTarget(
25- name: " TwiftTests " ,
26- dependencies: [ " Twift " ] ) ,
27- ]
6+ name: " Twift " ,
7+ platforms: [
8+ . macOS( . v12) , . iOS( . v15)
9+ ] ,
10+ products: [
11+ . library(
12+ name: " Twift " ,
13+ targets: [ " Twift " ] ) ,
14+ ] ,
15+ targets: [
16+ . target(
17+ name: " Twift " ,
18+ path: " Sources " ) ,
19+ . testTarget(
20+ name: " TwiftTests " ,
21+ dependencies: [ " Twift " ] ) ,
22+ ]
2823)
Original file line number Diff line number Diff line change 11import Foundation
22
3- @available ( macOS 12 . 0 , * )
43extension Twift {
54 enum TwiftError : Error {
65 case CallbackURLError
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ struct OAuthToken: Codable {
1212 }
1313}
1414
15- @available ( macOS 12 . 0 , * )
1615@MainActor
1716class Twift : NSObject , ObservableObject {
1817 var clientCredentials : OAuthToken
@@ -162,7 +161,6 @@ extension String {
162161 }
163162}
164163
165- @available ( macOS 12 . 0 , * )
166164extension Twift : ASWebAuthenticationPresentationContextProviding {
167165 func presentationAnchor( for session: ASWebAuthenticationSession ) -> ASPresentationAnchor {
168166 return ASPresentationAnchor ( )
You can’t perform that action at this time.
0 commit comments