Posts

Sort by:
Post not yet marked as solved
0 Replies
9 Views
Hey there, I'm trying to decode an json with an dynamic dict as value. eg. "results": [ { "id": 1799, "created_at": "2024-05-09T14:21:13.289655Z", "updated_at": "2024-05-10T11:54:25.484537Z", "email": "test@test.testh", "name": "Test", "attributes": { "name": { "firstname": "max", "lastname": "mustermann" }, "anboolen": false, "anNumber": 1, "anString": "Test" } } ] The dictionary "attributes" is always an dictionary but the content inside could be everything. for the container of results I already created an struct and using JSONDecoder to decode, but now I have the issue with the attributes part. Can anyone help me with this issue? Thanks in advance!
Posted
by
Post not yet marked as solved
0 Replies
14 Views
Our app needs to scan QR codes (or a similar mechanism) to populate it with content the user wants to see. Is there any update on QR code scanning availability on this platform? I asked this before, but never got any feedback. I know that there is no way to access the camera (which is an issue in itself), but at least the system could provide an API to scan codes. (It would be also cool if we were able to use the same codes Vision Pro uses for detecting the Zeiss glasses, as long as we could create these via server-side JavaScript code.)
Posted
by
Post not yet marked as solved
0 Replies
20 Views
Hi, I'm looking at being able to set a display colour profile via terminal. I know apps such as SwitchResX are able to change this but i can't figure out how and if it is possible to switch via a terminal command or via a script. This here is what i would like to change. I have googled about and searched through preference files but can't find anything. Any help is much apreciated. Thanks, James
Posted
by
Post not yet marked as solved
0 Replies
18 Views
Because it may be quicker to ask: with a TPP, readData() gets a data size of 0 if the process has finished writing to the network. However, there seems to be no way to find out if it has finished reading from the network, other than to do a .write() and see if you get an error. (I filed a FB about this, for whatever that's worth.) Since the API is flow-based, not socket, it's not possible to tell if the app has set its own timeout. Or exited. So one question I have is: if I do flow.write(Data(count:0)) -- is that a possible way to determine if it's still around? Or will it be interpreted as read(2) returning 0? (Putting this in for testing is difficult, but not impossible -- as I said, this might be the quickest way to find out.)
Posted
by
Post not yet marked as solved
0 Replies
24 Views
Hello everyone, I looked at various methods how to Unit/UITest SwiftData but I couldn't find something simple. Is it even possible to test SwiftData? Does someone found a solution for that?
Posted
by
Post not yet marked as solved
0 Replies
2 Views
I want to implement in-app purchases for my Mac Safari web extension. I can think of two ways: Draw the payment UI in an extension web page, and send a message to the native extension app to call StoreKit code. Open the container app from an extension web page, where the app draws the payment UI. I couldn't make #1 work with either StoreKit 2, which is async, and context.completeRequest(returningItems:) doesn't want to be called in a Task, saying context is not sendable) or StoreKit 1, where calling context.completeRequest(returningItems:) in paymentQueue(_:updatedTransactions:) for some reason doesn't return a response to the extension's web page. I couldn't make #2 work because I couldn't find a way to open the container app from the web extension. I registered a custom URL for my container app, but context.open that url does nothing. Web extensions that use IAP with #2 are available on the Mac app store, so it must be possible, could anyone shed some light on how to open the container app and pass the purchased info to the extension web page even if the container app is not open? Thanks in advance.
Posted
by
Post not yet marked as solved
0 Replies
3 Views
I schedule a local notification to remind me to check in at work at 8 am if I am not already checked in, the code is working fine when app is in foreground, but when I kill the app, it alway show alert no matter if I already checked in or not. func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) { let isCheckedIn = AppManager.shared.isCheckedIn() if isCheckedIn { completionHandler([]) } else { completionHandler([.list, .sound, .banner]) } }
Posted
by
Post not yet marked as solved
0 Replies
41 Views
Hello everyone My goal is to create Apple's activity ring sparkle effect. So I found Paul Hudson's Vortex library. There is already a sparkle effect, but I don't know how to modify it to achieve my goal. Because I'm pretty new to SwiftUI animations. Does anyone have any idea how I could do this? Vortex project: https://github.com/twostraws/Vortex
Posted
by
Post not yet marked as solved
0 Replies
3 Views
Searching for nearby POIs using MKLocalPointsOfInterestRequest has been unsuccessful with error Error Domain=MKErrorDomain Code=5 "(null)" UserInfo={MKErrorGEOError=-10}. Is there any solution?
Posted
by
Post not yet marked as solved
0 Replies
3 Views
Before iOS 17, CTFrameGetLines(ctFrame) returns exact number of lines it will displayed on the screen. However after iOS 17.2.x, under some unknown condition, it returns less CTLines. It's easy to reproduce: let formattedString = NSMutableAttributedString() formattedString.append(.init(string: "你", attributes: [.font: UIFont.boldSystemFont(ofSize: 14)])) formattedString.append(.init(string: "\n\n\n\n\n\n好\n")) let ctSetter = CTFramesetterCreateWithAttributedString(formattedString as CFAttributedString) let rect = CGRect(x: 0, y: 0, width: 100, height: 1000) let bezierPath = UIBezierPath(rect: rect) let ctFrame = CTFramesetterCreateFrame(ctSetter, CFRangeMake(0, formattedString.length), bezierPath.cgPath, nil) let ctLines = CTFrameGetLines(ctFrame) print("CTLine count: \(CFArrayGetCount(ctLines))") The test code above should print CTLine count: 7, but actually it returns 4. One weird CTLine is like: - 1 : <CTLine: 0x3031e0780>{run count = 1, string range = (2, 3), width = 0, A/D/L = 9.24023/2.75977/0, glyph count = 3, runs = ( <CTRun: 0x10173ec50>{string range = (2, 3), string = "\n\n\n", attributes = { NSFont = "<UICTFont: 0x101728800> font-family: \"Helvetica\"; font-weight: normal; font-style: normal; font-size: 12.00pt"; }} ) } never met this issue before, is it a bug or just new feature...
Posted
by
Post not yet marked as solved
0 Replies
3 Views
It gives me error for "import SplineRuntime". It says no such module even if I add the packagies dependencies from github. I tried to rebuild and clean everything but it still gives me this error.
Posted
by
Post not yet marked as solved
0 Replies
6 Views
Hi All, Finder is caching the old application name and not showing the new application. I am deploying my iPad app to M1 Mac by generating a package file. In the newer version of this application, I have changed my application name and deployed the application from backend to user machines. Eventhough application is deployed successfully, the application name still remains the old. I went through the forum and tried the reset the finder cache and launcher service caches, but still the new application name is not coming. But when I uninstall and reinstall the application it is showing the new application name. Can someone suggest a way to reset this using script, as we are deploying the application from backend, we dont have direct access to the client machines Thanks Ranga
Posted
by
Post not yet marked as solved
3 Replies
59 Views
I'm defining a typealias for a set, and then creating an extension for the new typealias. When I do this, I'm getting an odd syntax error. Any/all guidance appreciated. typealias IntSet = Set&lt;Int&gt; extension IntSet { func aFunction() -&gt; Set&lt;String&gt; { let array: [String] = self.map { "\($0)" } return Set(array) } } At the return line, I get the following syntax error: Cannot convert return expression of type 'Set&lt;Int&gt;' to return type 'Set&lt;String&gt;' Even if I replace the return line with the following, I get the same compile error return Set("array")
Posted
by
Post not yet marked as solved
0 Replies
15 Views
When I use "[[UIApplication sharedApplication] setAlternateIconName:iconId completionHandler:nil];" to change the icon, the following exception is thrown. Please tell me how to deal with this problem Error Domain=NSOSStatusErrorDomain Code=-54 "(null)" UserInfo={_LSLine=66,_LSFunction=-[_LSDIconCliend setAlternateIconName:forIdentifier:iconsDictionary:reply:]}
Posted
by
Post not yet marked as solved
0 Replies
39 Views
I am in a weird twilight-zone of a git problem in xcode. I specify some files to be staged and it fails to do with no warning of any sort. So I cannot commit them or apply stashed changes to them. I can do it one.file.at.a.time. I have over 11k intermediate files that .gitignore won't ignore, nor stage nor commit to do anything so I could stop tracking them.
Posted
by
Post not yet marked as solved
0 Replies
34 Views
invalidValue(-nan, Swift.EncodingError.Context(codingPath: [CapturedVolumeCodingKeys(stringValue: "rooms", intValue: nil), _JSONKey(stringValue: "Index 0", intValue: 0), CapturedVolumeCodingKeys(stringValue: "openings", intValue: nil), _JSONKey(stringValue: "Index 0", intValue: 0), CodingKeys(stringValue: "dimensions", intValue: nil), _JSONKey(stringValue: "Index 0", intValue: 0)], debugDescription: "Unable to encode Float.nan directly in JSON.", underlyingError: nil)) Why does this exception occur during encoding? All scan data is CapturedRoom and has not been modified
Posted
by
Post not yet marked as solved
0 Replies
37 Views
Hey A lot of our customers got duplicate push messages twice or more times But we sent only once per push tokens Additionally, devices experiencing the same happens receive similar push messages twice or more from other companies' application This happens is especially reported on devices that have upgraded from iOS 16 to 17. Is there something wrong with the APNS? It
Posted
by
Post not yet marked as solved
1 Replies
48 Views
When using the new currentEntitlementTask ViewModifier to check for the status of a non-consumable IAP when should you call transaction.finish()? Also, since currentEntitlementTask will trigger whenever the app/view is run it will call transaction.finish every time. Is it bad to repeatedly call .finish on a already finished transaction? Currently my app works fine when making purchases and using currentEntitlementTask and @Environment to grant access to the purchased content but I know that all the transactions are unfinished and the docs say you should call transaction.finish() to tell StoreKit that you have given the user access to the content. Thanks for any help/advice here.
Posted
by
Post not yet marked as solved
0 Replies
71 Views
I try ti create a new project but Xcode don't let me do this... The "Next" button doesn't let me to continue.
Posted
by

TestFlight Public Links

Get Started

Pinned Posts

Categories

See all