@capgo/capacitor-social-login 8.5.11 → 8.5.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CapgoCapacitorSocialLogin.podspec +0 -1
- package/Package.swift +2 -5
- package/README.md +2 -2
- package/android/src/main/java/ee/forgr/capacitor/social/login/SocialLoginPlugin.java +1 -1
- package/ios/Sources/SocialLoginPlugin/AppleProvider.swift +124 -50
- package/ios/Sources/SocialLoginPlugin/SocialLoginPlugin.swift +2 -8
- package/package.json +1 -1
- package/scripts/configure-dependencies.js +0 -19
package/Package.swift
CHANGED
|
@@ -14,9 +14,7 @@ let package = Package(
|
|
|
14
14
|
// FBSDKCoreKit and FBSDKLoginKit
|
|
15
15
|
.package(url: "https://github.com/facebook/facebook-ios-sdk.git", .upToNextMajor(from: "18.0.3")),
|
|
16
16
|
// Add Google Sign-In dependency
|
|
17
|
-
.package(url: "https://github.com/google/GoogleSignIn-iOS.git", .upToNextMajor(from: "9.0.0"))
|
|
18
|
-
// Alamofire
|
|
19
|
-
.package(url: "https://github.com/Alamofire/Alamofire.git", .upToNextMajor(from: "5.11.2"))
|
|
17
|
+
.package(url: "https://github.com/google/GoogleSignIn-iOS.git", .upToNextMajor(from: "9.0.0"))
|
|
20
18
|
],
|
|
21
19
|
targets: [
|
|
22
20
|
.target(
|
|
@@ -26,8 +24,7 @@ let package = Package(
|
|
|
26
24
|
.product(name: "Cordova", package: "capacitor-swift-pm"),
|
|
27
25
|
.product(name: "FacebookCore", package: "facebook-ios-sdk"),
|
|
28
26
|
.product(name: "FacebookLogin", package: "facebook-ios-sdk"),
|
|
29
|
-
.product(name: "GoogleSignIn", package: "GoogleSignIn-iOS")
|
|
30
|
-
.product(name: "Alamofire", package: "Alamofire")
|
|
27
|
+
.product(name: "GoogleSignIn", package: "GoogleSignIn-iOS")
|
|
31
28
|
],
|
|
32
29
|
path: "ios/Sources/SocialLoginPlugin"),
|
|
33
30
|
.testTarget(
|
package/README.md
CHANGED
|
@@ -94,7 +94,7 @@ const config: CapacitorConfig = {
|
|
|
94
94
|
providers: {
|
|
95
95
|
google: true, // true = enabled (bundled), false = disabled (not bundled)
|
|
96
96
|
facebook: true, // Use false to reduce app size
|
|
97
|
-
apple: true, // Apple uses system APIs
|
|
97
|
+
apple: true, // Apple uses system APIs only (no third-party networking dependency)
|
|
98
98
|
twitter: false // false = disabled (not bundled)
|
|
99
99
|
},
|
|
100
100
|
logLevel: 1 // Warnings and errors only
|
|
@@ -118,7 +118,7 @@ export default config;
|
|
|
118
118
|
- This configuration only affects iOS and Android platforms; it does not affect the web platform.
|
|
119
119
|
- **Important**: Using `false` means the dependency won't be bundled, but the plugin code still compiles against it. Ensure the consuming app includes the dependency if needed.
|
|
120
120
|
- **Facebook**: When `facebook: false`, the Facebook SDK is omitted and the plugin compiles a provider stub in its own package — no `com.facebook.*` classes are shipped (avoids privacy-scanner false positives).
|
|
121
|
-
- **Apple (iOS)**: `apple: true` enables Sign in with Apple (AuthenticationServices
|
|
121
|
+
- **Apple (iOS)**: `apple: true` enables Sign in with Apple (AuthenticationServices). Redirect URL and backend token exchange use Foundation URLSession, so no third-party networking library is required. `apple: false` disables Apple authentication at runtime, including basic Sign in with Apple, consistent with the rule above that `false` providers are unavailable at runtime.
|
|
122
122
|
- Apple Sign-In on Android uses OAuth flow without external SDK dependencies
|
|
123
123
|
- Twitter uses standard OAuth 2.0 flow without external SDK dependencies
|
|
124
124
|
|
|
@@ -24,7 +24,7 @@ import org.json.JSONObject;
|
|
|
24
24
|
@CapacitorPlugin(name = "SocialLogin")
|
|
25
25
|
public class SocialLoginPlugin extends Plugin {
|
|
26
26
|
|
|
27
|
-
private final String pluginVersion = "8.5.
|
|
27
|
+
private final String pluginVersion = "8.5.12";
|
|
28
28
|
|
|
29
29
|
public static String LOG_TAG = "CapgoSocialLogin";
|
|
30
30
|
public HashMap<String, SocialProvider> socialProviderHashMap = new HashMap<>();
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import Foundation
|
|
2
2
|
import AuthenticationServices
|
|
3
3
|
|
|
4
|
-
#if canImport(Alamofire)
|
|
5
|
-
import Alamofire
|
|
6
|
-
#endif
|
|
7
|
-
|
|
8
4
|
import UIKit
|
|
9
5
|
import Security
|
|
10
6
|
|
|
@@ -60,7 +56,6 @@ enum AppleProviderError: Error {
|
|
|
60
56
|
case missingUserId
|
|
61
57
|
case unknownError
|
|
62
58
|
case invalidIdToken
|
|
63
|
-
case alamofireNotAvailable
|
|
64
59
|
}
|
|
65
60
|
|
|
66
61
|
// Implement LocalizedError for AppleProviderError
|
|
@@ -99,14 +94,56 @@ extension AppleProviderError: LocalizedError {
|
|
|
99
94
|
return NSLocalizedString("User ID not found in ID token.", comment: "")
|
|
100
95
|
case .invalidIdToken:
|
|
101
96
|
return NSLocalizedString("Invalid ID token format.", comment: "")
|
|
102
|
-
case .alamofireNotAvailable:
|
|
103
|
-
return NSLocalizedString("Apple redirectUrl / backend token exchange requires Alamofire. Add Alamofire to your Podfile or Package.swift, or remove redirectUrl to use basic Sign in with Apple.", comment: "")
|
|
104
97
|
}
|
|
105
98
|
}
|
|
106
99
|
}
|
|
107
100
|
|
|
101
|
+
private final class NoRedirectURLSessionDelegate: NSObject, URLSessionTaskDelegate {
|
|
102
|
+
func urlSession(
|
|
103
|
+
_ session: URLSession,
|
|
104
|
+
task: URLSessionTask,
|
|
105
|
+
willPerformHTTPRedirection response: HTTPURLResponse,
|
|
106
|
+
newRequest request: URLRequest,
|
|
107
|
+
completionHandler: @escaping (URLRequest?) -> Void
|
|
108
|
+
) {
|
|
109
|
+
completionHandler(nil)
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
private enum AppleProviderHTTP {
|
|
114
|
+
private static var formAllowedCharacters: CharacterSet {
|
|
115
|
+
var allowed = CharacterSet.alphanumerics
|
|
116
|
+
allowed.insert(charactersIn: "-._* ")
|
|
117
|
+
return allowed
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
static func applicationFormURLEncodedBody(from parameters: [String: String]) -> Data? {
|
|
121
|
+
let pairs = parameters.keys.sorted().compactMap { key -> String? in
|
|
122
|
+
guard let value = parameters[key] else { return nil }
|
|
123
|
+
let encodedKey = key.addingPercentEncoding(withAllowedCharacters: formAllowedCharacters)?.replacingOccurrences(of: " ", with: "+") ?? key
|
|
124
|
+
let encodedValue = value.addingPercentEncoding(withAllowedCharacters: formAllowedCharacters)?.replacingOccurrences(of: " ", with: "+") ?? value
|
|
125
|
+
return "\(encodedKey)=\(encodedValue)"
|
|
126
|
+
}
|
|
127
|
+
return pairs.joined(separator: "&").data(using: .utf8)
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
private static let sharedTokenExchangeSession: URLSession = {
|
|
131
|
+
URLSession(configuration: .default)
|
|
132
|
+
}()
|
|
133
|
+
|
|
134
|
+
static func tokenExchangeSession() -> URLSession {
|
|
135
|
+
sharedTokenExchangeSession
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
static func noRedirectSession() -> (session: URLSession, keeper: NoRedirectURLSessionDelegate) {
|
|
139
|
+
let delegate = NoRedirectURLSessionDelegate()
|
|
140
|
+
let session = URLSession(configuration: .default, delegate: delegate, delegateQueue: nil)
|
|
141
|
+
return (session, delegate)
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
108
145
|
// Basic Sign in with Apple uses AuthenticationServices only.
|
|
109
|
-
//
|
|
146
|
+
// redirectUrl / backend token-exchange flows use URLSession (Foundation).
|
|
110
147
|
class AppleProvider: NSObject, ASAuthorizationControllerDelegate, ASAuthorizationControllerPresentationContextProviding {
|
|
111
148
|
private var completion: ((Result<AppleProviderResponse, Error>) -> Void)?
|
|
112
149
|
|
|
@@ -315,7 +352,6 @@ class AppleProvider: NSObject, ASAuthorizationControllerDelegate, ASAuthorizatio
|
|
|
315
352
|
)
|
|
316
353
|
|
|
317
354
|
if !self.redirectUrl.isEmpty {
|
|
318
|
-
#if canImport(Alamofire)
|
|
319
355
|
let firstName = fullName?.givenName ?? ""
|
|
320
356
|
let lastName = fullName?.familyName ?? ""
|
|
321
357
|
|
|
@@ -327,9 +363,6 @@ class AppleProvider: NSObject, ASAuthorizationControllerDelegate, ASAuthorizatio
|
|
|
327
363
|
self.completion?(.failure(error))
|
|
328
364
|
}
|
|
329
365
|
}, skipUser: fullName?.givenName == nil)
|
|
330
|
-
#else
|
|
331
|
-
self.completion?(.failure(AppleProviderError.alamofireNotAvailable))
|
|
332
|
-
#endif
|
|
333
366
|
} else {
|
|
334
367
|
do {
|
|
335
368
|
try self.persistState(idToken: response.idToken ?? "", refreshToken: "", accessToken: "")
|
|
@@ -342,7 +375,6 @@ class AppleProvider: NSObject, ASAuthorizationControllerDelegate, ASAuthorizatio
|
|
|
342
375
|
}
|
|
343
376
|
|
|
344
377
|
// identityToken is the JWT generated by apple
|
|
345
|
-
#if canImport(Alamofire)
|
|
346
378
|
func sendRequest(
|
|
347
379
|
code: String,
|
|
348
380
|
identityToken: String,
|
|
@@ -376,23 +408,40 @@ class AppleProvider: NSObject, ASAuthorizationControllerDelegate, ASAuthorizatio
|
|
|
376
408
|
parameters["user"] = userJSONString
|
|
377
409
|
}
|
|
378
410
|
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
.
|
|
389
|
-
|
|
390
|
-
|
|
411
|
+
guard let url = URL(string: self.redirectUrl),
|
|
412
|
+
let body = AppleProviderHTTP.applicationFormURLEncodedBody(from: parameters) else {
|
|
413
|
+
DispatchQueue.main.async {
|
|
414
|
+
completion(.failure(.responseError(NSError(domain: "AppleProvider", code: -1, userInfo: [NSLocalizedDescriptionKey: "Invalid redirect URL"]))))
|
|
415
|
+
}
|
|
416
|
+
return
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
var request = URLRequest(url: url)
|
|
420
|
+
request.httpMethod = "POST"
|
|
421
|
+
request.httpBody = body
|
|
422
|
+
request.setValue("application/x-www-form-urlencoded; charset=utf-8", forHTTPHeaderField: "Content-Type")
|
|
423
|
+
request.setValue("0.0.0", forHTTPHeaderField: "ios-plugin-version")
|
|
424
|
+
|
|
425
|
+
let redirectSession = AppleProviderHTTP.noRedirectSession()
|
|
426
|
+
|
|
427
|
+
redirectSession.session.dataTask(with: request) { data, response, error in
|
|
428
|
+
DispatchQueue.main.async {
|
|
429
|
+
if let error = error {
|
|
430
|
+
completion(.failure(.responseError(error)))
|
|
431
|
+
print("Error: \(error)")
|
|
432
|
+
return
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
guard let httpResponse = response as? HTTPURLResponse else {
|
|
436
|
+
completion(.failure(.unknownError))
|
|
437
|
+
return
|
|
438
|
+
}
|
|
439
|
+
|
|
391
440
|
print("Status Code: \(httpResponse.statusCode)")
|
|
392
441
|
|
|
393
442
|
// Check if the response is a redirect
|
|
394
443
|
if (300...399).contains(httpResponse.statusCode) {
|
|
395
|
-
if let location = httpResponse.
|
|
444
|
+
if let location = httpResponse.value(forHTTPHeaderField: "Location") {
|
|
396
445
|
print("Redirect Location: \(location)")
|
|
397
446
|
|
|
398
447
|
// Parse the redirect URL
|
|
@@ -493,7 +542,7 @@ class AppleProvider: NSObject, ASAuthorizationControllerDelegate, ASAuthorizatio
|
|
|
493
542
|
}
|
|
494
543
|
} else {
|
|
495
544
|
// Handle non-redirect responses
|
|
496
|
-
if let data =
|
|
545
|
+
if let data = data,
|
|
497
546
|
let responseString = String(data: data, encoding: .utf8) {
|
|
498
547
|
print("Response: \(responseString)")
|
|
499
548
|
} else {
|
|
@@ -502,11 +551,10 @@ class AppleProvider: NSObject, ASAuthorizationControllerDelegate, ASAuthorizatio
|
|
|
502
551
|
|
|
503
552
|
completion(.failure(.invalidResponseCode(statusCode: httpResponse.statusCode)))
|
|
504
553
|
}
|
|
505
|
-
} else if let error = response.error {
|
|
506
|
-
completion(.failure(.responseError(error)))
|
|
507
|
-
print("Error: \(error)")
|
|
508
554
|
}
|
|
509
|
-
|
|
555
|
+
_ = redirectSession.keeper
|
|
556
|
+
}.resume()
|
|
557
|
+
redirectSession.session.finishTasksAndInvalidate()
|
|
510
558
|
}
|
|
511
559
|
|
|
512
560
|
func exchangeCodeForTokens(clientSecret: String, code: String, completion: @escaping ((Result<AppleProviderResponse, AppleProviderError>) -> Void)) {
|
|
@@ -518,16 +566,50 @@ class AppleProvider: NSObject, ASAuthorizationControllerDelegate, ASAuthorizatio
|
|
|
518
566
|
"grant_type": "authorization_code"
|
|
519
567
|
]
|
|
520
568
|
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
569
|
+
guard let url = URL(string: TOKEN_URL),
|
|
570
|
+
let body = AppleProviderHTTP.applicationFormURLEncodedBody(from: parameters) else {
|
|
571
|
+
DispatchQueue.main.async {
|
|
572
|
+
completion(.failure(.responseError(NSError(domain: "AppleProvider", code: -1, userInfo: [NSLocalizedDescriptionKey: "Invalid token URL"]))))
|
|
573
|
+
}
|
|
574
|
+
return
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
var request = URLRequest(url: url)
|
|
578
|
+
request.httpMethod = "POST"
|
|
579
|
+
request.httpBody = body
|
|
580
|
+
request.setValue("application/x-www-form-urlencoded; charset=utf-8", forHTTPHeaderField: "Content-Type")
|
|
581
|
+
|
|
582
|
+
AppleProviderHTTP.tokenExchangeSession().dataTask(with: request) { data, response, error in
|
|
583
|
+
DispatchQueue.main.async {
|
|
584
|
+
if let error = error {
|
|
585
|
+
completion(.failure(.responseError(error)))
|
|
586
|
+
return
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
guard let httpResponse = response as? HTTPURLResponse else {
|
|
590
|
+
completion(.failure(.unknownError))
|
|
591
|
+
return
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
guard (200..<300).contains(httpResponse.statusCode) else {
|
|
595
|
+
print("error", HTTPURLResponse.localizedString(forStatusCode: httpResponse.statusCode))
|
|
596
|
+
completion(.failure(.invalidResponseCode(statusCode: httpResponse.statusCode)))
|
|
597
|
+
return
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
guard let data = data else {
|
|
601
|
+
completion(.failure(.jsonParsingError))
|
|
602
|
+
return
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
let tokenResponse: TokenResponse
|
|
606
|
+
do {
|
|
607
|
+
tokenResponse = try JSONDecoder().decode(TokenResponse.self, from: data)
|
|
608
|
+
} catch {
|
|
609
|
+
completion(.failure(.jsonParsingError))
|
|
610
|
+
return
|
|
611
|
+
}
|
|
612
|
+
|
|
531
613
|
// Extract tokens from the response
|
|
532
614
|
guard let accessToken = tokenResponse.access_token else {
|
|
533
615
|
completion(.failure(.missingAccessToken))
|
|
@@ -596,17 +678,9 @@ class AppleProvider: NSObject, ASAuthorizationControllerDelegate, ASAuthorizatio
|
|
|
596
678
|
} else {
|
|
597
679
|
completion(.failure(.invalidIdToken))
|
|
598
680
|
}
|
|
599
|
-
case .failure(let error):
|
|
600
|
-
if let statusCode = response.response?.statusCode {
|
|
601
|
-
print("error", response.debugDescription)
|
|
602
|
-
completion(.failure(.invalidResponseCode(statusCode: statusCode)))
|
|
603
|
-
} else {
|
|
604
|
-
completion(.failure(.responseError(error)))
|
|
605
|
-
}
|
|
606
681
|
}
|
|
607
|
-
}
|
|
682
|
+
}.resume()
|
|
608
683
|
}
|
|
609
|
-
#endif
|
|
610
684
|
|
|
611
685
|
func authorizationController(controller: ASAuthorizationController, didCompleteWithError error: Error) {
|
|
612
686
|
completion?(.failure(error))
|
|
@@ -16,7 +16,7 @@ import GoogleSignIn
|
|
|
16
16
|
*/
|
|
17
17
|
@objc(SocialLoginPlugin)
|
|
18
18
|
public class SocialLoginPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
19
|
-
private let pluginVersion: String = "8.5.
|
|
19
|
+
private let pluginVersion: String = "8.5.12"
|
|
20
20
|
public let identifier = "SocialLoginPlugin"
|
|
21
21
|
public let jsName = "SocialLogin"
|
|
22
22
|
private static let userCancelledCode = "USER_CANCELLED"
|
|
@@ -44,7 +44,7 @@ public class SocialLoginPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
44
44
|
]
|
|
45
45
|
|
|
46
46
|
// Providers - conditionally initialized based on available dependencies
|
|
47
|
-
// Apple uses AuthenticationServices;
|
|
47
|
+
// Apple uses AuthenticationServices; redirectUrl flows use URLSession (Foundation)
|
|
48
48
|
private let apple = AppleProvider()
|
|
49
49
|
|
|
50
50
|
#if canImport(FBSDKLoginKit)
|
|
@@ -193,12 +193,6 @@ public class SocialLoginPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
193
193
|
}
|
|
194
194
|
let redirectUrl = appleSettings["redirectUrl"] as? String
|
|
195
195
|
let useProperTokenExchange = appleSettings["useProperTokenExchange"] as? Bool ?? false
|
|
196
|
-
#if !canImport(Alamofire)
|
|
197
|
-
if let redirectUrl = redirectUrl, !redirectUrl.isEmpty {
|
|
198
|
-
call.reject("Apple redirectUrl requires Alamofire. Add Alamofire to your Podfile or Package.swift, or omit redirectUrl for basic Sign in with Apple.")
|
|
199
|
-
return
|
|
200
|
-
}
|
|
201
|
-
#endif
|
|
202
196
|
apple.initialize(redirectUrl: redirectUrl, useProperTokenExchange: useProperTokenExchange)
|
|
203
197
|
initialized = true
|
|
204
198
|
}
|
package/package.json
CHANGED
|
@@ -289,13 +289,6 @@ function getPodspecReplacements(providerConfig) {
|
|
|
289
289
|
? `s.dependency 'FBSDKLoginKit', '~> 18.0'`
|
|
290
290
|
: `# s.dependency 'FBSDKLoginKit', '~> 18.0' # Disabled via config (compileOnly)`,
|
|
291
291
|
},
|
|
292
|
-
{
|
|
293
|
-
// Alamofire (for Apple) - handle both active and commented (including existing disabled comments)
|
|
294
|
-
old: new RegExp(`(#[ \\t]*)?s\\.dependency\\s+'Alamofire',\\s*'~>\\s*5\\.10\\.2'${podspecTrailingComment}`),
|
|
295
|
-
new: providerConfig.apple === 'implementation'
|
|
296
|
-
? `s.dependency 'Alamofire', '~> 5.10.2'`
|
|
297
|
-
: `# s.dependency 'Alamofire', '~> 5.10.2' # Disabled via config (compileOnly)`,
|
|
298
|
-
},
|
|
299
292
|
];
|
|
300
293
|
}
|
|
301
294
|
function getPackageSwiftReplacements(providerConfig) {
|
|
@@ -314,12 +307,6 @@ function getPackageSwiftReplacements(providerConfig) {
|
|
|
314
307
|
? `.package(url: "https://github.com/google/GoogleSignIn-iOS.git", .upToNextMajor(from: "9.0.0")),`
|
|
315
308
|
: `// .package(url: "https://github.com/google/GoogleSignIn-iOS.git", .upToNextMajor(from: "9.0.0")), // Disabled via config (compileOnly)`,
|
|
316
309
|
},
|
|
317
|
-
{
|
|
318
|
-
old: new RegExp(`${swiftCommentPrefix}\\.package\\(url:\\s*"https:\\/\\/github\\.com\\/Alamofire\\/Alamofire\\.git",\\s*\\.upToNextMajor\\(from:\\s*"[^"]+"\\)\\)${swiftTrailingComment}`),
|
|
319
|
-
new: providerConfig.apple === 'implementation'
|
|
320
|
-
? `.package(url: "https://github.com/Alamofire/Alamofire.git", .upToNextMajor(from: "5.11.2"))`
|
|
321
|
-
: `// .package(url: "https://github.com/Alamofire/Alamofire.git", .upToNextMajor(from: "5.11.2")) // Disabled via config (compileOnly)`,
|
|
322
|
-
},
|
|
323
310
|
{
|
|
324
311
|
old: new RegExp(`${swiftCommentPrefix}\\.product\\(name:\\s*"FacebookCore",\\s*package:\\s*"facebook-ios-sdk"\\),${swiftTrailingComment}`),
|
|
325
312
|
new: providerConfig.facebook === 'implementation'
|
|
@@ -338,12 +325,6 @@ function getPackageSwiftReplacements(providerConfig) {
|
|
|
338
325
|
? `.product(name: "GoogleSignIn", package: "GoogleSignIn-iOS"),`
|
|
339
326
|
: `// .product(name: "GoogleSignIn", package: "GoogleSignIn-iOS"), // Disabled via config (compileOnly)`,
|
|
340
327
|
},
|
|
341
|
-
{
|
|
342
|
-
old: new RegExp(`${swiftCommentPrefix}\\.product\\(name:\\s*"Alamofire",\\s*package:\\s*"Alamofire"\\)${swiftTrailingComment}`),
|
|
343
|
-
new: providerConfig.apple === 'implementation'
|
|
344
|
-
? `.product(name: "Alamofire", package: "Alamofire")`
|
|
345
|
-
: `// .product(name: "Alamofire", package: "Alamofire") // Disabled via config (compileOnly)`,
|
|
346
|
-
},
|
|
347
328
|
];
|
|
348
329
|
}
|
|
349
330
|
/**
|