Pictures compiling into wrong sizes - ios

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.

Related

iOS simulator issue with SceneKit displays only black shapes

I have developed a small dice rolling app using SceneKit. While everything works correctly on device my dice nodes are shown as black shapes in the simulator. This used to work fine before but I stopped working on the app for a year and Xcode updated since. You can find screenshots of the issue below.
I tried using an other version of Xcode (11 beta). I tried deleting everything Xcode and Simulator related and reinstalling. I tried disabling every fancy effect on my dice nodes but nothing seems to have an impact, the issue really seems to come from the simulator rendering.
As anyone ever encountered a similar issue? Any help on how to fix it would be appreciated as I use Fastlane Snapshot to generate new screenshots when I release.
Simulator Screenshot:
Device Screenshot:
I made it work by trying random stuff: the culprit seems to be my SCNLight node that lights the scene. My light type was set to .spot but if I set it to something else my dice appear correctly in the simulator.

Update to Xcode 9 makes fonts blurry

I've recently updated my iOS app project for Xcode 9 and iPhone X and have a very strange problem.
The app, which looked good when built with Xcode 8.3.3, now looks all blurry. Fonts are not longer crisp.
The app is iPhone only and the target platform for the app is iOS 9.
I've noticed that the only device the app still looks good on is the "iPhone mode" (little sreen in the middle) of an iPad Air.
It seems as if some weird scaling effect is happening in the background but I can't figure out what it is.
I've tried setting the frames of labels with CGRectIntegral() method, to insure OK coordinates, but it did not change.
If you are noticing this behavior in the simulator, it's likely that you enabled Physical Size scaling. Go to Window and select Pixel Accurate to disable this function.

UI change in app after xCode 9 iOS 11

I found my app changed UI after I updated xCode to 9.
See the image with post, Fonts look bigger, views look bigger, images lost crispness.
I'm facing this issue in iPhone 6 and later these issue, iPhone SE and and 5S looks fine the same.
Did anyone face this issue??
I got issue resolved.
We had started app with iOS 7, since then we have been using launch images set. we had never used Launch screen xib or storyboard....after adding launch screen xib everything's working fine now :)

iOS OpenGLES not rendering images on iPhone 5s+

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.

Xcode 6.0.1 & iOS 8 is messing up my code and output on simulator and iphone

I am finding that Xcode 6.0.1 is messing up my code and output on simulator and iphone
Xcode 6 is making my landscape games look like crap on the simulator and phone (iOS 8).
When I run it on simulator for iOS 7 it works fine. Does not run still not on iPhone 5 iOS 8. Runs fine on iOS 7 iPhone 4 iOS 7
Therefore the issue is not the code, but Xcode or IOS or some combination.
Help me, thanks in advance
Here is a image on Xcode 6.0.1 with iOS 8
Here is a image on Xcode 5.1.1 with iOS 7
I had the same problem but then noticed the width and height were swapped around for ios8 so now my initwithframe looks like this
- (id)initWithFrame:(CGRect)frameOrg
{
CGRect frame = frameOrg;
isIOS8= ( frameOrg.size.width > frameOrg.size.height);
if (yes && isIOS8)
{
frame.size.width = frameOrg.size.height;
frame.size.height=frameOrg.size.width;
}
self = [super initWithFrame:frame];
...
...
...
}
I needed to delete the apps from all devices that it was installed on and clean all the projects (including deleting from the simulator) occasionally still runs in rotten apple mode but haven't found a way around that yet. About 95% of time runs in apple goodness mode. Seems to be something to do with the compile as when it switches to rotten apple mode it consistently mucks up everytime I run until I clean and recompile. Likewise everytime I get a good compile I can run that as many times as I like without if mucking up. So I think its an xcode 6 issue myself :( hope this helps.
Ps the game looks Cooool.
Just looked at your screen shots more closely. As well as the above , have you checked your iPad and iPhone settings are both set to landscape AND your not running the iPhone app on the iPad. Im just looking at the change in scale between your background and your icons. It looks a bit like another iOS8 problem I had when I accidentally ran the iPhone version on the iPad sim. UnClick "Universal" and try specifically setting and running the iPad version!

Resources