qwiqq app
Clone or download

README.textile

Qwiqq Web

  • web app
  • json API
  • admin

Dev Environment

  • ruby = 1.9.2 mri
  • gemset = qwiqq
  • db = postgreSQL
  • hosting (staging/production) = HEROKU

API notes

  • return all ids as string using .try(:to_s)
  • prefix id with model, eg user_id
  • current user is a valid option for user_id or id for users collection

Deploy Setup (will add multi env later)

  • git push heroku master

Push Notifications setup

  • install and config gem: https://github.com/natescherer/apn_on_rails
  • download apn cert from developer.apple.com
  • add to keychain by 2x click on downloaded cert
  • right click on new apn cert in keychain and export as .p12
  • convert to .pem with “openssl pkcs12 -in QwiqqPushCertificates.p12 -out apple_push_notification_development.pem -nodes -clcerts”
  • copy new .pem file to config/ “cp apple_push_notification_development.pem ~/Code/gastownlabs/qwiqq-web/config/”

Push Notification schedule

Push Notification Dev testing

  • obtain the push notification token from xcode, run on device and watch log for “Registered for push notifications with token <…..”
  • alternately get token from production app: “APN::Device.where(:user_id => 12).first.token”
  • run the following on your local rails console to create the objects
  • then deliver with “bundle exec rake apn:notifications:deliver”
  • possibly collect feedback from apn server by running “bundle exec rake apn:feedback:process”

d = APN::Device.where(:token => "b0a91911 db6fad5f 4e924598 74107351 6f0c032f 3c017918 1c9cd79e a2ec144c").first
n = APN::Notification.create!(:device => d, :badge => 3, :sound => true, :alert => "yoodle!")

Services

Airbrake (errors)

  • on heroku