Skip to content

Development Guide

Brad Smith edited this page Oct 24, 2016 · 3 revisions

Testing

Known issues to check for

  • Failed to load resources file... cordova_plugins.js or cordova window.requestFileSystem is not a function This means something has happened to corrupt the cordova environment. The quickest fix is to add and remove the OS-specific platform files by running the following (substitute $PLATFORM for "ios" or "android"):
cordova platform remove $PLATFORM
cordova platform add $PLATFORM

Testing under emulation

Tip: It is generally easier and faster to debug problems using an ember development server (ember serve...) than in an emulator or on a device. If you can reproduce your problem there, try to debug it there. However, some problems only show up on a mobile device (or emulator).

iOS

After following the instructions to perform an iOS build:

cd cordova/
cordova emulate ios --environment=development

This should cause the iOS simulator (bundled with Xcode) to start. Once it finishes booting, the app should automatically open.

Once the app is opened, you can view console output, debug, etc, by opening Safari and...

  1. Go the the Develop menu. If you don't see this menu, do the following:
  2. Go to Safari->Preferences
  3. In the Advanced tab, check Show Develop menu in menu bar
  4. Select Develop->Simulator-> FunzoApp You should now have a web console you can use to help identify problems.

Testing on a device

iOS

Using Test Flight

Note: Test Flight lets you send test builds to any number of people, which is great, but you must increment the version number of your app every time, so only do this as a final proving step before release.

  1. in config/local.js, increase the version value
  2. cordova build ios --environment=development
  3. Open cordova/platforms/build/ios/YOUR_APP_NAME.app in Xcode
  4. Check the version number (you may need to increment it manually)
  5. Set the device (to the right of the Play/Stop buttons) to Generic iOS Device
  6. Select Product->Archive
  7. If an error comes up about signing the code, make sure that...
  8. You have a valid developer profile loaded into Xcode (see the Apple docs for this)
  9. Automatically manage signing is off
  10. Signing (debug) and Signing (release) are both set to the same profile
  11. After a successful build, you should get an option to upload the app. Do that.
  12. Log into iTunes Connect
  13. Select My Apps, then your app.
  14. Click Test Flight in the top menu bar
  15. Click Internal Testing in the sidebar
  16. Click Select a Version to Test and enable the version you just uploaded.
  • If you don't see it in the list, wait a while and try again; it can take up to an hour for a newly uploaded version to become available.

Now anyone you add to the Internal Testers list at the bottom of the page can install the Test Flight app and use it to deploy the selected build.