A Jetpack-powered companion app for WooCommerce.
- Download Xcode
- At the moment WooCommerce for iOS uses Swift 5 and requires Xcode 10.2 or newer. Previous versions of Xcode can be downloaded from Apple
- Clone project by
git clone https://github.com/woocommerce/woocommerce-ios.git
in the folder of your preference - Enter the project directory by
cd woocommerce-ios
- Install the third party dependencies and tools required to run the project
- We use a few tools to help with development. To install or update the required dependencies, run the follow command on the command line:
bundle exec pod install
- In some cases, you may also have to:
bundle install
- We use a few tools to help with development. To install or update the required dependencies, run the follow command on the command line:
- Open the project by double clicking on
WooCommerce.xcworkspace
file, or launching Xcode and choose File > Open and browse toWooCommerce.xcworkspace
In order to login to WordPress.com using the app:
- Create a WordPress.com account (if you don't already have one).
- Create a new developer application here.
- Set "Redirect URLs" =
https://localhost
and "Type" =Native
and click Create then Update. - Copy the Client ID and Client Secret from the OAuth Information. Build the app.
- Navigate to WooCommerce/DerivedSources/ApiCredentials.swift
- Fill in the dotcomAppId with the Client ID
- Fill in the dotcomSecret with the Client Secret
- Recompile and run the app on a device or inside simulator.
Please, remember to not add this information on your commits and PRs.
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 run it locally by rake lint
(first run will install SwiftLint if you don't have it). No pull requests should have lint warnings or errors before merging, and we also have Hound
(mentioned below) to help us in pull requests on GitHub.
If your code has any style violations, you can try to automatically correct them by running:
rake lint:autocorrect
Otherwise, you can also fix them manually.
The woocommerce-ios project uses CocoaPods to manage third party libraries.
Third party libraries and resources managed by CocoaPods will be installed by the bundle exec pod install
command above.
The woocommerce-ios project uses Peril to enforce Pull Request guidelines.
The woocommerce-ios project uses Circle CI for continuous integration.
The woocommerce-ios project uses Hound to enforce basic Swift styles. (Not all Woo styles are defined in Hound.)
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.
You can find the WooCommerce usage docs here: docs.woocommerce.com
General usage and development questions:
- WooCommerce Slack Community
- WordPress.org Forums
- The WooCommerce Help and Share Facebook group
- Documentation on our architecture and frameworks
- Mobile blog
- WooCommerce API Documentation (currently v3)
WooCommerce for iOS is an Open Source project covered by the GNU General Public License version 2.