Does iui.js Conflict with Xcode/Phonegap and iOS 5.x?

210 views
Skip to first unread message

Arthur

unread,
Apr 14, 2012, 12:01:43 PM4/14/12
to iPhoneWebDev
In an attempt to move to the "next level" I took a simple app (a fixed
directory of service numbers for our apartment building) and
"compiled" it with Xcode 4.3.2 + Phonegap (Cordova) 1.5

The resulting app work perfectly on ad hoc provisioned devices (iPhone
4s, iOS 5.1); upon submission, however, it was rejected because the
user interface buttons for dialing the individual numbers did not
function at all. The indicated test bed was iphone 4 running 5.1

I am completely new at this, and although I unable write js at this
time, I looked though the iui.js file and it raised a question.

Here is what I think, and perhaps someone can help? (I have searched
hi and lo for a solution, but I am not confident with my search
because of the search words might be imprecise).

(1) The index.html file invokes the telephone dialer with the
following code:

'<a type="iphone" href="tel:305-932-0818"><img src="img/
app_button_office.png"></a>'

(2) The iui.js intercepts native calls to "tel:' href's if I am
reading the comments correctly; so my suspicionis that the js ic
cancelling ut the native behavior and the phonegapr/Cordova is perhaps
cancelling out the "mobile web" based behavior?

How far off base am i?

Sean Gilligan

unread,
Apr 15, 2012, 4:55:34 AM4/15/12
to iphone...@googlegroups.com
Can you forward the rejection notice? (Are you allowed to do that?) It doesn't make sense to me that a problem like that won't show up in AdHoc or even in the simulator.

I have used iUI in PhoneGap without such problems. I'd love to understand the details...

-- Sean

> --
> You received this message because you are subscribed to the Google Groups "iPhoneWebDev" group.
> To post to this group, send email to iphone...@googlegroups.com.
> To unsubscribe from this group, send email to iphonewebdev...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/iphonewebdev?hl=en.
>

Arthur

unread,
Apr 15, 2012, 5:24:48 AM4/15/12
to iphone...@googlegroups.com


Thank you for your interest!
Attached is the rejection notice.
If you would any of the code, let me know. I did not change any of the iui.js
However, I did change some of the CSS to relocate the back button slightly.





On Sunday, April 15, 2012 4:55:34 AM UTC-4, Sean Gilligan wrote:

Can you forward the rejection notice?  (Are you allowed to do that?)  It doesn't make sense to me that a problem like that won't show up in AdHoc or even in the simulator.

I have used iUI in PhoneGap without such problems.  I'd love to understand the details...

-- Sean

> To unsubscribe from this group, send email to iphonewebdev+unsubscribe@googlegroups.com.

Rejection Notice 2012-04-11 12-24pm.pdf

Arthur

unread,
Apr 15, 2012, 6:12:36 AM4/15/12
to iphone...@googlegroups.com
Sean -

Attached is the rejection notice.

Also, I just came across an article which, I think, recognizes the "problem" but I am unclear how to try it.

Working Around IUI Click Interception to Allow for Native iPhone Functionality » Borloz.com
http://borloz.com/working-around-iui-click-interception-to-allow-for-native-iphone-functionality/





On Sunday, April 15, 2012 4:55:34 AM UTC-4, Sean Gilligan wrote:
Can you forward the rejection notice?  (Are you allowed to do that?)  It doesn't make sense to me that a problem like that won't show up in AdHoc or even in the simulator.

I have used iUI in PhoneGap without such problems.  I'd love to understand the details...

-- Sean

> To unsubscribe from this group, send email to iphonewebdev+unsubscribe@googlegroups.com.

Rejection Notice 2012-04-11 12-24pm.pdf

Sean Gilligan

unread,
Apr 15, 2012, 7:05:18 PM4/15/12
to iphone...@googlegroups.com
On 4/15/12 3:12 AM, Arthur wrote:
> Also, I just came across an article which, I think, recognizes the
> "problem" but I am unclear how to try it.
>
> Working Around IUI Click Interception to Allow for Native iPhone
> Functionality � Borloz.com
> <http://borloz.com/working-around-iui-click-interception-to-allow-for-native-iphone-functionality/>
> http://borloz.com/working-around-iui-click-interception-to-allow-for-native-iphone-functionality/

This problem was fixed in version 0.20.

iUI specifically ignores tel: links (and a handful of others). You can
see this by looking at line 595 of iui.js in the beta release:
http://code.google.com/p/iui/source/browse/web-app/iui/iui.js?name=REL-0.40-beta2#595

The isNativeURL function loops through a list of url patterns and if any
of them match, it will let the browser handle the link natively:
http://code.google.com/p/iui/source/browse/web-app/iui/iui.js?name=REL-0.40-beta2#448

