Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Invisible Rectangles on iPad Air only?
Started by colekostreva Jan 06 2017 11:50 AM

14 replies to this topic
ipad air invisible rectangles ios issue bug
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

colekostreva

[GLOBAL: userInfoPane.html]
colekostreva
  • Observer

  • 11 posts
  • Corona SDK

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!


[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 20,720 posts
  • Corona Staff

What are the rectangles supposed to be?

 

Rob


  • colekostreva likes this

[TOPIC: post.html]
#3

colekostreva

[GLOBAL: userInfoPane.html]
colekostreva
  • Observer

  • 11 posts
  • Corona SDK

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.

[TOPIC: post.html]
#4

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 20,720 posts
  • Corona Staff

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



[TOPIC: post.html]
#5

colekostreva

[GLOBAL: userInfoPane.html]
colekostreva
  • Observer

  • 11 posts
  • Corona SDK

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 



[TOPIC: post.html]
#6

colekostreva

[GLOBAL: userInfoPane.html]
colekostreva
  • Observer

  • 11 posts
  • Corona SDK

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

[TOPIC: post.html]
#7

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 20,720 posts
  • Corona Staff

Did you ever get a console log to look at?



[TOPIC: post.html]
#8

colekostreva

[GLOBAL: userInfoPane.html]
colekostreva
  • Observer

  • 11 posts
  • Corona SDK

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. 



[TOPIC: post.html]
#9

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 20,720 posts
  • Corona Staff

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

 

Rob



[TOPIC: post.html]
#10

colekostreva

[GLOBAL: userInfoPane.html]
colekostreva
  • Observer

  • 11 posts
  • Corona SDK

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.



[TOPIC: post.html]
#11

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 20,720 posts
  • Corona Staff

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



[TOPIC: post.html]
#12

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 20,720 posts
  • Corona Staff

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



[TOPIC: post.html]
#13

colekostreva

[GLOBAL: userInfoPane.html]
colekostreva
  • Observer

  • 11 posts
  • Corona SDK

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

 

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

 

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

 

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. 



[TOPIC: post.html]
#14

colekostreva

[GLOBAL: userInfoPane.html]
colekostreva
  • Observer

  • 11 posts
  • Corona SDK

Any update on this issue?



[TOPIC: post.html]
#15

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 20,720 posts
  • Corona Staff

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


  • colekostreva likes this


[topic_controls]
[/topic_controls]



Also tagged with one or more of these keywords: ipad, air, invisible, rectangles, ios, issue, bug