pmusaraj / discourse-mobile-single-site-app

Single-site app wrapper for a Discourse site. Supports Push Notifications via OneSignal.
MIT License
81 stars 24 forks source link

Discourse Mobile App for a Single Site (with support for Push Notifications)

Whitelisted iOS/Android app for a single Discourse site that supports push notifications via OneSignal.

For a demonstration check out SWAPD or TekInvestor on the App Store or Google Play.

Getting Started

  1. Install your packages:
yarn install
  1. Link the iOS libraries via
cd ios && pod install
  1. And run the app in the simulator using:
react-native run-ios
# or
react-native run-android

See the React Native docs for more details.

OneSignal setup

You need to open an account at OneSignal to be able to send Push Notifications (PNs) from your Discourse site, and receive them in the app. Steps:

Build and release using Fastlane

To simplify managing your app and keeping up with changes in the repo, you can use the included Fastlane scripts.

Initial setup

You should now be ready to run Fastlane scripts for your app's environment. by appending --env yourapp to any Fastlane commands.

To update the app name and assets, run:

cd fastlane
fastlane switch --env yourapp

To generate (or update) iOS certificates, run:

cd fastlane
fastlane ios certificates --env yourapp

To build your app for iOS, run:

cd fastlane
fastlane ios install --env yourapp
# will install the app on a connected device or simulator

fastlane ios release --env yourapp
# will build and upload the app to TestFlight

To build your app for Android, run:

cd fastlane
fastlane android apk --env yourapp
# will build an apk in android/app/build/outputs/apk/

fastlane android release --env yourapp
# will create a bundle android/app/build/outputs/bundle/