Categories
Mobile XPages

Turn off Phone number Detection in iOS

Today I had a problem where iOS on an iPad was thinking some numbers where phone numbers when they really weren’t.  Normally that’s not the end of the world but in this case it converted the number to a blue link, and I was expecting it to be white on a dark background.  The blue made it difficult to read.

I quickly found these 2 links :

https://developer.apple.com/library/safari/featuredarticles/iPhoneURLScheme_Reference/PhoneLinks/PhoneLinks.html#//apple_ref/doc/uid/TP40007899-CH6-SW1

https://developer.apple.com/library/safari/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html#//apple_ref/doc/uid/TP40008193-SW5

Which detail the solution of adding a meta tag to the XPage.  But where do you add the meta tag in XPages?

There’s a couple ways to do it I think.  I don’t really do much with themes but I chose to go that route so it’s once and done for the application.  I found this blog post :

XPages – Theme – Add Meta Tag

which gave me all the information I needed to do this :

 

<resources>
 <metaData>
 <name>format-detection</name>
 <content>telephone=no</content>
 </metaData>
</resources>

Problem solved!  Thanks Ferhat for the blog post.  I tried to leave a comment while signed in as twitter and it didn’t work, so I figured I’d thank him here.

 

Categories
Day Job XPages

Apple’s iOS8 Breaks uploading Photos

In the day job I have users that use an iPad to upload photos to an XPages application.

I just learned today that this breaks with iOS8.  More information can be found here:

http://www.mobilexweb.com/blog/safari-ios8-iphone6-web-developers-designers

http://stackoverflow.com/questions/25790873/uploading-files-over-http-fails-on-ios-8-gm-safari

http://blog.uploadcare.com/post/97884147203/you-cannot-upload-files-to-a-server-using-mobile-safari

 

I’m hopeful this is a BUG that will be fix and not something Apple has intentionally done.

For now the plan is to just hide the upload button if you’re running iOS 8.  Note we use my fileVault thing which will likely be my next blog post and not the file upload control that comes with XPages.

 

Below is the quick and dirty code I’m going to try and use to hide the button to iOS 8 users.  This will not work most likely for iOS 8.0.1.  Since we don”t know if it’ll be fixed then we’ll simply cross that bridge when we come to it.

Note: This code is intended to run on Domino 9.0.1 so I make use of the deviceBean that’s built in.

UPDATE: Made some updates to the code

function isApple8() {

var uAgent = context.getUserAgent().getUserAgent();

if ((deviceBean.isIpad()) || (deviceBean.isIphone())) {

// Note the space after the 8

if (uAgent.indexOf(“8.0 “) > 0) {

// This is iOS 8

return true;

} else {

// This is iOS but NOT version 8

return false;

}

} else {

// this is NOT iOS

return false;

}

}

 

Categories
Notes In 9 Podcast XPages

NotesIn9 038: XPages and iOS Trick

In this show I take a look at using XPages with iOS browsers. Specifically we’ll be looking at how to turn off AutoCorrect.