• Stars
    star
    3,686
  • Rank 11,988 (Top 0.3 %)
  • Language
    Swift
  • License
    GNU General Publi...
  • Created over 11 years ago
  • Updated 10 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

WordPress for iOS - Official repository

WordPress for iOS

Build Instructions

Please refer to the sections below for more detailed information. The instructions assume the work is performed from a command line inside the repository.

Getting Started

  1. Download and install Xcode. Refer to the .xcode-version file for the minimum required version.
  2. Clone this repository in the folder of your preference.

Create WordPress.com API Credentials

  1. Create a WordPress.com account at https://wordpress.com/start/user (if you don't already have one).
  2. Create an application at https://developer.wordpress.com/apps/.
  3. Set Website URL to any valid host, Redirect URLs to https://localhost, and Type to Native.
  4. Click "Create" then "Update".
  5. Copy the Client ID and Client Secret from the OAuth Information.

Configure Your WordPress App Development Environment

  1. Check that your local version of Ruby matches the one in .ruby-version. We recommend installing a tool like rbenv so your system will always use the version defined in that file. Once installed, simply run rbenv install in the repo to match the version.
  2. Return to the command line and run rake init:oss to configure your computer and WordPress app to be able to run and login to WordPress.com
  3. Once completed, run rake xcode to open the project in Xcode.

If all went well you can now compile to your iOS device or simulator, and log into the WordPress app.

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

Configuration Details

The steps above will help you configure the WordPress app to run and compile. But you may sometimes need to update or re-run specific parts of the initial setup (like updating the dependencies.) To see how to do that, please check out the steps below.

Third party tools

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

CocoaPods

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.

SwiftLint

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 WordPress.com with the app you need to create an account over at the WordPress.com Developer Portal.

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

When creating your application, you should select "Native client" for the application type. The "Website URL", "Redirect URLs", and "Javascript Origins" fields are required but not used for the mobile apps. Just use https://localhost.

Your new application will have an associated client ID and a client secret key. These are used to authenticate the API calls made by your application.

Next, run the command rake credentials:setup you will be prompted for your Client ID and your Client Secret. Once added you will be able to log into the WordPress app

Remember the only WordPress.com account you will be able to login in with is the one used to create your client ID and client secret.

Read more about OAuth2 and the WordPress.com REST endpoint.

Contributing

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

Security

If you happen to find a security vulnerability, we would appreciate you letting us know at https://hackerone.com/automattic 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.

Resources

License

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

More Repositories

1

WordPress-Android

WordPress for Android
Kotlin
2,971
star
2

WordPress-Editor-iOS

⛔️ [DEPRECATED] A reusable iOS rich text editor component.
JavaScript
1,061
star
3

AztecEditor-Android

A reusable native Android rich text editor component.
Kotlin
698
star
4

AztecEditor-iOS

A reusable native iOS visual HTML text editor component.
Swift
615
star
5

PasscodeLock-Android

Android Library that provides passcode lock to your app
Java
353
star
6

gutenberg-mobile

Mobile version of Gutenberg - native iOS and Android
JavaScript
254
star
7

WordPress-Editor-Android

⛔️ [DEPRECATED] A reusable Android rich text editor component.
Java
188
star
8

MediaPicker-iOS

WPMediaPicker is an iOS controller that allows capture and picking of media assets.
Objective-C
110
star
9

wpxmlrpc

A lightweight XML-RPC encoder/decoder for iOS, OS X, and tvOS
Objective-C
88
star
10

WordPress-API-iOS

A library to connect to WordPress sites using XML-RPC or the WordPress.com REST API
Objective-C
66
star
11

WordPress-FluxC-Android

WordPress Network and Persistence layer based on the Flux architecture
Kotlin
57
star
12

MediaEditor-iOS

Easy add image editing features to your iOS app! 🖼️
Swift
49
star
13

EmailChecker

Email checking library for Android and iOS
C++
46
star
14

WordPressKit-iOS

WordPressKit offers a clean and simple WordPress.com and WordPress.org network API.
Swift
42
star
15

swift-style-guide

Swift Style Guide
35
star
16

WordPress-Utils-Android

Common utilities used by WordPress-Android.
Java
33
star
17

release-toolkit

Shared tools used in release automation
Ruby
31
star
18

react-native-aztec

Wrapping Aztec Android and Aztec iOS in a React Native component
Java
29
star
19

