WordPress for iOS - Official repository
Switch branches/tags
9.6 app-center-build aztec/integrate-1.3 bump/wordpress-authenticator-to-1.1.6 circle-ci develop feature/add-credential-validation feature/at-analytics feature/coverage feature/custom-domains-cherry-picked feature/custom-domains feature/domain-redemption-credit feature/domains-feature-flag feature/extract-notifications-feature-branch feature/new-card-scaffolding feature/notifications-reader-link-navigation feature/6592-update-primary-url feature/9462-saveforlater-icon-discover feature/9697-rewind feature/10458-ui-finalising feature/10466-stats_card_views feature/10482-verticals feature/10485-hide-headers feature/10591-insights_posting_activity feature/10614-insights_posting_activity_details fix/app-banner-universal-links fix/gravatar-caching fix/launch-screen-image fix/metadata-warnings fix/reader-universal-links fix/screenshot-date-and-time fix/turn-off-quick-start fix/5684-default-menu-title fix/8552-error-usernameonly fix/8757-share-notes-blockquote fix/10032-dismissing-editor-r10.8 fix/10032-dismissing-editor gb-demo-1811 issue/al-crash-on-open issue/al-crash issue/gutenberg-history issue/6115-post-post issue/8825-crash-in-stats-service issue/8995-crash-when-dismissing-action-sheet issue/9447-analytics issue/9447-completion-award issue/10301-fix-ipad-crash-when-deleting-site issue/10407-remove_location_add_explanation issue/10462a-wizard-completion issues/update-plans issues/9447-alert-style issues/10304-html-render issues/10304-initial-revision-view master rake_dependencies release/develop-for-testing release/11.3 release/11.3.1 release/11.4 travis-ci try/ahoi try/bb-build-diagnostics try/danger-swiftlint try/fix-aztec-data-loss-with-gutenberg-posts try/fix-issue-with-disappearing-toolbar try/fix-unit-tests-removing-default-account-uuid try/gather-coverage-all-targets try/login-email-button-as-subclass try/move-stat-event-tracking try/notice-presenter-window try/preferredMaxLayoutWidth try/wordpress-auth-update
Nothing to show
Clone or download
elibud Merge pull request #10626 from wordpress-mobile/issue/10301-fix-ipad-…
…crash-when-deleting-site

Check if the indexPath is valid before selecting it
Latest commit 7d120dc Dec 9, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Add CircleCI config Dec 6, 2018
.github Add RELEASE-NOTES.txt file to encourage adding release notes iteratively Dec 4, 2018
Scripts Add RELEASE-NOTES.txt file to encourage adding release notes iteratively Dec 4, 2018
WordPress.xcworkspace Re-add missing files Oct 29, 2018
WordPress Check if the indexPath is valid before selecting it Dec 9, 2018
WordPressComStatsiOS Removed superfluous calls to removeObserveer via NotificationCenter Nov 6, 2018
WordPressFlux Update the migration warning Sep 18, 2018
WordPressShared/WordPressShared/Core Merge branch 'develop' into feature/8954-stock-photos-update-mark-II Apr 20, 2018
config Bump version number Dec 4, 2018
.clang-format Add clang format file. Mar 18, 2015
.configure Update the release configuration file Dec 4, 2018
.gitignore Use new Xcode build system Oct 10, 2018
.hound.yml Corrected ruby key as well Sep 27, 2018
.ruby-version Adding a .ruby-version for rbenv users May 23, 2016
.swiftlint.yml Catch interpolation at the start of the string Nov 26, 2018
.xctool-args Fixed deployment target and xctool builds Nov 20, 2013
CODE-OF-CONDUCT.md Updated Code of Conduct with contact information Feb 10, 2017
CODESTYLE.md Create CODESTYLE.md Nov 30, 2015
CONTRIBUTING.md Removed PRs for features/added note about Slack Feb 2, 2017
Dangerfile Relax pod reference rule in Danger Oct 12, 2018
Gemfile Merge branch 'develop' into rake-dependencies Nov 19, 2018
Gemfile.lock Update the WP Mobile Release Toolkit to 0.1.2 Nov 23, 2018
LICENSE Project file cleanup Mar 27, 2014
MIGRATIONS.md Merge branch 'develop' into issues/10304-authors Nov 12, 2018
Podfile Add History option for Gutenberg editor (#10593) Dec 5, 2018
Podfile.lock Add History option for Gutenberg editor (#10593) Dec 5, 2018
README.md Update the README with correct credential filename Dec 9, 2018
RELEASE-CYCLE.md Updated hot fix branch version to 9.1 Dec 22, 2017
RELEASE-NOTES.txt Add RELEASE-NOTES.txt file to encourage adding release notes iteratively Dec 4, 2018
Rakefile rake dependencies: Use 'bundle check' and 'pod check' to check if dep… Nov 14, 2018
buddybuild_postbuild.sh Revert "Don't fail the build if Danger detects issues." Jul 26, 2018
buddybuild_prebuild.sh Correct path on Buddy Build prebuild script. Sep 7, 2018

README.md

WordPress for iOS

BuddyBuild Reviewed by Hound

Build Instructions

Download Xcode

At the moment WordPress for iOS uses Swift 4.2 and requires Xcode 10 or newer. Previous versions of Xcode can be downloaded from Apple.*

Third party tools

We use a few tools to help with development. To install or update the required dependencies, run the follow command on the command line:

rake dependencies

CocoaPods

WordPress for iOS uses CocoaPods to manage third party libraries.
Trying to build the project by itself (WordPress.xcproj) after launching will result in an error, as the resources managed by CocoaPods are not included. To install and configure the third party libraries just run the following in the command line:

pod install

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

After you created 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 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 device or an emulator and log in with a WordPress.com account. Note that authenticating to WordPress.com 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 WordPress.com REST endpoint.

How we work

You can read more about Code Style Guidelines we adopted, and how we're organizing branches in our repository in the Contribution Guide.

Need help to build or hack?

Say hello on our Slack channel: #mobile.

License

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

Resources

Developer blog & Handbook

Blog: http://make.wordpress.org/mobile

Handbook: http://make.wordpress.org/mobile/handbook/

To report an issue

https://github.com/wordpress-mobile/WordPress-iOS/issues

Source Code

GitHub: https://github.com/wordpress-mobile/WordPress-iOS/

How to Contribute

http://make.wordpress.org/mobile/handbook/pathways/ios/how-to-contribute/

How to help with translations

https://translate.wordpress.org/projects/apps/ios