Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.
Merged
28 changes: 5 additions & 23 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,29 +31,11 @@ steps:
# Linters
#################
- label: ":swift: SwiftLint"
command: run_swiftlint --strict
plugins: *common_plugins
command: swiftlint
env:
SWIFTLINT_OPTION_STRICT: true
notify:
- github_commit_status:
context: "SwiftLint"
context: SwiftLint
agents:
queue: "default"

- label: "🧹 Lint"
key: "lint"
command: |
lint_pod
plugins: *common_plugins

#################
# Publish the Podspec (if we're building a tag)
#################
- label: "⬆️ Publish Podspec"
key: "publish"
command: .buildkite/publish-pod.sh
plugins: *common_plugins
depends_on:
- "test"
- "validate"
- "lint"
if: build.tag != null
queue: linter
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,17 @@ _None._

_None._

## 17.3.0

### New Features

- Add `upgradeURL` to `JetpackAssistantFeatureDetails` (#822)
- Add support for sending magic links to nonexistent accounts (#812)

### Internal Changes
- Bump rexml from 3.2.6 to 3.3.9
- [Tooling] SwiftLint: Use `linter` agent instead of `default` agent

## 17.2.0

### New Features
Expand Down
48 changes: 26 additions & 22 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,20 @@ GEM
base64
nkf
rexml
activesupport (7.1.3.2)
activesupport (7.2.2)
base64
benchmark (>= 0.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
logger (>= 1.4.2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
Expand All @@ -41,16 +43,17 @@ GEM
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
base64 (0.2.0)
bigdecimal (3.1.7)
benchmark (0.4.0)
bigdecimal (3.1.8)
claide (1.1.0)
claide-plugins (0.9.2)
cork
nap
open4 (~> 1.3)
cocoapods (1.15.2)
cocoapods (1.16.2)
addressable (~> 2.8)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.15.2)
cocoapods-core (= 1.16.2)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 2.1, < 3.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
Expand All @@ -64,10 +67,10 @@ GEM
molinillo (~> 0.8.0)
nap (~> 1.0)
ruby-macho (>= 2.3.0, < 3.0)
xcodeproj (>= 1.23.0, < 2.0)
xcodeproj (>= 1.27.0, < 2.0)
cocoapods-check (1.1.0)
cocoapods (~> 1.0)
cocoapods-core (1.15.2)
cocoapods-core (1.16.2)
activesupport (>= 5.0, < 8)
addressable (~> 2.8)
algoliasearch (~> 1.0)
Expand All @@ -90,7 +93,7 @@ GEM
colored2 (3.1.2)
commander (4.6.0)
highline (~> 2.0.0)
concurrent-ruby (1.2.3)
concurrent-ruby (1.3.4)
connection_pool (2.4.1)
cork (0.3.0)
colored2 (~> 3.1)
Expand Down Expand Up @@ -212,7 +215,7 @@ GEM
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
ffi (1.16.3)
ffi (1.17.0)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
Expand Down Expand Up @@ -261,25 +264,25 @@ GEM
http-cookie (1.0.5)
domain_name (~> 0.5)
httpclient (2.8.3)
i18n (1.14.4)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
jmespath (1.6.2)
json (2.7.1)
json (2.8.2)
jwt (2.8.1)
base64
kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
language_server-protocol (3.17.0.3)
logger (1.6.1)
mini_magick (4.12.0)
mini_mime (1.1.5)
minitest (5.22.3)
minitest (5.25.1)
molinillo (0.8.0)
multi_json (1.15.0)
multipart-post (2.4.0)
mutex_m (0.2.0)
nanaimo (0.3.0)
nanaimo (0.4.0)
nap (1.1.0)
naturally (2.2.1)
netrc (0.11.0)
Expand Down Expand Up @@ -309,7 +312,7 @@ GEM
trailblazer-option (>= 0.1.1, < 0.2.0)
uber (< 0.2.0)
retriable (3.1.2)
rexml (3.2.6)
rexml (3.3.9)
rouge (2.0.7)
rubocop (1.60.2)
json (~> 2.3)
Expand All @@ -331,6 +334,7 @@ GEM
sawyer (0.9.2)
addressable (>= 2.3.5)
faraday (>= 0.17.3, < 3)
securerandom (0.3.2)
security (0.1.3)
signet (0.19.0)
addressable (~> 2.8)
Expand All @@ -356,13 +360,13 @@ GEM
uber (0.1.0)
unicode-display_width (2.5.0)
word_wrap (1.0.0)
xcodeproj (1.24.0)
xcodeproj (1.27.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)
nanaimo (~> 0.4.0)
rexml (>= 3.3.6, < 4.0)
xcpretty (0.3.0)
rouge (~> 2.0.7)
xcpretty-travis-formatter (1.0.1)
Expand Down
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# WordPressKit for iOS

<!-- red -->
> [!CAUTION]
> This library is no longer fit for external contribution and community usage.
>
> [WordPress iOS](https://github.com/wordpress-mobile/WordPress-iOS) is its only consumer.
> The repo exists standalone rather than as part of the WordPress codebase because it's convenient to fetch this lump of code that rarely changes as a binary XCFramework dependency.
> See [#816](https://github.com/wordpress-mobile/WordPressKit-iOS/pull/816).

## XCFramework release instructions

- Run `.buildkite/create-xcframeworks.sh` to create binaries
- Upload `.build/xcframeworks/WordPressKit.zip` to this repo
- Update binary target in `Package.swift` with a new URL and checksum<sup>*</sup>
- Push the new changes to your branch
- After testing is done, merge changes into `trunk`

<sup>*</sup>_checksum is echoed at the end of the `create-xcframeworks.sh` script_

## About

WordPressKit offers a clean and simple WordPress.com and WordPress.org API.
Expand Down
15 changes: 15 additions & 0 deletions Sources/WordPressKit/Services/AccountServiceRemoteREST.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,21 @@ extern MagicLinkFlow const MagicLinkFlowSignup;

@interface AccountServiceRemoteREST : ServiceRemoteWordPressComREST <AccountServiceRemote>

/**
* @brief Request an authentication link be sent to the email address provided.
*
* @param success The block that will be executed on success. Can be nil.
* @param failure The block that will be executed on failure. Can be nil.
*/
- (void)requestWPComAuthLinkForEmail:(NSString *)email
clientID:(NSString *)clientID
clientSecret:(NSString *)clientSecret
source:(MagicLinkSource)source
wpcomScheme:(NSString *)scheme
createAccountIfNotFound:(BOOL)createAccountIfNotFound
success:(void (^)(void))success
failure:(void (^)(NSError *error))failure;

/**
* @brief Request an authentication link be sent to the email address provided.
*
Expand Down
26 changes: 23 additions & 3 deletions Sources/WordPressKit/Services/AccountServiceRemoteREST.m
Original file line number Diff line number Diff line change
Expand Up @@ -244,17 +244,19 @@ - (void)requestWPComAuthLinkForEmail:(NSString *)email
clientSecret:(NSString *)clientSecret
source:(MagicLinkSource)source
wpcomScheme:(NSString *)scheme
createAccountIfNotFound:(BOOL)createAccountIfNotFound
success:(void (^)(void))success
failure:(void (^)(NSError *error))failure
{
NSString *path = [self pathForEndpoint:@"auth/send-login-email"
withVersion:WordPressComRESTAPIVersion_1_3];

NSDictionary *extraParams = @{
MagicLinkParameterFlow: MagicLinkFlowLogin,
MagicLinkParameterSource: source
MagicLinkParameterSource: source,
@"create_account": createAccountIfNotFound ? @"true" : @"false"
};

[self requestWPComMagicLinkForEmail:email
path:path
clientID:clientID
Expand All @@ -265,6 +267,24 @@ - (void)requestWPComAuthLinkForEmail:(NSString *)email
failure:failure];
}

- (void)requestWPComAuthLinkForEmail:(NSString *)email
clientID:(NSString *)clientID
clientSecret:(NSString *)clientSecret
source:(MagicLinkSource)source
wpcomScheme:(NSString *)scheme
success:(void (^)(void))success
failure:(void (^)(NSError *error))failure
{
[self requestWPComAuthLinkForEmail:email
clientID:clientID
clientSecret:clientSecret
source:source
wpcomScheme:scheme
createAccountIfNotFound:NO
success:success
failure:failure];
}

- (void)requestWPComSignupLinkForEmail:(NSString *)email
clientID:(NSString *)clientID
clientSecret:(NSString *)clientSecret
Expand Down