My suggestion is try to figure out how to reproduce the problem on your
own hardware. Try the same iOS version that Apple reported, etc. Ask
them for more information if necessary. Once you have reproduced the
issue, try a simple .html file with a tel: link in that same
configuration and see what happens.

-- Sean

Arthur

unread,
Apr 16, 2012, 10:08:25 AM4/16/12
to iphone...@googlegroups.com
Thank you. I have requested the Apple review team's crash/log reports.

I have tested it on my wife's iPhone 4s/iOS 5.1 and a neighbor's iPhone3 with provisioning files (I registered both) and the app not only works on each of those phones, it does so very quickly (almost instantaneously).

I have gone over the code in my index.html file, and I am curious:

the link I use to dial - href="tel:305-937-2006" -- should that be href="tel://305-937-2006" and could that make a difference? I am just grasping at straws here. It may be a mistaken recollection on my part, but something in the back of my head says that the "//" differentiates the "tel:" from "sms:"

I hope I am not imposing; I really appreciate your time, effort and brain power.

--Arthur





On Sunday, April 15, 2012 7:05:18 PM UTC-4, Sean Gilligan wrote:
On 4/15/12 3:12 AM, Arthur wrote:
> Also, I just came across an article which, I think, recognizes the
> "problem" but I am unclear how to try it.
>
> Working Around IUI Click Interception to Allow for Native iPhone
> Functionality � Borloz.com

Sean Gilligan

unread,
Apr 16, 2012, 11:58:09 AM4/16/12
to iphone...@googlegroups.com
On 4/16/12 7:08 AM, Arthur wrote:
> Thank you. I have requested the Apple review team's crash/log reports.


I'm not sure if you're going to get anything from those. It sounds like
there was no crash, and I'm not sure if anything is being logged. The
most important thing is to duplicate their exact iOS and hardware
versions. If you can't find the exact configuration, you could do some
testing in the iOS simulator, but the simulator will likely give you an
error on the tel: URLs because there is no telephone support in the
simulator. However, you could test javascript and/or email URLs to make
sure they work correctly in PhoneGap. You should also Google and/or
check on the PhoneGap support list.

For quick testing of support for native URLs in iUI you can use this link:
http://demo.iui-js.org/test/link-types.html#_native

If you want to try the newly added sms: and callto: URL types, you can
use this one:
http://stage.iui-js.org/test/link-types.html#_native

('demo' corresponds to the latest stable release of iUI, 'stage' usually
has something newer)

> I have tested it on my wife's iPhone 4s/iOS 5.1 and a neighbor's
> iPhone3 with provisioning files (I registered both) and the app not
> only works on each of those phones, it does so very quickly (almost
> instantaneously).
>
> I have gone over the code in my index.html file, and I am curious:
>
> the link I use to dial - href="tel:305-937-2006" -- should that be

> href="tel:*//*305-937-2006" and could that make a difference?


I don't think so. I know that the '//' has not been necessary before.
But once you've figured out how to reproduce the problem it could be
worth a quick try...


> I am just grasping at straws here. It may be a mistaken recollection
> on my part, but something in the back of my head says that the "//"
> differentiates the "tel:" from "sms:"


The iUI source code that lists the Regular Expressions that are ignored
is here:
http://code.google.com/p/iui/source/browse/web-app/iui/iui.js?name=REL-0.40-beta2#456

Note that the next release of iUI will include "sms:" and "callto" in
the list:
http://code.google.com/p/iui/source/diff?spec=svnbf06120e601f97a56ef63114596dc307058c737f&r=bf06120e601f97a56ef63114596dc307058c737f&format=side&path=/web-app/iui/iui.js

> I hope I am not imposing; I really appreciate your time, effort and
> brain power.

I don't mind. I'm 99% sure, but I just want to be 100% sure that we
don't have an iUI issue here.

-- Sean

Arthur

unread,
Apr 20, 2012, 11:03:34 PM4/20/12
to iPhoneWebDev


On Apr 16, 11:58 am, Sean Gilligan <msgilli...@gmail.com> wrote:
>
> Note that the next release of iUI will include "sms:" and "callto" in
> the list:http://code.google.com/p/iui/source/diff?spec=svnbf06120e601f97a56ef6...
>
> -- Sean

A couple of things -

Apple DTS asked me to try to reproduce the results using an .ipa file.
Well, I did that and it worked perfectly, with no errors. Now they
have asked fro the archive I uploaded for approval.

On another note, I tried a Google search but no answer, so I will risk
embarrassment and ask: what is the difference between "tel:" and
"callto:"?

