فهرست منبع

Edit SPM and cocoapods configuration file to support macOS (#102)

pinlu 4 سال پیش
والد
کامیت
a20152cff4
3فایلهای تغییر یافته به همراه7 افزوده شده و 6 حذف شده
  1. 2 2
      GoogleSignIn.podspec
  2. 0 2
      GoogleSignIn/Sources/GIDSignInCallbackSchemes.m
  3. 5 2
      Package.swift

+ 2 - 2
GoogleSignIn.podspec

@@ -26,9 +26,9 @@ The Google Sign-In SDK allows users to sign in with their Google account from th
     'CoreText',
     'Foundation',
     'LocalAuthentication',
-    'Security',
-    'UIKit'
+    'Security'
   ]
+  s.ios.framework = 'UIKit'
   s.dependency 'AppAuth', '~> 1.4'
   s.dependency 'GTMAppAuth', '~> 1.0'
   s.dependency 'GTMSessionFetcher/Core', '~> 1.1'

+ 0 - 2
GoogleSignIn/Sources/GIDSignInCallbackSchemes.m

@@ -14,8 +14,6 @@
 
 #import "GoogleSignIn/Sources/GIDSignInCallbackSchemes.h"
 
-#import <UIKit/UIKit.h>
-
 NS_ASSUME_NONNULL_BEGIN
 
 @implementation GIDSignInCallbackSchemes {

+ 5 - 2
Package.swift

@@ -22,7 +22,10 @@ let googleSignInVersion = "6.1.0"
 let package = Package(
   name: "GoogleSignIn",
   defaultLocalization: "en",
-  platforms: [.iOS(.v9)],
+  platforms: [
+    .macOS(.v10_15),
+    .iOS(.v9)
+  ],
   products: [
     .library(
       name: "GoogleSignIn",
@@ -75,7 +78,7 @@ let package = Package(
         .linkedFramework("Foundation"),
         .linkedFramework("LocalAuthentication"),
         .linkedFramework("Security"),
-        .linkedFramework("UIKit"),
+        .linkedFramework("UIKit", .when(platforms: [.iOS])),
       ]
     ),
     .testTarget(