Posts

Sort by:
Post not yet marked as solved
0 Replies
26 Views
My app stopped working in Mac OS Sonoma 14.0 and I quickly isolated the problem to CGContextDrawLayerAtPoint. Two issues, first of all about 1/2 the time there was no data copied (the updated CGLayer did not show up in the window). Then the app would crash iin libswiftCore.dylib after about 5 updates with a very unusual message: "Fatal error: Duplicate keys of type 'DisplayList' were found in a Dictionary. This usually means either that the type violates Hashable's requirements, or that members of such a dictionary were mutated after insertion". This behavior showed up in builds built with XCode 13 on a Mac OS Montery platform, as well as XCode 15 on Mac OS Ventura when the app was run on Sonoma. My app uses a very traditional method to create an off-screen graphics context in drawRect: - (void)drawRect:(NSRect)dirtyRect { // Obtain context from the current NSGraphicsContext ... viewNSContext = [NSGraphicsContext currentContext]; viewCGContext = (CGContextRef)[viewNSContext graphicsPort]; drawingLayer = CGLayerCreateWithContext(viewCGContext, size, NULL); So the exact details of the off-screen drawing area were based upon the characteristics of the window being drawn to. Fortunately the work-around was very easy. By creating a custom CGBitmapContext everything was resolved. My drawing requirements are very basic, so a simple 32-bit RGB off-screen context was adequate. colorSpaceRef = CGColorSpaceCreateDeviceRGB(); bitMapContextRef = CGBitmapContextCreate(NULL, (int) rintf(size.width), (int) rintf(size.height), 8, 0, colorSpaceRef, kCGImageAlphaNoneSkipLast); drawingLayer = CGLayerCreateWithContext(bitMapContextRef, size, NULL); Once I changed to a bitmap offscreen context, problem resolved. In my case I verified that the portion of the window that was updated with the CGContextDrawLayerAtPoint was indeed restricted to the dirty part of the view rectangle, at least in Sonoma 14.5. Hope this helps someone else searching for the issue, as I found nothing in the Forums or online.
Posted
by
Post not yet marked as solved
0 Replies
20 Views
Hi Team, I have developed a smartcard driver which is working fine when inserting USB mouse, So here is the process I followed for smartcard driver Smartcard driver(IFdHandler) has info.plist which contains vendor Id and product ID attributes Mentioned vendor Id and product ID of USB mouse which one is going to be connected to device(Mac) in info.plist, Build the IFDdriver and replace it to path - /usr/local/libexec/SmartCardServices/drivers/ Once Inserting USB mouse I am getting smart card pairing notification on Mac This scenario is working fine and able to achieve following changes on Mac device - Getting Smart card notification for pairing on Mac device After Pairing , Password field on Login Screen changes to PIN field But I want smartcard driver(IFDHandler) to be trigger via bluetooth connection from iPhone or android instead via USB Is there any way to achieve This? Reference for USB driver smart card driver - https://github.com/frankmorgner/vsmartcard/blob/master/virtualsmartcard/src/ifd-vpcd/ifd-vpcd.c
Posted
by
Post not yet marked as solved
0 Replies
20 Views
I have a unity scene which i have created for vision pro and i have also created a biomatric authentication application for vision os using Xcode and swift. What i want to do is call unity scene after the authentication has taken place form the xcode. now i have seen medium post but it only shows how we can do that for apps, I am not bale to do that for vision Pro I have followed this post : https://medium.com/mop-developers/launch-a-unity-game-from-a-swiftui-ios-app-11a5652ce476 All this i am doing because as far as i know Apple vision pro is not currently supporting optic id authentication with unity's polyspatial plugin. Any help on this will be appreciated. Thank you in advace.
Posted
by
Post not yet marked as solved
0 Replies
16 Views
I created an app that implements Google AdMob banner ads. I have implemented App Tracking Transparency, but I don't see permission requests on devices running the latest operating system (iOS17.4). We have already taken the following measures. AdMob banner ads are displayed instead of permission requests. Setting Info.plist NSUserTrackingUsageDescription Used to display relevant ads to the user. App initialization timing I call it in ContentView's onAppear so that it is called immediately when the app starts. Check the settings of the actual machine In the iOS device settings, go to "Settings" > "Privacy" > "Tracking" and enable tracking. We apologize for the inconvenience and appreciate your guidance.
Posted
by
Post not yet marked as solved
0 Replies
17 Views
I am trying to embed a framework and execute it on simulator: add framework, it is required by default, make it embed-and-sign If I start the app in simulator from XCode, all runs (by default it runs under debugger, so I assume a bit different environment). If I run it directly in simulator, using xcrun simctl, it crashes with framework binary not found (is that expected?). So I experimented [quite] a bit and updated the LOAD COMMAND to load the dylib with @loader_path (default is @rpath that xcode makes) - in such case the error is: Library not loaded: @loader_path/Frameworks/***.framework/*** Referenced from: <E13560A8-7387-308A-AF0F-F5107B737910> /Users/USER/Library/Developer/CoreSimulator/Devices/47B8C2D5-F78E-4976-B124-A25623DF14A7/data/Containers/Bundle/Application/5B5EA95D-44CD-4403-BE1E-FC6851B44917/App.app/App Reason: tried: '/Users/username/Library/Developer/CoreSimulator/Devices/47B8C2D5-F78E-4976-B124-A25623DF14A7/data/Containers/Bundle/Application/5B5EA95D-44CD-4403-BE1E-FC6851B44917/App.app/Frameworks/***.framework/***' (no such file), '/Library/Developer/CoreSimulator/Volumes/iOS_21E213/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.4.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/***.framework/***' (no such file) (terminated at launch; ignore backtrace) /Users/username/Library/Developer/CoreSimulator/Devices/47B8C2D5-F78E-4976-B124-A25623DF14A7/data/Containers/Bundle/Application/5B5EA95D-44CD-4403-BE1E-FC6851B44917/App.app/Frameworks/***.framework/*** is a local path on my dev machine, which sounds like a bug. Is that a bug? Should I open one somewhere for Apple? Then I played a bit more and found this https://stackoverflow.com/a/52535580/21881034 - "All you need to do is set the third party frameworks you are using in your custom framework for e.g:- socket.io-client-swift as Optional instead of Required under Link binary with Libraries in build Phases section" - which worked. What it does is replaces the load command with LC_LOAD_WEAK_DYLIB - so I assume it executes a bit later and probably again a different environment.
Posted
by
Post not yet marked as solved
0 Replies
27 Views
I have recently submitted a new app version to the Appstore with Xcode 15.0. Unfortunately, I have started to see the below crash in the Xcode organiser > Crashes section occurring for more number of times. UIKitCore: +[UIAlertController _alertControllerContainedInViewController:] + 160 The exception trace is not leading to main() function but not pointing to any of the code line. I had used UIAlertController in the past versions to show the alerts but there is no code written in the current version code related to UIAlertController. Only from the latest version, this kind of crash started to surface. In the latest release, We have added a third party SDK and while implementing the SDK, we had added the Location and Bluetooth Permissions in Info.plist file. But as we don't want to use/track the Location and Bluetooth details from the app, the SDK team has disabled the Location and Bluetooth settings to not reflect in the tracked data. Is this behaviour creating any conflict with the UIAlertController and logging the crash? Because by default the OS tries to show the alert when the permissions exist in the plist file, but the alert will not come as the service is disabled on the SDK server settings. Is this creating any conflict and logging the crash. Please extend your help.
Posted
by
Post not yet marked as solved
0 Replies
29 Views
When I try to create 1.1 (which is a new version), I get the following message: Additionally, if I try to create another version, let's say 1.1.1 or 2.0, I just get same error. When inspecting the call, this is the result: { "errors" : [ { "id" : "48d65ae9-b7d5-44cb-85a6-b7295202f13b", "status" : "409", "code" : "ENTITY_ERROR.RELATIONSHIP.INVALID", "title" : "The provided entity includes a relationship with an invalid value", "detail" : "You cannot create a new version of the App in the current state.", "source" : { "pointer" : "/data/relationships/app" } } ]
Posted
by
Post not yet marked as solved
2 Replies
111 Views
Using the latest stable macOS/iPadOS/Xcode: macOS 14.5 (23F79) iPadOS 17.5 (21F84) Xcode 15.4 (15F31d) We're unable to deploy to the new iPad Pro devices. This applies to newly created empty projects as well. We receive the following message: The developer disk image could not be mounted on this device.. Error mounting image: 0xe8000105 (kAMDMobileImageMounterTATSUDeclinedAuthorization: The server declined to authorize this image on this device for this user.) We've tried every suggestion we can find online: Restarting everything Reinstalling everything rm -rf ~/Library/Developer/DeveloperDiskImages/ Turning on/off Developer Mode. Using various internet connection methods (to sidestep potential routing/firewall issues) It happens across all our developer accounts we've tried 5+, and all iPads tried thusfar (around 5).
Posted
by
Post not yet marked as solved
0 Replies
40 Views
I have added an "App Intents Extension" target to my main application in macOS. This generated the below two files: TWAppIntent.swift import AppIntents struct TWAppIntent: AppIntent { static var title: LocalizedStringResource = "TWAppIntentExtension" static var parameterSummary: some ParameterSummary { Summary("Get information on \(\.$TWType)") } //launch app on running action static var openAppWhenRun: Bool = true // we can have multiple parameter of diff types @Parameter(title: "TWType") var TWType: String func perform() async throws -> some IntentResult & ReturnsValue<String> & ProvidesDialog { return .result(value: TWType, dialog: "Logged break.") } } TWAppIntentExtension.swift import AppIntents @main struct TWAppIntentExtension: AppIntentsExtension { } I m able to build the extension target and I my intent action is available in the shortcuts app. However, on launching a shortcut with the above created intent action. I m getting the below popups: I have identified what is causing this error. Setting the openAppWhenRun to true is causing this error. I don't get this when it is set to false. This property is supposed to launch the application, but can someone help me understand why is it happening? This is only causing the error when using this property for AppIntent Extension and not for In app handling for the AppIntent. Can we not launch our application from AppIntent extension?
Posted
by
Post not yet marked as solved
0 Replies
12 Views
Hi, Since iOS 17, when setting weight on a SCNMorpher, the normals become completely wrong. As you can see below it only happens when there are vertices along an edge. Has anyone encountered that problem and found a solution? Thanks Reported: FB13798652
Posted
by
Wal
Post not yet marked as solved
0 Replies
54 Views
How is it possible to add a schema for ar to a usd file using the python tools (or any other way). Following the instructions in: https://developer.apple.com/documentation/arkit/arkit_in_ios/usdz_schemas_for_ar/actions_and_triggers/preliminary_behavior The steps are to have the following declaration: class Preliminary_Behavior "Preliminary_Behavior" ( inherits = </Typed> ) and a usd file #usda 1.0 def Preliminary_Behavior "TapAndFlip" { rel triggers = [ <Tap> ] rel actions = [ <Entry> ] def Preliminary_Trigger "Tap" ( inherits = </TapGestureTrigger> ) { rel affectedObjects = [ </Cube> ] } def Preliminary_Action "Entry" ( inherits = </GroupAction> ) { uniform token type = "parallel" rel actions = [ <Flip> ] } def Preliminary_Action "Flip" ( inherits = </EmphasizeAction> ) { rel affectedObjects = [ </Cube> ] uniform token motionType = "flip" } } def Cube "Cube" { } How do these parts fit together? I saved the usda file, but it didn't have any interactions. Obviously, I have to add that declaration, but how do I do this? is this all in an AR Xcode project? Or can I do this with python tools (I would prefer something very lightweight).
Posted
by
Post not yet marked as solved
0 Replies
55 Views
I have some usdz files saved and I would like to make thumbnails for them in 2D of course. I was checking Creating Quick Look Thumbnails to Preview Files in Your App but it says Augmented reality objects using the USDZ file format (iOS and iPadOS only) I would like to have the same functionality in my visionOS app. How can I do that? I thought about using some api to convert 3d asset into 2d asset, but it would be better If I could do that inside the Swift environment. Basically I wanna do Image(uiImage: "my_usdz_file")
Posted
by
Post not yet marked as solved
0 Replies
51 Views
HI there, I would like for the user to be able to tap on a wall that has been highlighted as scanned (the white outline) and see basic information about the wall (in a pop up view modal) without being taken out of the scan session. As a first step though i'd simply like to be able to tap on the scanned wall whilst still in the session and see in the NSLog, the data about that CapturedRoom.Surface. I'm storing the CapturedRoom on update of the sesssion using the RoomCaptureSessionDelegate and I have added a UITapGestureRecognizer to the room capture view. However i've tried a number of ways (hit testing, raycasting) and i'm unable to target the wall behind the users tap gesture. If anyone can give any advice even if just the principal of how to achieve this.
Posted
by
Post not yet marked as solved
0 Replies
56 Views
I've run into a problem related to navigation links in child Views containing a SwiftData @Query and a predicate. When tapping on a NavigationLinks, the containing View is invalidated pausing the UI. When tapping back, the View is invalidated a second time during which time the View ignores any new taps for navigation leading to a poor user experience. A complete example: import SwiftUI import SwiftData @Model final class Item { var num: Int init(num: Int) { self.num = num } } @main struct TestSwiftDataApp: App { var sharedModelContainer: ModelContainer = { let schema = Schema([Item.self]) let modelConfiguration = ModelConfiguration(schema: schema, isStoredInMemoryOnly: true) let container: ModelContainer do { container = try ModelContainer(for: schema, configurations: [modelConfiguration]) } catch { fatalError("Could not create ModelContainer: \(error)") } // Add some sample data Task { @MainActor in for i in 0...1000 { container.mainContext.insert(Item(num: i)) } } return container }() var body: some Scene { WindowGroup { ContentView() } .modelContainer(sharedModelContainer) } } extension Color { static func random() -> Color { Color(red: .random(in: 0...1), green: .random(in: 0...1), blue: .random(in: 0...1)) } } struct ContentView: View { var body: some View { NavigationStack { SubView() .navigationDestination(for: Item.self) { item in Text("Item at \(item.num)") } } } } struct SubView: View { @Environment(\.modelContext) private var modelContext @Query(filter: #Predicate<Item> { item in item.num < 20 }, sort: \.num) private var items: [Item] var body: some View { let _ = Self._printChanges() List { ForEach(items) { item in NavigationLink(value: item) { Text("Item \(item.num)") }.background(Color.random()) } } } } The background colors of cells will shift every invalidation. In addition there's some debugging in there to show what's happening. When running it, I get SubView: @self, @identity, _modelContext, @128, @144 changed. SubView: @self changed. SubView: @dependencies changed. Then I tap on an item and it invalidates: SubView: @self changed. Tapping back invalidates it again during which time the UI ignores new taps: SubView: @self changed. The odd thing is, this behavior doesn't happen if the NavigationStack is moved to the child View with the NavigationLinks like this: struct ContentView2: View { var body: some View { SubView2() } } struct SubView2: View { @Environment(\.modelContext) private var modelContext @Query(filter: #Predicate<Item> { item in item.num < 20 }, sort: \.num) private var items: [Item] var body: some View { let _ = Self._printChanges() NavigationStack { List { ForEach(items) { item in NavigationLink(value: item) { Text("Item \(item.num)") }.background(Color.random()) } } .navigationDestination(for: Item.self) { item in Text("Item at \(item.num)") } } } } When running this, there's one less change as well and no invalidations on tap or back: SubView: @self, @identity, _modelContext, @128, @144 changed. SubView: @dependencies changed. The problem also doesn't happen if the @Query does not have a filter #Predicate. Unfortunately, the application in question has a deeper hierarchy where views with a @Query with a predicate can navigation to other views with a @Query and predicate, so neither solution seems ideal. Is there some other way to stop the invalidations from happening?
Posted
by
Post not yet marked as solved
2 Replies
70 Views
New to Apple development. Vision Pro is the reason I got a developer license and am learning XCode, SwiftUI .... The Vision Pro tutorials seem to use WIFI or the developer strap to connect the Development environment to the Vision Pro. I have the developer strap, but can't use it on my company computer. I have been learning using the developer tools, but I can't test the apps on my personal Vision Pro. Is there a way to generate an app file on the Mac Book that I can download to the Vision Pro? This would be a file that I could transfer to cloud storage and download using Safari to the Vision Pro. I will eventually get a Vision Pro at work, but till then I want to start developing.
Posted
by
Post not yet marked as solved
0 Replies
130 Views
Hello, I want to use universal links in my application, for which I need to get the TeamID and BundleId, for apple-app-site-association file. Can you please tell me, do I have to buy an Apple Developer Account at the time of development to do this, or can I get it all for free at the time of development?
Posted
by
Post not yet marked as solved
1 Replies
63 Views
I have a Developer account with a Developer Role, although apparently without the stated ability to create my own Sandbox ID. So, our company's Administrator is trying to create one for me. But each time he enters a new icloud.com address to create one, he gets the error, "Your Apple ID or password was entered incorrectly." (The example at the above link uses icloud.com, and that seems the natural place to do this. I'm assuming that since you can't actually create an icloud.com email without an Apple ID, that this sandbox creation process should be ok with the email not existing yet.)
Posted
by

TestFlight Public Links

Get Started

Pinned Posts

Categories

See all