Skip to content

charliescheer/woocommerce-ios

 
 

Repository files navigation

CircleCI Reviewed by Hound

woocommerce-ios

A Jetpack-powered companion app for WooCommerce.

Build Instructions

  • 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
  • Open the project by double clicking on WooCommerce.xcworkspace file, or launching Xcode and choose File > Open and browse to WooCommerce.xcworkspace

Credentials for external contributors

In order to login to WordPress.com using the app:

  1. Create a WordPress.com account (if you don't already have one).
  2. Create a new developer application here.
  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. Build the app.
  5. Navigate to WooCommerce/DerivedSources/ApiCredentials.swift
  6. Fill in the dotcomAppId with the Client ID
  7. Fill in the dotcomSecret with the Client Secret
  8. Recompile and run the app on a device or inside simulator.

Please, remember to not add this information on your commits and PRs.

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 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.

CocoaPods

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.

Peril

The woocommerce-ios project uses Peril to enforce Pull Request guidelines.

Circle CI

The woocommerce-ios project uses Circle CI for continuous integration.

Hound

The woocommerce-ios project uses Hound to enforce basic Swift styles. (Not all Woo styles are defined in Hound.)

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.

Need help?

You can find the WooCommerce usage docs here: docs.woocommerce.com

General usage and development questions:

Resources

License

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

Packages

No packages published

Languages

  • Swift 98.3%
  • Ruby 1.3%
  • Python 0.2%
  • HTML 0.1%
  • Shell 0.1%
  • Smarty 0.0%