Also, I want to share a related but equally confusing turn of events:
I created the same app (different telephone numbers) for the building
next door. and applied the "Working Around IUI Click Interception to
Allow for Native iPhone Functionality Borloz.com we discussed
earlier. The app was rejected but the reason was NOT that the buttons
didn't work (the reason was that it wasn't novel or entertaining
enough under guideline 2.12). Now I wouldn't be surprised if they
never tested the buttons . . . but in the off chance they did and they
worked, I am wondering whether the conflict is with cordova-1.5.0.js
which is what I am using in Xcode to produce the distribution binary.

Sean Gilligan

unread,
Apr 23, 2012, 2:38:20 AM4/23/12
to iphone...@googlegroups.com
On 4/20/12 8:03 PM, Arthur wrote:
> On another note, I tried a Google search but no answer, so I will risk
> embarrassment and ask: what is the difference between "tel:" and
> "callto:"?


I think callto: is for (or used by) Skype. I'm pretty sure tel: is the
standard for regular phone calls.


> Also, I want to share a related but equally confusing turn of events:
> I created the same app (different telephone numbers) for the building
> next door. and applied the "Working Around IUI Click Interception to
> Allow for Native iPhone Functionality Borloz.com we discussed
> earlier. The app was rejected but the reason was NOT that the buttons
> didn't work (the reason was that it wasn't novel or entertaining
> enough under guideline 2.12). Now I wouldn't be surprised if they
> never tested the buttons . . . but in the off chance they did and they
> worked, I am wondering whether the conflict is with cordova-1.5.0.js
> which is what I am using in Xcode to produce the distribution binary.


You ad-hoc distribution and what you are releases to Apple should only
differ by how they are signed. Everything else should be the same.
That way you can test (almost) exactly what you ship to Apple. Test
cordova-1.5.0.js in AdHoc mode and find out if there is a conflict.

-- Sean


Remi Grumeau 

unread,
Apr 23, 2012, 3:09:18 AM4/23/12
to iphone...@googlegroups.com
On 23 avr. 2012, at 08:38 AM, Sean Gilligan <msgil...@gmail.com> wrote:

> On 4/20/12 8:03 PM, Arthur wrote:
>> On another note, I tried a Google search but no answer, so I will risk
>> embarrassment and ask: what is the difference between "tel:" and
>> "callto:"?
>
>
> I think callto: is for (or used by) Skype. I'm pretty sure tel: is the standard for regular phone calls.

Skype call link is
skype:username?call

have no idea what this callto: stands for...

>> Also, I want to share a related but equally confusing turn of events:
>> I created the same app (different telephone numbers) for the building
>> next door. and applied the "Working Around IUI Click Interception to
>> Allow for Native iPhone Functionality Borloz.com we discussed
>> earlier. The app was rejected but the reason was NOT that the buttons
>> didn't work (the reason was that it wasn't novel or entertaining
>> enough under guideline 2.12). Now I wouldn't be surprised if they
>> never tested the buttons . . . but in the off chance they did and they
>> worked, I am wondering whether the conflict is with cordova-1.5.0.js
>> which is what I am using in Xcode to produce the distribution binary.
>
>
> You ad-hoc distribution and what you are releases to Apple should only differ by how they are signed. Everything else should be the same. That way you can test (almost) exactly what you ship to Apple. Test cordova-1.5.0.js in AdHoc mode and find out if there is a conflict.
>
> -- Sean
>
>

> --
> You received this message because you are subscribed to the Google Groups "iPhoneWebDev" group.
> To post to this group, send email to iphone...@googlegroups.com.

> To unsubscribe from this group, send email to iphonewebdev...@googlegroups.com.

Sean Gilligan

unread,
Apr 23, 2012, 10:42:42 AM4/23/12
to iphone...@googlegroups.com

>
>> On 4/20/12 8:03 PM, Arthur wrote:
>>> On another note, I tried a Google search but no answer, so I will risk
>>> embarrassment and ask: what is the difference between "tel:" and
>>> "callto:"?
>>
>>
>> I think callto: is for (or used by) Skype. I'm pretty sure tel: is the standard for regular phone calls.
>
> Skype call link is
> skype:username?call
>
> have no idea what this callto: stands for...
>

https://support.skype.com/m/en-us/faq/FA99/What-are-Skype-buttons-and-callto-links-and-how-do-I-use-them


Mogens Beltoft

unread,
Apr 23, 2012, 10:47:22 AM4/23/12
to iphone...@googlegroups.com
According to Wikipedia the callto URI scheme does launch Skype:
http://en.wikipedia.org/wiki/URI_scheme

/Mogens

Reply all
Reply to author
Forward
0 new messages