cocoapods-repo-update

A CocoaPods plugin that updates your specs repos on pod install if needed.
Ruby
28
star
20

WordCamp-Android

WordCamp for Android
Java
24
star
21

WordPress-WindowsPhone

WordPress for WindowsPhone
C#
20
star
22

NSObject-SafeExpectations

No more crashes getting unexpected values from a NSDictionary
Objective-C
19
star
23

MediaPicker-Android

MediaPicker is an Android Fragment that allows capture and selection of media assets from a variety of sources.
Java
19
star
24

WordPress-iOS-Shared

Shared components used in building the WordPress iOS apps and other library components
Objective-C
18
star
25

WordPressAuthenticator-iOS

Swift
17
star
26

NSURL-IDN

Support for IDN (punycode) in NSURL
Objective-C
14
star
27

WordPress-Login-Flow-Android

Pluggable WordPress login flow for Android
Java
14
star
28

objective-c-style-guide

Objective-C Style Guide
12
star
29

test-cases

Test case repository for Gutenberg editor used in the WordPress mobile app
11
star
30

WordPressCom-Stats-iOS

⛔️ [DEPRECATED] Reusable component for displaying WordPress.com site stats in an iOS application
Objective-C
10
star
31

WordPressFlux-iOS

WordPressFlux
Swift
8
star
32

WordPressCom-Analytics-iOS

⛔️ [DEPRECATED] Library for handling Analytics tracking in WPiOS
Objective-C
8
star
33

WordPress-Networking-Android

Networking library used by WordPress-Android and other WordPress-*-Android components
Java
7
star
34

PersistentEditText-Android

Android EditText subclass with persistence
Java
7
star
35

WordPressUI-iOS

Swift
7
star
36

WordPress-BlackBerry-Legacy

WordPress for BlackBerry OS 7.1 and earlier.
Java
5
star
37

release-toolkit-gutenberg-mobile

Automation Scripts for Releasing Gutenberg-Mobile Updates to the WordPress Mobile Apps.
Go
5
star
38

circleci-orbs

The source code for some CircleCI orbs published by wordpress-mobile
Shell
5
star
39

GutenbergKit

Swift
5
star
40

WordPress-Analytics-Android

⛔️ [DEPRECATED] Library for handling Analytics tracking in WordPress Android.
Java
4
star
41

cocoapods-specs

Our internal CocoaPods spec repository for Automattic's internal pods
Ruby
4
star
42

WordPress-BlackBerry

WordPress for BlackBerry 10
C++
4
star
43

EmailChecker-Android

Email checking library for Android
Kotlin
3
star
44

WordCamp-iOS

WordCamp for iOS
3
star
45

WordPress-Editor-Common

Common code of Android and iOS rich text editor component.
JavaScript
3
star
46

WordPress-Android-Libraries-Gradle-Plugin

Gradle Plugin for WordPress Android library development setup
Groovy
3
star
47

test-case-reminder-bot

GitHub bot that drops a comment to the PR about what to test when a specific file changes in gutenberg repo. Test cases and configurations live in gutenberg-tests repo.
Ruby
3
star
48

WordPress-MediaPicker-Android

Kotlin
2
star
49

editor-test-ios

Objective-C
2
star
50

docker-glotpress-linter

A docker image that lints files before they're uploaded to GlotPress
PHP
2
star
51

WordPress-Ratings-iOS

Library for handling App Ratings Logic
Objective-C
2
star
52

WordPressMocks

Network mocking for testing the WordPress mobile apps
Java
2
star
53

app-secrets-management-ios

Files related to iOS application secrets management.
Shell
2
star
54

react-native-libraries-publisher

Shell
1
star
55

WordPress-Lint-Android

Pluggable lint module for WordPress-Android
Kotlin
1
star
56

automatization-scripts

Shell
1
star
57

docker-gb-mobile-image

Dockerfile
1
star
58

gutenberg-plugin-hello-world

JavaScript
1
star
59

WordPress-HealthCheck-iOS

Health check for common iOS problems
Shell
1
star
60

app-blocking-plugins

This repository contains a list of plugins that cause problems with WordPress Apps connecting correctly.
1
star
61

Pioupiou

Micro blogging app using your WordPress site as backend.
Java
1
star
62

WordPress-HealthCheck-Common

Health-Check cross-platform test cases
HTML
1
star