Sunday, 9 December 2012

[NSCoderNightDC] Reliably detect iphone-only versus universal build

Is there a way to reliably detect whether an app has been built as iPhone-only versus universal?  My first thought was that you could check the keys in the dictionary returned by [[NSBundle mainBundle] infoDictionary] and look for keys like UIMainStoryboardFile~ipad.  But that is nowhere near being fool-proof.  In fact, the first project of mine I looked at had no keys/values in Info.plist that give an indication one way or the other.

The reason I ask is because I am running into a problem with SKStoreProductViewController.  If you are using this class in an iPhone-only app and run it on an iPad in compatibility mode, then the store view returned is sized incorrectly and is pretty much unusable because you can't scroll the view sufficiently.  

You can see an illustration of the problem at http://bluedino.net/downloads/SKStoreProductViewControllerBug.png.  Note in particular you cannot view the sections "Developer Info", "Version History", "Privacy Policy" because you can't scroll down sufficiently, you cannot see the "Related" panel because you cannot scroll horizontally, and you cannot see all of "Ratings and Reviews", again because of scrolling.

I'm currently working on iOS 6.0.  As soon as I download the latest 6.1 beta, I'll submit a radar and an openradar (assuming it's not fixed).

Thanks,

Matt

--
You received this message because you are subscribed to the Google Groups "NSCoderNightDC" group.
To view this discussion on the web visit https://groups.google.com/d/msg/nscodernightdc/-/3_xK5FQtTecJ.
To post to this group, send email to nscodernightdc@googlegroups.com.
To unsubscribe from this group, send email to nscodernightdc+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nscodernightdc?hl=en.

0 comments:

Post a Comment