3 Replies Latest reply on Jan 23, 2017 9:08 AM by kerrishotts

    phone dialer pop up does not work after updating to xcode 8

    SmitB

      I have a hybrid app built using phonegap. After updating to xcode 8

      the tele prompt to call the selected phone number stopped working. We no longer get the popup box to call  or cancel the selected phone number. This happens only for the app. We get the pop up when we select the phone number in the the browser.

        • 1. Re: phone dialer pop up does not work after updating to xcode 8
          kerrishotts Adobe Community Professional

          Please share your config.xml (minus secret/identifying information), and your Content Security Policy meta tag if you have one in your index.html file. Also share any code you're using to trigger the telephone # prompt.

          • 2. Re: phone dialer pop up does not work after updating to xcode 8
            SmitB Level 1

            Thanks for replying. 

            In our hybrid app, we are launching our website in the IFrame.

            Phone no is listed in the xml file as

            <PhoneNumbers><PhoneNumber><Rank>1</Rank><Country>Main</Country><Phone>+1 214 333 4000</Phone></PhoneNumber><PhoneNumbers>

            I tried removing  + and space from the phone number. This did not fix the issue.

             

            Our content security policy is as follows

             

            <meta http-equiv="Content-Security-Policy" content="default-src * gap://ready file:; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">

             

            Config.xml :

            <content src="index.html" />

                <gap:plugin name="cordova-plugin-whitelist" source="npm" />

                <gap:plugin name="cordova-plugin-inappbrowser" source="npm" />

                <gap:splash src="www/img/splash.png" />

                <gap:plugin name="org.apache.cordova.statusbar" version="0.1.4" />

                            <access origin="*" />

                            <allow-intent href="http://*/*" />

                <allow-intent href="https://*/*" />

                <allow-intent href="tel:*" />

                <allow-intent href="sms:*" />

                <allow-intent href="mailto:*" />

                <allow-intent href="geo:*" />

                            <allow-navigation href="*" />

                            <allow-intent href="*" />

                <allow-navigation href="tel:*" />

             

            Thanks

            • 3. Re: phone dialer pop up does not work after updating to xcode 8
              kerrishotts Adobe Community Professional

              You've not shared the code you use to trigger the prompt; I assume you're just using an anchor though? <a href="tel:..."/>

               

              Your comment that you're embedding your website in an iframe is concerning; you should strive to keep as much of your code local to the device for many reasons (security, user experience, and Apple will almost certainly reject this kind of app if you're targeting the app store).

               

              My suggestion: try using a "tel:" link outside of the iframe and see if that works.

               

              Also -- you're using "gap:" tags -- are you using PhoneGap Build rather than the PhoneGap/Cordova CLIs?  Either way, drop the "gap:" namespace and use the more modern syntax(If using PGB: Plugins | PhoneGap Docs ). Oh, and update that really old status bar plugin.