Rendering on MetalView freezes iPhone 8 - ios

When I render an image on MetalView iPhone 8 freezes.
If I choose 12Mpx image iPhone 8 freezes after some time. If I choose an 18Mpx image (or bigger), the phone freezes immediately, even hardware buttons don’t respond for some time.
On other iPhones, it reproduces very rarely.
The application continues to work, touch events come, the code is executed, but the UI is frozen.
I made a simple project without additional code, where it's easily reproducible. It also doesn't depend on UIScrollView (the project has a branch without it) and debug mode. I tested it on iPhone 8 (iOS 14.2, 4.5). On iPhones 7+, 12, 12pro it is not reproduced.
https://github.com/Sanych6666/CoreImageMetalExample

Please fix code for loading image:
UIImage(named: "exampleImage.png")
to
UIImage(named: "exampleImage")
iOS much better working with just image name for this method.
Your's device doesn't support such big metal textures.
So metal context can't process this.
CIContext can, but Metal low level library so you should resolve this manually.
I recommended decrease image resoutions before send it to CIImage.

Related

iPhone application pixelated on iPhone

I've two live apps on Appstore, my one app is looking quite blurry on iPhone 11(which I just bought) and its fine previous models of iPhone, but my another app looks fine on iPhone 11.
The first app which is blurry is built on xib file and base screen size of iPhon SE and second app which look fine is built on storyboard and base screen size is iPhone 8 but I think that may not be the reason.
Blurry App on iPhone 11 (as it look pixelated)
Blurry App on iPhone 8(as it looks fine and crisp)
Xib file of Blurry App
Let me know why this is happening and whats the solution ? Do I need to revamp all screens in project? Looking for suggestions.
Thanks
Finally I found solution and the culprit was iOS 8.0 and Later check. It was unchecked, which I marked checked and added Splash screens for these defined sizes and my whole apps screens became crisp from pixelated.

iOS keyboard appears too large. Is this an issue with launch images? [duplicate]

This question already has an answer here:
The keyboard in my iOS app is too tall on the iPhone 6. How can I adjust the resolution of the keyboard in XCode?
(1 answer)
Closed 5 years ago.
In our iOS apps, I have seen that if we leave out certain launch images sizes, that the screen appears as if it is scaled up from a lower resolution device.
When this happens, the devices also display a taller keyboard with chunkier looking text.
When built in on my iPhone 6s+, from Xcode 7.x the keyboard in our app is 1 & 7/8ths" of an inch tall.
Looking at Skype, Slack, Waze, Messages, on the same device the keyboard is 1 & 3/8ths" tall.
I'm using whatever the standard keyboard is when our app's text fields are tapped on.
I have seen that this can be caused by missing launch images at the target device's size, but I'm not sold that this is the only cause. Does anyone have any insight why an app would appear at a lower resolution than what is native to the device?
Is there a known issue related to launchImages or some other factor that might be causing this?
In some of my testing, at one point I got the app to launch as expected at the correct size after switching full size retina launch images. This may have been fixed by building under Xcode 8.x, but I'm not sure and we can't do that yet because of other limitations.
Thanks much.
It's related to Launch Images in assets because when iPhone 5 came out first, XCode had this functionality to add certain launch image sizes to zoom in the UI of smaller screens and make it compatible to iPhone 5's screen. This was called Branding when I worked on it to make app compatible to bigger screen in a short time.
But it isn't the preferred way and you should avoid using Launch Images, use Launch.xib instead to create your Launch Screen. You can also use Launch.storyboard, whatever you prefer. It won't zoom in the Keyboard or other UI aspects then.
Hope it helps!

iOS Interface Oversized in Xcode Application

I have recently been running into a problem with one of the iOS applications that I'm developing. The problem with this application is that UI elements appear to be oversized. In Xcode the elements could have the same default sizes, but during the simulation process the elements are almost too large to fit on the screen. Has anyone ran into a similar issue and figured out how to resolve it. I have attached pictures below that illustrate the problem more clearly. In one of the pictures below, the keyboard clearly appears to be larger than that in the other picture.
Oversized User Interface
Normal Sized User Interface
Two possibilities
The device has Display Zoom turned on. You can change that in Settings > Display & Brightness > Display Zoom.
You app doesn't have a launch image for that size. Either add a launch image for that screen size or use a launch storyboard/xib. How to enable native resolution for apps on iPhone 6 and 6 Plus?

Snapshot fails on some iOS devices

I've got an app where I have a GLKit View Controller. I need to get a snapshot of the GL view.
I'm using:
glImage = [(GLKView *)self.view snapshot] ;
where glImage is a UIImage.
It works fine every time on my iPhone 5s (iOS 8.1), but just gives a blank image on my iPad Mini (iOS 7.1) and my iPhone 4s (also 7.1). The image is exactly the size I'd expect but blank.
This feature has been in place since iOS5 so it doesn't look like an OS issue.
Why doesn't this work? Is it a processing issue?
Edit - I upgraded the iPad to iOS8.1 and the problem remains so definitely not an OS issue.
It's not exact answer but you may consider using this method:
In short words it attaches CVPixelBuffer to OpenGL Framebuffer which allows it
to be read quickly by CPU. I am using it to capture video and never had problems
with it. Also it may be quicker then snapshot since it does not require your view
to be redrawn.

Single image as launch image for iOS 6 and iOS 7 in iPad

For iPhone app which support iOS 6 and iOS 7, we can use single image as launch image for both os versions. But in iPad, iOS 6 version launch image size should be 1024x748 and iOS 7 version launch image size should be 1024x768. Due to separate images, i feel the app size get increased unnecessary. Is there any way to reduce the app size or any way to use a single image for both version of the app?
Any suggestions please...
This will not be best answer to your query (there may be better solution), in iOS7 as application gets full access of screen, splash image size is 1024x768, where in iOS6 access starts after status bar so it's 1024x748.
If you will check option [Hide status bar during application launch] than for iOS 6 splash size will be 1024x768, so you don't need to add any extra image, check attached image to see that option in Target->general settings

Resources