We have a pixel buffer pool managed by the system(created using CVPixelBufferPoolCreate API). And each time when we need a pixel buffer, we call CVPixelBufferPoolCreatePixelBuffer to created one from the pool. Then we override all pixels of the buffer, getting IOSurface from the buffer, and then set the IOSurface as CALayer's contents property in another process to show it, everything works fine.
Now we want to do some optimization by only override pixels that's changed between frames. The way we'd like to do is that after we call CVPixelBufferPoolCreatePixelBuffer to create a buffer, we get the underlying IOSurface id map it with a frame info. Next time if we get the same IOSurface id, we just compare the current frame info with the one we stored and only update the changed pixels in CVPixelBuffer.
However, there is no document mentioning whether the CVPixelBuffer created using CVPixelBufferPoolCreatePixelBuffer will contain previous pixels(content before it's returned to the pool). Do we have this guarantee? If not, is there any way we can know whether the created buffer contains the previous pixels or not?
General
RSS for tagDelve into the world of graphics and game development. Discuss creating stunning visuals, optimizing game mechanics, and share resources for game developers.
Post
Replies
Boosts
Views
Activity
I want to use Swift language to write code for drawing multiple polygons. I would like to find some examples as references. Can anyone provide example code or tell me where I can see such examples? Thank you!
Technical Issue Report for Maple Tale App - Audio Format Compatibility
Dear Apple Technical Support Team,
I hope this message finds you well. My name is [Your Name], and I am part of the development team behind the Maple Tale app. We have encountered an issue with audio format compatibility within our app that we believe requires your assistance.
The issue pertains to the audio formats supported by our app. Currently, our app only supports WAV and OGG formats, which has led to a limitation in user experience. We are looking to expand our support to include additional formats such as MP3 and AAC, which are widely used by our user base.
To provide a clear understanding of the issue, I have outlined the steps to reproduce the problem:
Launch the Maple Tale app.
Proceed with the game normally.
Upon picking up equipment within the game, a warning box pops up indicating the audio format compatibility issue.
This warning box appears due to the app's inability to process audio files in formats other than WAV and OGG. We understand that this can be a significant hindrance to the user experience, and we are eager to resolve this as quickly as possible.
We have reviewed the documentation available on the official Apple Developer website but are still seeking clarification on the best practices for supporting a wider range of audio formats within our app. We would greatly appreciate any official recommendations or guidelines that could assist us in this endeavor.
Additionally, we are considering updating our app to inform users about the current audio format requirements and provide guidance on how to optimize their audio files for the best performance within our app. If there are any official documents or resources that we should reference when crafting this update, please let us know.
We appreciate your time and assistance in this matter and look forward to your guidance on how to best implement audio format support on the iOS platform.
Thank you once again for your support.
Warm regards,
The update was the only change I can see. Which I did just the other day. I did log on to iCloud.com, I also looked at Apple Developer. I didn't see any additional updates of terms that needed to be accepted. I am sure to log into iCloud on the simulator. It seems to stay logged in. Until I fetchSavedGames. Where I have it exit at 20 seconds due to timing out. Then when I go back to check my account in Settings, it's asking to "Sign in to iCloud" again. It does work properly on a device. So it doesn't stay logged into iCloud on the simulator but it seems like the fetchSavedGame from GKLocalPlayer is what resets that. Any help or suggestions would be appreciated. Thanks.
Hi everyone,
I've been working with the autoAdjustmentFilters provided by Core Image, which includes filters like CIHighlightShadowAdjust, CIVibrance, and CIToneCurve. However, I’ve noticed that the results differ significantly from the "Auto" enhancement feature in the Photos app. In the Photos app, the Auto function seems to adjust multiple parameters such as contrast, exposure, white balance, highlights, and shadows in a more advanced manner.
Is there an API or a framework available that can replicate the more sophisticated "Auto" adjustments as seen in the Photos app? Or would I need to manually combine filters (like CIExposureAdjust, CIWhitePointAdjust, etc.) to approximate this functionality?
Any insights or recommendations on how to achieve this would be greatly appreciated. Thank you!
Hi,
I face a problem that I could not scan a specific Code 39 barcode with Vision framework. We have multiple barcode in a label and almost all Code 39 can be scanned, but not for specific one.
One more information, regardless the one that is not recognized with Vision can be read by a general barcode scanner.
Have anyone faced similar situation?
Is there unique condition to make it hard to scan the barcode when using Vision?(size, intensity, etc)
Regards,
Hi, I've got a Swift Framework with a bunch of Metal files. Currently users have to manually include a Metal Lib in their bundle provided separately, to use the Swift Package.
First question; Is there a way to make a Metal Lib target in a Swift Package, and just include the .metal files? (without a binary asset)
Second question; If not, Swift 5.3 has resource support, how would you recommend to bundle a Metal Lib in a Swift Package?
Hello,
I've been experimenting with the iphone-performance-gaming-tier Device Capability using TestFlight.
I've decided I don't want the restriction and I've just submitted a new build (new version number) without the value but the build metadata still includes it.
How do i remove it? I don't want to the restriction.
Cheers
Hi, everytime I try to run Minecraft Launcher theres a bunch of code that comes up? It ran fine about a month ago but now I cant even open the app, it wont let me copy all of the code but it does say this ""PC register does not match crashing frame (0x0 vs 0x10B338024)"". My Mac is fully up to date, I have deleted and reinstalled Minecraft numerous times ut it continues to display a large amount of code with nothing to fix it.
Could someone help me fix it or recommend anything I can do to fix it?
I am currently working on a project where I aim to overlay the camera feed obtained via the Apple Vision Pro's camera access API to align perfectly with the user's perspective in Vision Pro.
However, I've noticed a discrepancy between the captured camera feed and the actual view from the user's perspective. My assumption is that this difference might be related to lens distortion correction or the lack thereof.
Unfortunately, I'm not entirely sure how the camera feed is being corrected or processed. For the overlay, I'm using a typical 3D CG approach where a texture captured from the background plane is projected onto a surface. In this case, the "background capture" is the camera feed that I'm projecting.
If anyone has insights or suggestions on how to align the camera feed with the user's perspective more accurately, any information would be greatly appreciated.
Attached image shows what difference between the camera feed and actual user's perspective field of view.
I want to align the camera feed image to the user's perspective.
I have a game for iOS where I use CADisplayLink to animate a simulation, and for some reason the animation is not getting the full 120hz on capable devices (like iPhone 15 Pro). When I enable a 120hz refresh target, the animation is capped at only 90hz. This looks terrible because the animation works best when doubled (30, 60, 120, 240, etc).
The really bizarre thing is that when I turn on Screen Recording, my frame rate instantly jumps to 120, and everything looks perfectly smooth. My game has never looked better on iPhone! When recording is stopped, the animation drops back down to 90 fps. What in the world is going on?
[displayLink setPreferredFrameRateRange:CAFrameRateRangeMake(100,240,120)]; //Min. Max, Preferred [displayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
(Also, CADisableMinimumFrameDurationOnPhone is set to True in info.plist)
My app isn’t a game app, but iOS 18 always enable Game Mode for my app automatically. I didn’t find a switch to disable it in Xcode.
Hello. I have a spatial painting application for AR/VR, and the new system built into VisionOS2 for bringing up the navigation menu constantly interferes with using hand gestures for painting. How can I deactivate the system within the application? It's really a big issue.
Hello,
We have a scanning app using Image Capture Core. It is working fine on MacOS up to version 13. We notice now it is broken on Mac OS 15 (Sequoia) because the scannerDevice:didScanToURL: is never invoked when the scanner has scanned a page.
Pages are scanned and saved on disk, but didScanToURL is never invoked.
Any fix for this?
So I'm installing the toolkit but during the process the terminal just gives me this:
Last 15 lines from /Users/quiqu/Library/Logs/Homebrew/game-porting-toolkit/01.configure:
--enable-win64
--with-gnutls
--with-freetype
--with-gstreamer
CC=/usr/local/opt/game-porting-toolkit-compiler/bin/clang
CXX=/usr/local/opt/game-porting-toolkit-compiler/bin/clang++
checking build system type... x86_64-apple-darwin23.5.0
checking host system type... x86_64-apple-darwin23.5.0
checking whether make sets $(MAKE)... yes
checking for gcc... /usr/local/opt/game-porting-toolkit-compiler/bin/clang
checking whether the C compiler works... no
configure: error: in /private/tmp/game-porting-toolkit-20240928-16869-7g5o5t/wine64-build': configure: error: C compiler cannot create executables See config.log' for more details
If reporting this issue please do so to (not Homebrew/brew or Homebrew/homebrew-core):
apple/apple
quiqu@Quiques-Laptop ~ %
please if someone could help I have a tournament this weekend and I need this to work
I have followed the documentation to download the UnityPlugins from https://github.com/apple/unityplugins. When I run through the quick guide to create the .tgz builds it builds all the packages except for the Apple.GameKit package, which is the one I need.
It looks like during the build process there is a build failure which is likely causing this issue I will post the code below. This is blocking me and I have tried multiple times to the same result. (I removed some of the code error because it was too long just showing start and finish)
Building Release GameKit native libraries for platform: iOS
Build command: xcodebuild -scheme iOS - Release -destination generic/platform=iOS clean build
** BUILD FAILED **
The following build commands failed:
SwiftCompile normal arm64 Compiling\ GKAchievementDescription.swift,\ GKLeaderboard.swift,\ GKTurnBasedMatchmakerViewControllerDelegate.swift,\ GKChallengeDelegate.swift,\ GKMatchDelegate.swift,\ GKMatchmakerViewControllerDelegate.swift,\ GKInvite.swift,\ GKChallenge.swift,\ DefaultHandlers.swift,\ GKTurnBasedParticipant.swift,\ GKLocalPlayerListener.swift,\ GKGameCenterViewController.swift,\ GKSavedGameDelegate.swift,\ GKAccessPoint.swift,\ GKBasePlayer.swift,\ GKAchievementChallenge.swift,\ GKLeaderboardEntry.swift,\ GKTurnBasedExchangeReply.swift,\ GKTurnBasedMatchmakerViewController.swift,\ AppleCoreRuntimeShared.swift,\ GKErrorCodeExtension.swift,\ GKMatchmaker.swift,\ GKTurnBasedExchange.swift,\ GKNotificationBanner.swift,\ GKScoreChallenge.swift,\ GKLocalPlayer.swift,\ GKLeaderboardSet.swift,\ GKSavedGame.swift,\ GKMatchRequest.swift,\ GKMatch.swift,\ GKAchievement.swift,\ GKVoiceChat.swift,\ GKTurnBasedMatchDelegate.swift,\ UiUtilities.swift,\ GKTurnBasedMatch.swift,\ GKMatchmakerViewController.swift,\ GameKitUIDelegateHandler.swift,\ GKPlayer.swift,\ GKInviteDelegate.swift /Users/brookehowell/Downloads/apple/unityplugins/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKAchievementDescription.swift /Users/brookehowell/Downloads/apple/unityplugins/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKLeaderboard.swift /Users/brookehowell/Downloads/apple/unityplugins/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKTurnBasedMatchmakerViewControllerDelegate.swift /Users/brookehowell/Downloads/apple/unityplugins/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKChallengeDelegate.swift /Users/brookehowell/Downloads/apple/unityplugins/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKMatchDelegate.swift /Users/brookehowell/Downloads/apple/unityplugins/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKMatchmakerViewControllerDelegate.swift /Users/brookehowell/Downloads/apple/unityplugins/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKInvite.swift /Users/brookehowell/Downloads/apple/unityplugins/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKChallenge.swift /Users/brookehowell/Downloads/apple/unityplugins/plug-ins/Apple.GameKit/Native/GameKitWrapper/DefaultHandlers.swift /Users/brookehowell/Downloads/apple/unityplugins/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKTurnBasedParticipant.swift /Users/brookehowell/Downloads/apple/unityplugins/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKLocalPlayerListener.swift /Users/brookehowell/Downloads/apple/unityplugins/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKGameCenterViewController.swift /Users/brookehowell/Downloads/apple/unityplugins/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKSavedGameDelegate.swift /Users/brookehowell/Downloads/apple/unityplugins/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKAccessPoint.swift /Users/brookehowell/Downloads/apple/unityplugins/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKBasePlayer.swift /Users/brookehowell/Downloads/apple/unityplugins/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKAchievementChallenge.swift /Users/brookehowell/Downloads/apple/unityplugins/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKLeaderboardEntry.swift /Users/brookehowell/Downloads/apple/unityplugins/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKTurnBasedExchangeReply.swift /Users/brookehowell/Downloads/apple/unityplugins/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKTurnBasedMatchmakerViewController.swift /Users/brookehowell/Downloads/apple/unityplugins/plug-ins/Apple.GameKit/Native/GameKitWrapper/AppleCoreRuntimeShared.swift /Users/brookehowell/Downloads/apple/unityplugins/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKErrorCodeExtension.swift /Users/brookehowell/Downloads/apple/unityplugins/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKMatchmaker.swift /Users/brookehowell/Downloads/apple/unityplugins/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKTurnBasedExchange.swift /Users/brookehowell/Downloads/apple/unityplugins/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKNotificationBanner.swift /Users/brookehowell/Downloads/apple/unityplugins/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKScoreChallenge.swift /Users/brookehowell/Downloads/apple/unityplugins/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKLocalPlayer.swift /Users/brookehowell/Downloads/apple/unityplugins/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKLeaderboardSet.swift /Users/brookehowell/Downloads/apple/unityplugins/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKSavedGame.swift /Users/brookehowell/Downloads/apple/unityplugins/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKMatchRequest.swift /Users/brookehowell/Downloads/apple/unityplugins/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKMatch.swift /Users/brookehowell/Downloads/apple/unityplugins/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKAchievement.swift /Users/brookehowell/Downloads/apple/unityplugins/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKVoiceChat.swift /Users/brookehowell/Downloads/apple/unityplugins/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKTurnBasedMatchDelegate.swift /Users/brookehowell/Downloads/apple/unityplugins/plug-ins/Apple.GameKit/Native/GameKitWrapper/UiUtilities.swift /Users/brookehowell/Downloads/apple/unityplugins/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKTurnBasedMatch.swift /Users/brookehowell/Downloads/apple/unityplugins/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKMatchmakerViewController.swift /Users/brookehowell/Downloads/apple/unityplugins/plug-ins/Apple.GameKit/Native/GameKitWrapper/GameKitUIDelegateHandler.swift /Users/brookehowell/Downloads/apple/unityplugins/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKPlayer.swift /Users/brookehowell/Downloads/apple/unityplugins/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKInviteDelegate.swift (in target 'GameKitWrapper iOS' from project 'GameKitWrapper')
CompileSwift normal arm64 (in target 'GameKitWrapper iOS' from project 'GameKitWrapper')
(2 failures)
I'm really excited about the Object Capture APIs being moved to iOS, and the complex UI shown in the WWDC session.
I have a few unanswered questions:
Where is the sample code available from?
Are the new Object Capture APIs on iOS limited to certain devices?
Can we capture images from the front facing cameras?
I'm using the Apple RoomPlan sdk to generate a .usdz file, which works fine, and gives me a 3D scan of my room.
But when I try to use Model I/O's MDLAsset to convert that output into an .obj file, it comes out as a completely flat model shaped like a rectangle. Here is my Swift code:
let destinationURL = destinationFolderURL.appending(path: "Room.usdz")
do {
try FileManager.default.createDirectory(at: destinationFolderURL, withIntermediateDirectories: true)
try finalResults?.export(to: destinationURL, exportOptions: .model)
let newUsdz = destinationURL;
let asset = MDLAsset(url: newUsdz);
let obj = destinationFolderURL.appending(path: "Room.obj")
try asset.export(to: obj)
}
Not sure what's wrong here. According to MDLAsset documentation, .obj is a supported format and exporting from .usdz to the other formats like .stl and .ply works fine and retains the original 3D shape.
Some things I've tried:
changing "exportOptions" to parametric, mesh, or model.
simply changing the file extension of "destinationURL" (throws error)
Hello.
I have an application that exports a 3D object with vertex color to USDC. I'm using an MDLAsset and its functionality to export to USDC with [asset exportAssetToURL:[NSURL fileURLWithPath:filePath]]. In version 1.3 of the system, everything works correctly. But after updating to version 2.0, the exported object appears white (using the same code).
Any suggestions?
Thank you very much.
So I get JPEG data in my app. Previously I was using the higher level NSBitmapImageRep API and just feeding the JPEG data to it.
But now I've noticed on Sonoma If I get a JPEG in the CMYK color space the NSBitmapImageRep renders mostly black and is corrupted. So I'm trying to drop down to the lower level APIs. Specifically I grab a CGImageRef and and trying to use the Accelerate API to convert it to another format (to hopefully workaround the issue...
CGImageRef sourceCGImage = `CGImageCreateWithJPEGDataProvider(jpegDataProvider,`
NULL,
shouldInterpolate,
kCGRenderingIntentDefault);
Now I use vImageConverter_CreateWithCGImageFormat... with the following values for source and destination formats:
Source format: (derived from sourceCGImage)
bitsPerComponent = 8
bitsPerPixel = 32
colorSpace = (kCGColorSpaceICCBased; kCGColorSpaceModelCMYK; Generic CMYK Profile)
bitmapInfo = kCGBitmapByteOrderDefault
version = 0
decode = 0x000060000147f780
renderingIntent = kCGRenderingIntentDefault
Destination format:
bitsPerComponent = 8
bitsPerPixel = 24
colorSpace = (DeviceRBG)
bitmapInfo = 8197
version = 0
decode = 0x0000000000000000
renderingIntent = kCGRenderingIntentDefault
But vImageConverter_CreateWithCGImageFormat fails with kvImageInvalidImageFormat. Now if I change the destination format to use 32 bitsPerpixel and use alpha in the bitmap info the vImageConverter_CreateWithCGImageFormat does not return an error but I get a black image just like NSBitmapImageRep