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)
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
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
I am sure others will agree with me on this. I personally don’t like the way the new reactions look. Too many different color for the reactions. I honestly prefer the old grey version for the reactions to text messages. The extra emoji thing is okay but the change in color for the heart, thumbs up and the other reactions are not the best. Auto correct is horrible in this new update by the way
I'll leave this here for anyone who's interested but it is possible to slightly use Windows VR on ARM Mac, right now it's just some demos but I am still working on solutions: https://www.youtube.com/watch?v=qbucnU0dpDo&t=431s&ab_channel=NightSightProductions
Hello,
I want to create a painting app for iOS and I saw many examples use a CAShapeLayer to draw a UIBezierPath.
As I understand CoreAnimation uses the GPU so I was wondering how is this implemented on the GPU? Or in other words, how would you do it with Metal or OpenGL?
I can only think of continuously updating a texture in response to the user's drawing but that would be a very resource intensive operation...
Thanks
In my app, I have an ARView that has cameraMode set to nonAR.
I occasionally hide the ARView when it is not needed and reveal it again later.
While the ARView is hidden, I'd like to pause the animation to save iPhone battery life. I'd also like to do this when I know that animation in my scene has paused and the contents of the view, although still visible, is static.
This was possible using SceneKit, but I can't seem to find an equivalent way to do it using RealityKit.
At least as of iOS 18, a hidden ARView with an empty scene appears to use approximately 30% of the CPU.
How can I pause ARView so that it won't use the battery unnecessarily?
Thank you for considering this question.
What is the best way to display text over images - I'd like the image to fade to white underneath the text so that the text is easier to read since I have no control over the contents of the images.
I thought about having a second label behind the actual label with the same text in a slightly larger font and white color. but I'd rather have it be a gradual fading of the image just under the text rather than what looks like 3D text.
Any suggestions?
I have a legacy OpenGL fixed-pipeline app which has been ported from Windows (32-bit) to MacOS 64-bit.
The problem is that if I have a scene with a non-positional light, everything works great. If I add a positional spotlight the two lights interact, and I get incorrect results.
This problem does not occur on X86_64 Macs. It does occur when the app is X86_64 running under Rosetta or native ARM64.
So it's either an Apple Silicon OpenGL driver behaviour my code is triggering, or something with the on-chip Apple Silicon graphics.
Here is the "normal" case: the spotlight is to the right:
Here, I have moved the spotlight down (Y = 1). Notice the black areas on the cube. That's incorrect.
Now, I turn off the spotlight by commenting out the "makeALight" call for the spotlight (light 6). Now, the cube is evenly lit.
Here is the test code I use to generate the lights. You will need to install glfw with brew to build it.
main.cpp
Hello,
I’m trying to run Age of Mythology Retold on my Mac using the Game Porting Toolkit. Unfortunately, the game crashes before it opens. Has anyone experienced something similar or have any suggestions on how to resolve it?
Thank you!
So, I've been messing around with SteamVR on Apple Silicon and it runs as expected under Rosetta translation, I've even got a game to run. But for some reason SteamVR cannot detect a headset, even when using one that SteamVR has drivers for such as the 2017 Vive headset. Would there be any explanation as to why this is because SteamVR works as expected so that leads me to believe it's something with MacOS.
A sample of some error messages that are presented in the Xcode log for executon of a program. There is nothing in the messages that will help identify a component as the origin of the message, nor is there a locatable derinition for the various labels and fields of the text. What component or even framework does this set of messages originate? Your search engine is useless because it returns gibberish. It doesn’t even follow the common behavior of SEARCH ENGINES because it takes label strings compounded from common words and searches for the common word instead of using the catenated string that is the internal variable name that is in the text.
2024-06-22 19:45:58.089943-0500 RoomPlanExampleApp[733:30145] [ClientDonation] (+[PPSClientDonation isRegisteredSubsystem:category:]) Permission denied: GenerativeFunctionMetrics / ANEInferenceOperationPrepareForEncode. I am looking for a definition of the error with a way to locate the context in which the error occurs.
2024-06-22 19:45:58.089967-0500 RoomPlanExampleApp[733:30145] [ClientDonation] (+[PPSClientDonation sendEventWithIdentifier:payload:]) Invalid inputs: payload={
aneModelPath = "/System/Library/PrivateFrameworks/RoomScanCore.framework/PrecompiledModels/lcnn_floorplan_model.bundle/H14G.bundle/main/segment_0__ane/net.hwx";
bundleIdentfier = "com.example.apple-samplecode.RoomPlanExampleApp9QSS565686";
}
2024-06-22 19:45:58.094770-0500 RoomPlanExampleApp[733:30145] [ClientDonation] (+[PPSClientDonation sendEventWithIdentifier:payload:]) Invalid inputs: payload={
bundleIdentfier = "com.example.apple-samplecode.RoomPlanExampleApp9QSS565686";
e5FunctionName = main;
numSegments = 1;
}
I am creating a 3D model from multiple images using the photogrammetry session. Now, when the session generates an OBJ file and I measure the distance between two points, the distance is displayed sporadically in different units. Sometimes it's meters, then centimeters, or another unit altogether. How can I tell the photogrammetry session to always create the model in millimeters?