Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.

Commit 487132f

Browse files
committed
Update Secrets.swift to be more _swifty_
- `enum` instead of `@objc class: NSObject` - No need to `import Foundation` - Use correct capitalization for "API" acronym
1 parent ab6d1a0 commit 487132f

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

.configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"project_name": "WordPressAuthenticator-iOS",
33
"branch": "trunk",
4-
"pinned_hash": "bec1a27fb1457e77fe36861d02c239590748a970",
4+
"pinned_hash": "d71ccb4011793d363fbef513903867dfc672e09a",
55
"files_to_copy": [
66
{
77
"file": "iOS/WordPressAuthenticator-Demo/Secrets.swift",

.configure-files/Secrets.swift.enc

-32 Bytes
Binary file not shown.

Demo/AuthenticatorDemo/Secrets.example.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import Foundation
2-
3-
@objc
4-
class ApiCredentials: NSObject {
1+
enum APICredentials {
52

63
// WordPress.com OAuth ClientID / Client Secret
74
static let client = "0"

Demo/AuthenticatorDemo/ViewController+WordPressAuthenticator.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ extension ViewController {
88
// useful to keep it all in one block to show how insanely long it is.
99
WordPressAuthenticator.initialize(
1010
configuration: WordPressAuthenticatorConfiguration(
11-
wpcomClientId: ApiCredentials.client,
12-
wpcomSecret: ApiCredentials.secret,
11+
wpcomClientId: APICredentials.client,
12+
wpcomSecret: APICredentials.secret,
1313
wpcomScheme: "wordpress-authenticator-ios-demo",
1414
wpcomTermsOfServiceURL: "https://wordpress.com/tos/",
1515
wpcomBaseURL: "https://wordpress.com",
1616
wpcomAPIBaseURL: "https://public-api.wordpress.com/",
17-
googleLoginClientId: ApiCredentials.googleLoginClientId,
18-
googleLoginServerClientId: ApiCredentials.googleLoginServerClientId,
19-
googleLoginScheme: ApiCredentials.googleLoginSchemeId,
17+
googleLoginClientId: APICredentials.googleLoginClientId,
18+
googleLoginServerClientId: APICredentials.googleLoginServerClientId,
19+
googleLoginScheme: APICredentials.googleLoginSchemeId,
2020
userAgent: "\(WKWebView.userAgent)-wordpress-authenticator-demo-app",
2121
showLoginOptions: true,
2222
enableSignUp: true,

0 commit comments

Comments
 (0)