iOS - Build Freezes When I Build To Device but Not in Simulator - iphone

I'm curious if someone can help me figure out what is going on...
I have an app that works fine in the simulator with no warnings or errors but when I try to even build with the device selected it appears to freeze. I've left it building for over 20minutes with no luck.
The application uses a large number of animated PNG sequence and a few videos but that didn't appear to be a problem until today.
Any insight would be appreciated...

What has changed in your environment since yesterday?
Can you back off the number of images to say 3 small ones, and one short video, and see if it builds then? Then add them back in a few at a time to see where it's breaking. Divide an conquer.

Turned out to be an odd problem with XCode compressing the PNGs in my project.
Turned off the PNG compression and it complied in no time.

Related

SwiftUI - LaunchImage not showing

I cannot get a Launch Image to be displayed on my app, whatever I try.
For context, this is a completely new, 100% SwiftUI project and is in its very early infancy.
Everything builds & runs perfectly fine, but I just cannot get any launch image customisation going...
My Info.plist:
My assets:
I've tried cleaning, deleting DerivedData, reinstalling app on device + sim but to no avail...
What am I doing wrong?
I ran into a similar issue before and got it fixed by restarting my phone.
See also: iOS launch screen does not update
When using launch storyboards I found that if the images that I used where too large it would launch with a black screen.
I reduced the size of the images I was using (one was reduced to 900px by 700px) but I don't know the magical size that sorts it, I then rebooted my iPhone and it started to work fine.
I don't know if the size issue would affect normal launch images but it may be worth giving it a try with a smaller image.

Strange issue with non retina display in iphone

My app was working fine both in simulator and iPhone 4 when i had only "image.png" . When I added "image#2x.png" screen's UI became distorted in actual device,simulator has no issues. Device is iphone 4 non-retina.
Do I need to specify anything when #2x images are added?
Just to confirm, you're not using a prerelease of Xcode 5, are you? If so, no one here is allowed to help you, and you should march yourself over to the Apple Developer forums.
That is strange. You shouldn't need to do anything other than creating the #2x version. Double and triple check that the files look as expected, and that the 2x version is exactly double the resolution in each direction (that is: if the original is 50x50, the 2x must be 100x100).
Next, try doing Product->Clean, delete the app from the device and then run it again. Sometimes weird things are solved that way. Also, restarting Xcode can't hurt, I've had that resolve more than a few Really Weird Issues.

iOS 5.1 with Xcode 4.3.1: [UIColor colorWithPatternImage:] strange behavior only on device

When I compile my app in Xcode 4.3.1 with iOS 5.1, I notice there is a strange behavior with background textures only on actual device. There is a 1px gap in between texture tiles shown in screenshot below.
My texture are 150x150 and 300x300 at 2x.
So far I've tested the same build on:
Simulator iPhone/iPad both 5.0/5.1: No bug
iPhone/iPad running 5.0.1: No bug
iPhone/iPad running 5.1: Buggy
I've been getting the same problem since 5.1 aswell. I solved it by doing the following to the image in photoshop. You can probably do the same in another tool.
Load the file, select all, and copy to clipboard
Create a new file in photoshop that is the same dimension, RGB and 8bit depth with 72pixels/inch resolution with a white background.
Paste the image you copied in step 1 into this image
Save the file and use this one.
After doing this the file displayed correctly on the device and I didn't have to resort to creating images the size of the display.
My workaround:
Set "Compress PNG Files" to "No" in Build Settings. In my case the size of the app bundle was even smaller than with compression turned on. I did image optimization myself.
just in case anyone else is having this problem and uses pngoptimizer, try a new png without optimizing it.
I had the same problem and spent the last 4 hours trying to solve it.
In the end i realized it was png file from the pngoptimizer tool that somehow always worked before iOS 5.1 but with the update the same png file produces this thin line at the bottom. the strange thing is that this does only happen on the device and not in simulator and that deceives you a lot because you think it cant be the graphic. in fact it is.

Background image on iPhone 4 causes webapp to run slow

I'm porting one of my projects to iPhone 4.
It's a Sencha Touch application, running via PhoneGap wrapper (that means UIWebView). Everything runs rather smoothly on iPhone 3(GS) and the simulator ofc. But on iPhone 4 (we've tested on several phones) the css rule for panel background makes the whole app run very slow including scrolling and tab transitions:
background-image: url(../images/background/main_panel__background.png); /*320x317*/
That causes all the stutter and lags.
I've tried to convert the image to JPEG and replace it - still nothing helps.
What could it be? I know that WebKit rendering engine does some scaling (1x1 -> 2x2) to accomodate for high resolution of "Retina" displays, but why would it cause such slowdown?
Thank you.
I discovered the same issue with background image and i am not sure what could be the reason. Actually i suspected the Alpha of my png to cause the issue, but apparently you had it with jpg too... For now i remove the picture. We could use CSS to remove it only for iPhones...

IPhone application won't launch correctly

So I'm developing and iPhone game right now and everything has been working just fine when I test it on my first gen iPod touch. Last night, I added in some NSUserDefaults stuff to save a few variables for it. I ran it on the simulator a few times and it worked perfectly, but when I built the app and put it on my iPod, all I got when I launched it was a black screen. Anyone have any ideas? They would be much appreciated, thank you.
I recommend deleting the application from your iPod Touch first then trying to install it again. When are you trying to read from NSUserDefaults? In your applicationWillFinishLaunching call? If so, try to comment that out to ensure that it really is the source of your problem.
You need to run it on the iPod touch with the debugger switched on - you should be able to track this down.
Do you know about setting a breakpoint for exceptions - if you tell the debugger to break on objc_exception_throw it is extreemly useful in these cases.
Do you have a custom Default.png file? If no, then you will see a black screen while your application loads. Depending what type of (possibly unending) operations you are doing on load this might be the reason you are seeing a black screen. Remember the simulator runs on top of the processor in your mac which is significantly faster than the processor in your iPod Touch.