Invisible Rectangles on iPad Air only?

I have an app up live on the app store & google play and just got some strange feedback from a customer,

There is a screen where rectangles based on data coming down from our backend are procedurally generated & for some odd reason they do not appear visible on ONLY iPad Air devices. The strange part is that they can still be tapped and work normally but are just not visible.

Like I said, it works fine on every other device / simulator / android / IOS except for on our and our customer’s iPad airs. Just wondering if anyone has any idea what this could be or has any experience with a strange issue like this. Thanks!

What are the rectangles supposed to be?

Rob

The rectangles are just squares that represent pre-configured puzzles from our backend. Basically all they are meant to do is select which puzzle and then show the next scene. Again, they work fine on every other device besides iPad Air that I’ve seen so far.

Have you tried to examine the device’s console log to see if there are errors?

Of the bat, I start thinking it’s an ATS (Application Transport Security) issue. Apple blocks access to http: unless you specifically allow it in build.settings. URL’s fed to things like network.request(), network.download() etc. have to be https: unless you’ve applied this override. Apple was supposed to stop allowing the override on Jan 1, but they’ve put that off for now, but at some point you will need to use https:

If this is the issue you certainly will have errors in the console log reporting that.

See:
 

https://docs.coronalabs.com/guide/hardware/appleATS/index.html

Rob

The app works perfectly on other Apple devices though (iPad 2, iPhones, etc.) I will get my hands on another iPad Air to examine the console log though.

What is weird to me is that it still receives the Json perfectly from the server and when you tap where the rectangle should be the app continues and works as expected. This leads me to believe ATS is not the issue but will look into it.

Also if this was the issue I don’t believe apple would have allowed it through to the App Store.

Cole 

bump

Did you ever get a console log to look at?

There’s no errors in the logs. The only difference between the iPad air and any other device that I have been able to find is that the screen res is 4x which leads me to believe that this is where the issue may be. 

That’s not much for us to go on. Can you reduce your code to a small test case that demonstrates the problem?

Rob

Just sent you an email with a extremely stripped down project that displays the issue.

Let me have you file a bug report. You may want to rename the .zip file you sent me first to something a bit more descriptive.  Anyway, email support@coronalabs.com and attach your zip file to the email and write a really good description of the problem and what you expect the results to be.

Thanks

Rob

Interesting new findings. If we take “portrait” out of build.settings it works fine. With “portrait” in there, it black screens on my iPhone 6 and an engineer’s iPhone 7plus. The fix didn’t make it work on an iPad 2.

I’m going to look at the code that generates the blocks a little further. You also never seem to put the scene’s view group, but you’re not really using composer at that point, so for this demo it’s a moot point.  

Rob

Just sent that email to support, describing the issue and including links to things related to this issue.

Strange so the issue occurs on iPhone 6 & iPhone 7+ as well as the iPad Airs?, and yeah I did not use Composer really I could have just thrown it in a blank project I suppose but I figure the way I did it would be the closest to the actual app having the issue. 

Any update on this issue?

I think I found the issue:

 scrollView = widget.newScrollView( { top = screenH \* .05, left = 0, width = screenW, height = screenH, --\<----- you had screenH \* 10 scrollWidth = screenW, scrollHeight = screenH \* 10, listener = scrollListener, hideBackground = false, backgroundColor = {0,0,0}, bottomPadding = 200, horizontalScrollDisabled = true } )

You’re making the scrollView 10X the screen size. Which means 90% of it’s off screen.  The width and height are the size visible scroll area on screen. It doesn’t make sense to have the visible area of the scrollView bigger than/or off screen. The scrollWidth and scrollHeight can be bigger than the screen to hold your content that will scroll.

ScrollViews and tableViews have an automatic mask created to hide the content in the scrollView outside the visible viewport. When the mask is the same size as an iPhone 6 screen using your config.lua, it’s going to be 1024x2048 (Power of two rule) or 2 megabytes which is right at the texture limit size for Android. However when you make that mask 10X the size you end up with closer to a 20mb texture file which is probably okay on Desktop/Laptop computers since they have a ton of video card memory. Devices don’t have any where that amount of memory to play around with.

This explains why on some devices when we made it landscape (at least on iOS which has slightly higher texture limits) it worked on devices.

Simply cut the size of the scrollView down to at least the screen height and you should be good to go.

Rob

What are the rectangles supposed to be?

Rob

The rectangles are just squares that represent pre-configured puzzles from our backend. Basically all they are meant to do is select which puzzle and then show the next scene. Again, they work fine on every other device besides iPad Air that I’ve seen so far.

Have you tried to examine the device’s console log to see if there are errors?

Of the bat, I start thinking it’s an ATS (Application Transport Security) issue. Apple blocks access to http: unless you specifically allow it in build.settings. URL’s fed to things like network.request(), network.download() etc. have to be https: unless you’ve applied this override. Apple was supposed to stop allowing the override on Jan 1, but they’ve put that off for now, but at some point you will need to use https:

If this is the issue you certainly will have errors in the console log reporting that.

See:
 

https://docs.coronalabs.com/guide/hardware/appleATS/index.html

Rob

The app works perfectly on other Apple devices though (iPad 2, iPhones, etc.) I will get my hands on another iPad Air to examine the console log though.

What is weird to me is that it still receives the Json perfectly from the server and when you tap where the rectangle should be the app continues and works as expected. This leads me to believe ATS is not the issue but will look into it.

Also if this was the issue I don’t believe apple would have allowed it through to the App Store.

Cole 

bump