iOS OpenGLES not rendering images on iPhone 5s+ - ios

I followed this tutorial for the first short bit on setting up a basic 2D game engine: Basic 2D Game Engine Tutorial and completed the first bit to render a basic image to the screen. It works fine on the iPhone 4s and iPhone 5 simulator but not any simulator newer than that.
I decided to download his finished project to see if it works on the newer devices and it does. To try and figure out what was wrong I slowly deleted everything to the bare bones on his project and it still worked.
The next thing I did was delete everything in his project and ported over my code into his project directly. It still renders the image fine! So now I have two X-code projects running the exact same code (I could change code in one project and it affects the other one.) Despite this it still works in one project on the iPhone5s+ device simulator but not the other one.
They both work fine on the iPhone 4s simulator (I changed the background color just to prove they are both running on the same code.)
This seems almost silly to me, they are running the exact same code and all of the settings are identical. Does anyone have any idea what is going on that could make OpenGL-ES not work on specific device simulators?

It might be some 64/32bit issue. Look for areas where you've cast pointers or where you used float instead of CGFloat.

Related

How to debug multiple scenes loading at the same time in unity?

We have a really weird bug in out game where when we upload it into Beta and send it out through test flight, so phones play the game as intended and other phones have a weird issue pictured below:
From the image you can see the problem. One it does a ghosting type of thing with the characters as they move. Two, it acts like no scene is actually closing, but keeps stacking them on top of each other.
This problem does not occur on iPhone 6s or iPad Pro. It also doesn't occur on Android. We have only seen it on 5S and iPads.
We have looked at versions and that doesn't seem to be an issue either. We are using Unity 5.3 for this build (we reverted to this build as we felt it was the most stable, just to make sure that wasn;t an issue)
Anyone have an idea of what could be causing this problem?
Keep in mind that the things that are being seen are in different scenes.
in your camera settings you probably set clear flags to Dont clear set it to Depth only

iOS Simulator Rendering issue for PDF Reader Core for iOS

I have searched around on here, but couldn't find anything to answer my question. I have developed a custom app for the iPad; it involves using a set of PDf documents that change pages based on a 1 second time frame. To achieve this is have used the 'PDF Reader Core for iOS' external library. Please find the link here: https://github.com/vfr/Reader
The app works perfectly fine on the actual iPad, however I also wish to run the app on Mac Mini Machines, so the obvious thought I had was to boot the project in the iOS Simulator on the machines (saves me recoding it for OSX.). Now, here is my issue. The app works pretty smoothly in the simulator, the only issue I have is that there is a slight render lag between the page change on the Simulator. It isn't at full resolution, and appears blur whilst it renders, however the time frame to change is so quick that the simulator doesn't have enough time to render to full resolution. I have also emailed the developer of the library and he provided some suggestions however, these didn't seem to fix the issue.
I am aware that this could be to do with the actual PDF Reader itself, however I wanted to ask if anyone had any suggestions if this could be fixed in regards to the iOS Simulator? Any way to speed up the simulator?
I am using OSX Yosemite, Xcode 6.4 and Objective-C.
It seems at this moment i may have to recode for OSX. Any suggestions would be highly appreciated.
Thanks

Pictures compiling into wrong sizes

I've created a game using SpriteKit in Xcode 5. Everything worked perfectly, I tested the app on all of the iPhones in Xcode 5 and the game worked beautifully; however, I was planning to release it sometime this week and updated to Xcode 6 so I can see if the app would work on the iPhone 6 (I saw no reason why It wouldn't, but I wanted to try on the simulator).
I am not sure where to start to look for bugs, since everything worked exactly the way I wanted it to, so I'm sorry if I cannot provide you with any information about what I've tried so far. On a side note, the resizing is only weird in simulator, when I compile the same code in Xcode 6 on my actual device, it still works fine.
I have heard that the iPhone 6 automatically resized things, but is this the case?
Is it a problem with the simulator? Xcode 6? Should I release the app and don't worry?
node1 = [SKSpriteNode spriteNodeWithTexture:[SKTexture textureWithImage:[UIImage imageNamed:#"redUp"]]];
node2 = [SKSpriteNode spriteNodeWithTexture:[SKTexture textureWithImage:[UIImage imageNamed:#"redUp"]]];
The above code is an example of two of the images that are being scaled wrong on simulator on device. After the above lines, all I do is add a couple actions and set properties such as name and physics body.
http://postimg.org/image/j2hbw2of9/
This link shows the simulator running the game. This is NOT what is supposed to happen.
http://postimg.org/image/fe3asuaav/
This IS what's supposed to happen. This is a screenshot of my iPhone running the game, NOT the simulator. Perhaps this is because simulator is iOS8 and my iPhone is iOS 7? Why would that make a difference?
EDIT The reason my device works but not simulator (I believe) is because I don't have iOS 8 on my device yet. Could that be a reason?
I solved the issue. For those in the future with the same problem, my #2x image was not scaled down in iOS 7, and so in iOS8 I added an NSLog statement to output the size of my images. For some reason they were twice as small. I went into Inkscape and doubled the sizes for every picture, thus solving the issue.

Swift SK game works correctly in simulator, labels missing in physical iPhone 5S (both iOS8)

I'm writing a game using sprite kit, first time so mistakes are inevitable :)
So running it in the simulator when certain events happen it's quite laggy (fps drops to 11 or less).
So I decided to see what happens on a real iPhone 5S.
Things run a little better: still lags at those events but not as badly.
However quite a few of my labels are missing: they appear fine in the Simulator but are completely missing in the physical device (just empty space where they should be).
Running ios8 in the simulator (5S) and on the 5S, code written in Swift.
Any hints at what I should look at?
Well, first you should try to isolate the problem. Try and see if the labels are indeed hidden or if they are behind a view. Download a hierarchy viewer such as Reveal App and try and find the UILabels. If they exist in both, the hierarchy viewer and the Simulator but not the physical iOS device, try and upload it to a different device. If it happens on the other device too, something is wrong with your code. We cant help unless we have something to work with. I recommend looking at https://stackoverflow.com/help/mcve to help with writing good questions.

Why does simply looking at my Storyboard in XCode 5 ruin my app?

I have an app built in XCode 4 against iOS6. If I open that workspace in XCode 5, clean and build my project, and run it in the simulator, it works (looks a bit different and needs some work, but it works). If I the simply navigate to my Storyboard and do absolutely nothing else, running the app in the simulator again results in my Photo Slideshow showing up black rather than showing pictures properly. A diff reveals it made some changes to the story board file when I looked at it. Rolling back the changes pertaining to my slideshow only is not effective. Rolling back all the changes works until I look at the Storyboard again.
It's obviously capable of working properly - why does it have to ruin everything just because I look at the Storyboard? Now I have to rebuild this part of the app, which is painful because I didn't build this part of the app to start with. This is not great for maintainability.
OK I have been messing with this all day.
In a nut shell keep or install Xcode 4.6 to deploy iOS 6.1 and before apps.
So for Xcode 5 messing stuff up, yes it's not working as expected.
I would expect to set the target
And have it look like an ios 6.1 app but it does not it looks ok in the viewer but both on the simulator and a iPad it looks bad. I have already filed a bug report.
ALSO if you have Autolayout checked in your 4.6 project and then try to look at it in Xcode 5.0 be prepared to kill Xcode as it tries to move everything around. In my case many table views got stuck in an endless loop and finally got a warning that tables can not exceed 10,000 :)

Resources