IOSurface gradually increases memory in iOS 12 and above - ios

I am facing memory issue in my app for iOS 12 and above versions. IOSurface gradually increases simultaneously in iOS 12.1.1 where as it works fine in iOS 11 versions. I have attached the issue screenshot below,
Why this issue happens in iOS 12 versions? Can someone help me how to solve this? I cross checked in iOS 11 versions and it works fine.

Do you use camera ?
It may depends on camera.
Size of IOSurface bock: 8372224 bytes = 1960*1080*4

Related

IOS 15.7 does not run on iPad

I have XCode 14.0.1 installed which is suppose to address 15.7. There is still no 15.7 IOS in the simulator, so I'm using an actual connected device running 15.7 for this test.
I have iPad Mini 4 that has my app that works under 15.6.1. When it's updated to 15.7 it stopped working. It can not be updated further and will not be available for IOS 16 when it comes out, so its imperative that I get this resolved. I can not downgrade either using 3utools or itunes. An iPhone that was updated to 15.7 didn't work either, but the iPhone could be updated to 16 and then the app worked again.
I traced the issue to this line of code:
UIImage *image = [[UIImage alloc] initWithContentsOfFile:filename]
filename is a constructed path to a small bitmap file to where it installs during installing the app.
When I run within Xcode, the image is created correctly and I can see the bitmap (if I click on image) on a connected actual iPad mini 4 using IOS 15.6.1 or IOS 16 on a 5th generation simulator device; but when I use a connected actual iPad mini 4 device running IOS 15.7, the result is image=nil, which kicks out as an error.
Does IOS 15.7 handle bitmaps differently? Any ideas?
The issue according to Apple is that there is a bug in IOS 15.7. The UIImage can not load bitmaps with depths/precision less than 24bits per pixel. They recommend using PNG files instead.
It was not clear when they plan on fixing this if ever.
I changed all my bitmaps to PNGs and the app worked flawlessly.

Shader performance data maybe unavailable due to deployment target older than device

I'm getting one problem in my Xcode 10 and iOS 12. See my problem is:
GPU Frame Capture
Shader performance data maybe unavailable due to deployment target older than device version
See my screen shot
This is happen in only iOS 12. Which means...
In my Xcode Deployment Target:9.0,
In my iPhone OS is : iOS 12 (Now problem came.)
But when i run in Xcode 10 and iOS 11.4 it's fine.
It's not a problem, but a suggestion, that you could get more Shader performance data if you switch your deployment target to iOS 12.
You could switch to iOS 12 only during shader profiling, and put it back when it's done.

Sprite kit animation frame per second less than 10 on Iphone simulator after installing Xcode 9. Is there any way to solve this

Additional information
Simple card game with more than 15 sprites on screen at a time
The game used to run in simulator on xcode 8 ios 10 at 55 to 60 frames per second
Installed xcode 9 today. Simulator running ios 11. Now the frames per second is around 5 when there are around 15 sprites
option on simulator for slow animations is off.
i am using this library https://github.com/evannnc/ActionQ which create a FIFO queue that will sequentially process any SKAction that is passed into it
Related Threads without solution
Xcode simulator extremely slow
https://forums.developer.apple.com/thread/83570
There is a bug in OpenGLES.framework in iOS 11/tvOS 11/watchOS 4 that causes them to skip loading the LLVM JIT and fall back to interpreting shaders. This has a severe performance impact on the Simulator since it is entirely software-rendered OpenGL (this includes CoreAnimation, SceneKit, etc).
As a temporary workaround you can copy libCoreVMClient.dylib from Beta 3 into the Xcode 9 GM and performance should be restored to what it was previously. This must be done for each platform runtime separately.
For iOS this is located at: Xcode[-beta].app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/OpenGLES.framework/libCoreVMClient.dylib
For tvOS this is located at: Xcode[-beta].app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/tvOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/OpenGLES.framework/libCoreVMClient.dylib
For watchOS this is located at: Xcode[-beta].app/Contents/Developer/Platforms/WatchOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/watchOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/OpenGLES.framework/libCoreVMClient.dylib
As per the suggestion by #ekscrypto I installed iOS 10.3.1 simulator on Xcode 9.
Now the frames per second are around 55 and animations are fast or normal again.

Crackling noise on playback on iOS9 and 9.1 (libPD + cocos2d + xcode 7.1)

I'm writing an app using cocos2d and libpd on iOS. After updating XCode to 7.1 I had to do a workaround regarding CG shaders not setting up correctly, as per: Coco2d 2.1 and Xcode 7 iOS 9 crash ccShader
Unfortunately I started getting crackling noise on playback on iOS9 and 9.1 devices. Pre iOS 9 don't display this problem. I'm wondering whether it has something to do with the shaders workaround.
anybody with the same issue?
It turned out that crackling has nothing to do with iOS9 or XCode 7. The object initialising libpd has been initialised twice causing the audio engine to have two active copies.

NSString boundingRectWithSize bugged on iOS 9?

I have run into a definite issue with NSString and boundingRectWithSize.
On an iOS 8 iPhone, everything is sound and well. It calculates the correct size of a string when rendered with a font at a certain size.
With a iOS 9 GM seed iPhone, the width is always maxed out at 320, consistently. If the string is short, below 320 points, that will be correctly and consistently reported as on an iOS 8 device, but when an iOS 8 device reports a width beyond 320, the iOS 9 device always reports a width of 320.
The app is compiled using Xcode 6.4, ie using iOS 8 SDK. The OS I use is OS X El Capitan GM seed. I have heard, that using Xcode 6 on El Capitan is not really recommended. The recommended version of Xcode for El Capitan is Xcode 7. I cannot use Xcode 7 yet (but will try it shortly, just to try...) because of business reasons.
UPDATE: I just tried compiling using Xcode 7 and SDK 9.0 - the widths are still maxed out at 320. The Xcode and/or SDK version is not the issue. iOS 9.0 is either bugged here or just behaves differently ;-)
Anyone ran into the issue?
If I find no one else, I guess I will report this bug (I suspect it is a bug. Or just inconsistent behaviour which I really don't think Apple meant without giving some kind of deprecation warning) to Apple.
I have found a solution, or answer if you will.
I don't think there is a bug in iOS 9, it just behaves differently, and from what I understand, more correct, than iOS 8. So yes, inconsistent, but better...
The size I fed to boundingRectWithSize: was always set to like 320x30ish. On iOS8 this function happily ignored the max width there and returned sizes above that, above 320 in my case. iOS 9 however correctly does not return sizes beyond that max size.
So I just changed the maxsize to CGSizeMake(CGFLOAT_MAX, 30) and now iOS 8 and 9 seem to both report the same sizes even beyond 320. Case closed.

Resources