transistorsoft / cordova-background-geolocation-SampleApp

Cordova Background Geolocation Sample Application
https://www.transistorsoft.com/shop/products/cordova-background-geolocation
MIT License
122 stars 78 forks source link

Menu Does not work iOS #11

Closed Bwade closed 9 years ago

Bwade commented 9 years ago

When I go to fire up the app in the emulator or on an iOS device, I run into an issue when selecting "Settings". The settings menu does not open and while looking at the log I see that it gives the following error:

"Error: undefined is not an object (evaluating '$platform.toUpperCase')"

playSound: function(action) {
      if ($plugin) {
        var soundId = $SOUNDS[action + '_' + $platform.toUpperCase()]; //issue
        if (soundId) {
          $plugin.playSound(soundId);
        } else {
          console.warn('Failed to locate sound-id "' + action + '"');
        }
      }
    }
  };

While researching, it looks as if this is no longer supported since jQuery 1.9. Can you verify that you get the same response?

christocracy commented 9 years ago

This started happening with iOS 9. It must be that $platform is undefined.

It's as if this:

  $platform = null;
  alert($platform.toUpperCase();
christocracy commented 9 years ago

It must be an issue with Ionic & iOS 9. Something changed. I'll have a look at it tonight.

christocracy commented 9 years ago

Wait...did you complete Step 2?

$ cordova plugin add cordova-plugin-device cordova-plugin-console cordova-plugin-whitelist cordova-plugin-splashscreen com.ionic.keyboard

Show me the plugins you have installed.

$ cordova plugins
com.ionic.keyboard 1.0.4 "Keyboard"
com.transistorsoft.cordova.background-geolocation 0.6.0 "BackgroundGeolocation"
cordova-plugin-console 1.0.0 "Console"
cordova-plugin-device 1.0.0 "Device"
cordova-plugin-dialogs 1.1.1 "Notification"
cordova-plugin-splashscreen 2.0.0 "Splashscreen"
cordova-plugin-statusbar 1.0.0 "StatusBar"
cordova-plugin-vibration 1.1.0 "Vibration"
cordova-plugin-whitelist 1.0.0 "Whitelist"
Bwade commented 9 years ago

Wow! I totally skipped that step. Problem solved. Sorry to waste your time by not fully reading and following your steps. Thanks!