Skip to content
WordPress for iOS - Official repository
Swift Objective-C Ruby HTML Shell Python Other
Branch: develop
Clone or download
ScoutHarris Merge pull request #12533 from wordpress-mobile/issue/stats_remove_do…

[Stats] Remove file downloads feature flag.
Latest commit 782a417 Sep 23, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Merge branch 'develop' into circlci-build-tests Sep 23, 2019
.github PR Template: Make release notes checkbox clearer Aug 22, 2019
Scripts Merge remote-tracking branch 'origin/develop' into merge/13.2.1-into-… Sep 18, 2019
WordPress.xcworkspace Plans: Adds order field to Plan and PlanGroup entities Dec 8, 2018
WordPress Remove file downloads feature flag. Sep 23, 2019
WordPressComStatsiOS Fix static frameworks Sep 16, 2019
WordPressFlux Xcode 10.2 compatibility Apr 16, 2019
WordPressShared/WordPressShared/Core Merge branch 'develop' into feature/8954-stock-photos-update-mark-II Apr 20, 2018
config Cut a new version Sep 16, 2019
.clang-format Add clang format file. Mar 18, 2015
.configure Include the latest mobile secrets May 2, 2019
.gitattributes Add support for diffing .strings files Apr 12, 2019
.gitignore Remove old assets Aug 30, 2019
.hound.yml Corrected ruby key as well Sep 27, 2018
.ruby-version Update CircleCI for Xcode 11 (#12503) Sep 14, 2019
.swiftlint.yml Catch interpolation at the start of the string Nov 26, 2018
.xctool-args Fixed deployment target and xctool builds Nov 20, 2013 Updated Code of Conduct with contact information Feb 10, 2017 Create Nov 30, 2015 Update May 3, 2019
Gemfile Update CocoaPods to ~> 1.7.0 Sep 16, 2019
Gemfile.lock Merge remote-tracking branch 'origin/develop' into merge/13.2.1-into-… Sep 18, 2019
LICENSE Project file cleanup Mar 27, 2014 Fixes an issue with post uploads when their media is over the max ret… Aug 29, 2019
Podfile Update pods to release versions for 13.3 Sep 23, 2019
Podfile.lock Update pods to release versions for 13.3 Sep 23, 2019 Add responsible disclosure policy (#11666) Jun 3, 2019 Updated hot fix branch version to 9.1 Dec 22, 2017
RELEASE-NOTES.txt Update release notes for #12467 Sep 20, 2019
Rakefile Update 'rake mocks' to use a local path for WordPressMocks if used Jun 13, 2019 Add responsible disclosure policy (#11666) Jun 3, 2019

WordPress for iOS

CircleCI Reviewed by Hound

Build Instructions

Please refer to the sections below for more detailed information.

  1. Download and install Xcode. WordPress for iOS requires Xcode 10.2 or newer.
  2. git clone in the folder of your preference.
  3. cd WordPress-iOS to enter the working directory.
  4. rake dependencies to install all dependencies required to run the project (this may take some time to complete).
  5. rake xcode to open the project in Xcode.
  6. Compile and run the app on a device or an simulator.

In order to login to using the app:

  1. Create a account at (if you don't already have one).
  2. Create an application at
  3. Set "Redirect URLs"= https://localhost and "Type" = Native and click "Create" then "Update".
  4. Copy the Client ID and Client Secret from the OAuth Information.
  5. mkdir -p ~/.mobile-secrets/iOS/WPiOS/ to create a place to store app credentials.
  6. cp ./WordPress/Credentials/wpcom_app_credentials.txt ~/.mobile-secrets/iOS/WPiOS/wpcom_app_credentials to copy the sample credentials file to your home folder.
  7. Paste Client ID and Client Secret from the app you created into WPCOM_APP_ID and WPCOM_APP_SECRET in ~/.mobile-secrets/iOS/WPiOS/wpcom_app_credentials.
  8. Recompile and run the app on a device or an simulator.

You can only log in with the account that you used to create the WordPress application.

Third party tools

We use a few tools to help with development. Running rake dependencies will configure them for you.


WordPress for iOS uses CocoaPods to manage third party libraries.
Third party libraries and resources managed by CocoaPods will be installed by the rake dependencies command above.


We use SwiftLint to enforce a common style for Swift code. The app should build and work without it, but if you plan to write code, you are encouraged to install it. No commit should have lint warnings or errors.

You can set up a Git pre-commit hook to run SwiftLint automatically when committing by running:

rake git:install_hooks

This is the recommended way to include SwiftLint in your workflow, as it catches lint issues locally before your code makes its way to Github.

Alternately, a SwiftLint scheme is exposed within the project; Xcode will show a warning if you don't have SwiftLint installed.

Finally, you can also run SwiftLint manually from the command line with:

rake lint

If your code has any style violations, you can try to automatically correct them by running:

rake lint:autocorrect

Otherwise you have to fix them manually.

Open Xcode

Launch the workspace by running the following from the command line:

rake xcode

This will ensure any dependencies are ready before launching Xcode.

You can also open the project by double clicking on WordPress.xcworkspace file, or launching Xcode and choose File > Open and browse to WordPress.xcworkspace.

Setup Credentials

In order to login to using the app you will need to create an account over at the Developer Portal.

After you created an account you can create an application on the applications manager.

When creating your application, you should select "Native client" for the application type. The applications manager currently requires a "redirect URL", but this isn't used for mobile apps. Just use "https://localhost".

After you created an application you will have an associated a client ID and a client secret key. These details will be used to authenticate your application and verify that the API calls being made are valid.

In order to use these details, you'll need to create a credential file in your build machine. Start by copying the sample credentials file to your home folder by doing this:

mkdir -p ~/.mobile-secrets/iOS/WPiOS/

cp ./WordPress/Credentials/wpcom_app_credentials.txt ~/.mobile-secrets/iOS/WPiOS/wpcom_app_credentials

Then edit the ~/.mobile-secrets/iOS/WPiOS/wpcom_app_credentials file and change the WPCOM_APP_ID and WPCOM_APP_SECRET fields to the values you got for your app.

Then you can compile and run the app on a simulator and log in with a account. Note that authenticating to via Google is not supported in development builds of the app, only in the official release.

Remember the only account you will be able to login in with is the one affiliated with your developer account.

Read more about OAuth2 and the REST endpoint.


Read our Contributing Guide to learn about reporting issues, contributing code, and more ways to contribute.


If you happen to find a security vulnerability, we would appreciate you letting us know at and allowing us to respond before disclosing the issue publicly.

Getting in Touch

If you have questions about getting setup or just want to say hi, join the WordPress Slack and drop a message on the #mobile channel.



WordPress for iOS is an Open Source project covered by the GNU General Public License version 2.

You can’t perform that action at this time.