Software Archive
Read-only legacy content
17061 Discussions

don't run with IOS

Detlef_F_
Beginner
927 Views

Hi ,

the below script run with IOS. Only with Android. Also the Emulate have no problems.

/*jslint browser:true, devel:true, white:true, vars:true */
/*global $:false, intel:false */

(function () {
    "use strict";
    /*
      hook up event handlers
    */
    function register_event_handlers() {

        intel.xdk.notification.alert(intel.xdk.device.platform, "Platform", "Ok","close me");
        
        /* button  #btVibrieren */
        $(document).on("click", "#btVibrieren", function (evt) {
            intel.xdk.notification.vibrate();
        });

        /* button  #btBeep */
        $(document).on("click", "#btBeep", function (evt) {
            intel.xdk.notification.beep(1);
        });

        /* button  #btPlaySound */
        $(document).on("click", "#btPlaySound", function (evt) {
            intel.xdk.player.playSound("www/sounds/tiere2.wav");
        });

        /* button  #btSendSMS */
        $(document).on("click", "#btSendSMS", function (evt) {
            intel.xdk.device.sendSMS("Hallo Löwin", "017632897038");
        });

        /* button  #btSendEmail */
        $(document).on("click", "#btSendEmail", function (evt) {
            intel.xdk.device.sendEmail("An Folke", "detlef.folke@gmail.com", "wow it's a subject", true, "", "");
        });

        /* button  #btBarcodeScannen */
    $(document).on("click", "#btBarcodeScannen", function(evt)
    {
        intel.xdk.device.scanBarcode();
    });
    
    }
    document.addEventListener("app.Ready", register_event_handlers, false);
})();

Thanks for support

Detlef

 

 

0 Kudos
7 Replies
Swati_S_Intel1
Employee
927 Views

Are you trying on device with App Preview or trying a built app?

Please send your complete project.

Swati

0 Kudos
Detlef_F_
Beginner
927 Views

Hi Swati,

attached you will find the compled project.

Thanks for your support

Detlef

0 Kudos
Detlef_F_
Beginner
927 Views

Hi Swati,

do you have review my project? What is wrong?

Best regards

Detlef

0 Kudos
Swati_S_Intel1
Employee
927 Views

Hello Detlef,

I tried your app on iOS 8.1 with App Preview 2.3 and it works. What part of the app did not work? Did you build .ipa and is that not working? I haven't tried building .ipa but with App Preview it worked fine.

Swati.

0 Kudos
Detlef_F_
Beginner
927 Views

Hi Swati,

thank you for the answer. I try it an IOS 7.1.2 with IPHONE 4 and all part are not work.
I try it, only with the App Preview.

Greetings
Detlef

0 Kudos
Swati_S_Intel1
Employee
927 Views

Hello Detlef,

I looked at your app, it is started as a webapp (i.e. Standard HTML5 app) and you are trying to use the intel.xdk plugins, they work in emulator and AP, but will not work in built app. All intel.xdk APIs are treated as plugins for Cordova container. So, if you want to use them you have two options.

1) Start your app with HTML5+Cordova template and transfer your code in the new app

or

2) Upgrade your app to Cordova app - on the Projects tab, under Project info there is Upgrade Project option. Click on the Cordova icon and you will be able to convert it into Cordova+HTML5 app

In both the cases make sure you check the Intel XDK device plugin, notification plugin and player plugin (on the right side) under Plugins section on the Projects page. Also, note that notification plugin is deprecated, you are encouraged to use Cordova notification plugin (on the left side of plugin section).

Swati

 

0 Kudos
Detlef_F_
Beginner
927 Views

Hi Swati,

I have built a new app, according to your instructions. And all run perfectly.
Many thanks for your support
.

Detlef

 

0 Kudos
Reply