Posts

Sort by:
Post not yet marked as solved
0 Replies
11 Views
What interfaces do I use to propagate a CloudKit change in a shared zone to a notification/badge to all participants in the shared zone? Assume I have a 'League' that is the root object in a shared zone and that N Players are members of the league. One of the players, the 'organizer', schedules a 'Game' that is open to any of the players. When the organizer creates the game (in the league's shared zone) and it is mirrored in CloudKit, how can the other players see it (as a timely notification)? I already observe .NSPersistentStoreRemoteChange on NSPersistentStoreCoordinator and NSPersistentCloudKitContainer.eventChangedNotification on NSPersistentCloudKitContainer. Are these delivered in the background? Can/Should they generate a 'local/remote' notification for handling at the AppDelegate level? How? Do I need to use a CKDatabaseSubscription looking for CD_Game records directly? (I'd rather not; because then I'd have a potential race between the remote iCloud database(s) and the local CoreData)
Posted
by
Post not yet marked as solved
0 Replies
8 Views
I need to test my app's in-app purchases and I am having a very difficult time with it. I created a "Sandbox" account in App Store connect. Doing so was very frustrating. It told me multiple times that my password was "too simple", without ever explaining what the password rules are. Then it emailed me something so I could "validate" the account. Luckily I used an actual email address that I can receive mail on. I was expecting I could use any fake address since this is a Sandbox account. After that I started an iOS simulator and tried to log in. It immediately asked me to turn on two-factor authentication. I declined, and then it just said "User name or password is incorrect". I tried a couple more times, then I went back and actually turned on the two factor auth. But that didn't solve the problem. I still cannot log in. Can someone explain what I'm doing wrong here?
Posted
by
Post not yet marked as solved
0 Replies
17 Views
HI all need urgent help here, so I have configured my router (enterprise company router) a hotspot and this as normal process, now, I am having difficult time for apple product to redirect this captive portal I configured, seems windows Android device directs me to the login page I need to be connected and then I register my credentials for internet use. when using apple products, I connect to the same hotspot but nothing happens the redirection does not havppens on Https ? if I put the whole https address in my safari while connected to the hotspot that takes me to where I need to be but It wont redirect as the other products I have tried to reset browser both Iphone 15 pro max 17.3.1 and MacBook Pro 14.3.1 If I use https://abcde.companywifi.com/portal?GatewayID=145&proto=https it will not work because it has the https in it? If I use without the https and just http://abcde.companywifi.com/portal?GatewayID=145 that works fine and auto directs as soon as I am connected to the hotspot but I dont want that I want secure connection and has to be Https connection
Posted
by
Post not yet marked as solved
0 Replies
23 Views
Hi I wanted to know how to get an error log of an app I am trying through test flight in the Vision Pro
Posted
by
Post not yet marked as solved
0 Replies
34 Views
I'm trying to get started working with volumes for the Vision Pro. Making use of the tutorials and provided assets. But in simulator, on device and in the XCode preview the volumes are always strangely huge, like double what is required in each dimension. Even the initial project template is like this, looking quite different from what is in the tutorial videos. There is also a full panel backing the volume, where the tutorial suggests this code should produce a background just behind the buttons. Aside from changing the sphere to a cube and adding .previewLayout(.sizeThatFits) as per the tutorial, this is the template: Did I miss something crucial here? I want/expect the volume to be roughly the size of the bounding box of the cube, plus a little for the button. (usually a Unity dev, newb to Swift.)
Posted
by
Post not yet marked as solved
0 Replies
18 Views
Hi, I am building a List with a list of files saved in my app. I also want this to accept drops of multiple types of files (images, audio, PDFs, Excel, Pages etc) ... basically anything that be dragged-and-dropped from the iOS system or apps like Mail, iCloud Drive etc. I'm trying to find a good way to handle this. The best I've come across is adding the onInsert option to accept UTTypes, like this: List { ... } .onInsert(of: [UTType.data], perform: dropAction) But now I'm not sure how I can load the object that was dropped here. From some examples I've seen, If I registered the UTType.image instead, I could load it in the dropAction handler like this: item.loadObject(ofClass: UIImage.self) { image, _ in DispatchQueue.main.async { print("Image type dropped") } } But how does that work for 'data' types. Or am I supposed to list out all the data types separately?
Posted
by
Post not yet marked as solved
0 Replies
23 Views
I am trying to communicate with a Java server over TCP, but I'm having issues trying to make the data secure in transit using RSA and AES. The server creates an AES key, encodes it in utf8, and sends it to the IOS Client, where it should be decoded back into a byte array as a Data object. Then, Using the Cryptokit framework, I try to create a SecKey object from it. I am stumped when trying to do so, though: func createSecKeyFromAESKeyData(aesKeyData: Data) -> SecKey? { // Define the key attributes let keyAttributes: [CFString: Any] = [ kSecAttrKeyClass: kSecAttrKeyClassSymmetric, kSecAttrKeySizeInBits: 128, kSecAttrIsPermanent: false ] // Convert the AES key data into a SecKey object var error: Unmanaged<CFError>? guard let key = SecKeyCreateWithData(aesKeyData as CFData, keyAttributes as CFDictionary, &error) else { if let error = error { print("Error creating SecKey: \(error.takeRetainedValue() as Error)") } else { print("Unknown error creating SecKey") } return nil } return key } Despite setting up my key attribute dictionary with the correct information (AES_128_GCM_SHA256, 128 bits, impermanent) based on how I generate it in the Java code, I keep getting a runtime error at the SecKeyCreateWithData call stating "Unsupported symmetric key type: 4865". I am unsure what this means and how to fix it as there doesn't seem to be any information on it online. If it helps, the Java code is using AES GCM with no padding, and we have confirmed that the data being sent is indeed 128 bits. How can I take this byte array and create a SecKey from it properly so we can pass secure data? Similarly, I have also tried using RSA encryption for some data, but with this method, I generate the key pair on the iOS client and send the parts of the public key to the Java server where it (seemingly correctly) created the cipher from the passed data. However, trying to send anything encrypted back resulted in "RSAdecrypt wrong input (err -27)" when decrypting: func decryptAESKey(encryptedKeyData: Data, privateKey: SecKey) -> Data? { // Decrypt the received AES key using the private key var error: Unmanaged<CFError>? guard let decryptedKeyData = SecKeyCreateDecryptedData(privateKey, .rsaEncryptionOAEPSHA256, encryptedKeyData as CFData, &error) as Data? else { print("Error decrypting AES key:", error!.takeRetainedValue() as Error) return nil } return decryptedKeyData } Any assistance in figuring out how to properly use SecKeys in these ways would be greatly appreciated. Additionally, the relevant Java code can be provided if necessary.
Posted
by
Post not yet marked as solved
0 Replies
23 Views
Can you use View with Transferable View in the one WindowGroup to another ImmersiveSpace with RealityView? I can drag, but the drop event isn't captured when with RealityView var body: some View { let droppable = Droppable( model: model ) RealityView { content in // Add the initial RealityKit content content.add(floorEntity) } .onDrop( of: ... // or .dropDestination( For ... {} //or .gesture( DragGesture() .targetedToAnyEntity() .onChanged({ value in none of them triggers the drop
Posted
by
Post not yet marked as solved
0 Replies
27 Views
If a server is sending a push to an app, then how can it know whether it should be sending the push using the Apple sandbox push server, or the production server? If the app is on the app store or testflight then it needs to be using the sandbox server, but if the app is being run via XCode interactively as devs are developing/testing then the push needs to be sent via the sandbox server. But the server itself has no idea if the app was installed via Testflight/app store/XCode/ or a development .ipa. So the server can't know how to send the push. The app has to send the push token to the server anyway, so the app could inform the server which environment it should be sent over. But then how can the app detect that itself? A naive answer is to use #ifdef DEBUG to detect this, but that is incorrect. Which environment a push should be sent over is not correlated with that. For example an app could be being run with a debug scheme or a release scheme, but in both cases if the app is installed/running via xcode then the push environment has to be the sandbox. So my question is, is there a way the app can detect which push environment a push should be sent over in order than it can instruct the server accordingly?
Posted
by
Post not yet marked as solved
0 Replies
31 Views
I’ve noticed that audio is locked into position with builds. It sometimes comes out the left ear, other times the right. I occasionally get it working with both, but the audio isn’t moving with head tracking. I've seen other reports of this issue in the Unity support forums too. Any ideas on how to fix this? Its being reported in my app reviews as a negative.
Posted
by
Post not yet marked as solved
0 Replies
24 Views
I am currently implementing an upload flow that utilizes a URLSession with a background configuration to allow the upload to continue running when the application is suspended or terminated by the system. When the upload has completed, and the app is launched/woken up in the backend to respond to the upload task result, I need to make an additional data request to inform the backend that the upload has completed to trigger additional work. I am attempting to do this by making the data request and waiting for it to finish before calling the background events completion handler delivered to the AppDelegate. However, the data request never completes while in the background, but will receive a result when the app is brought to the foreground. Often the result of this data request will be a failure: Error Domain=NSURLErrorDomain Code=-997 "Lost connection to background transfer service" or Error Domain=NSURLErrorDomain Code=-999 "canceled" I understand that a URLSession with a background configuration will reject data tasks when the app is suspended or terminated. However, I am attempting to use a non-background configured network session for the data request while the application is running in the background, before the application is suspended again. Is it not possible to make additional data requests when the app is launched/woken up in the background after a background upload is completed?
Posted
by
Post not yet marked as solved
0 Replies
28 Views
I had a couple of questions someone could help me with, as I’m trying to do a little research for my team before they do a bunch of coding. We’re building an anywhere-to-anywhere encrypted file transfer app and wrestling currently with our share functionality. Currently, our users log into their app on their phone, and: within the application use a file picker to select files/photos and then select a destination that they pick from a permission-ed list. However, we really would like to also add the workflow where the user opens the photos or files app, finds a picture/file and then uses the share functionality to pass the object into the application, then The application launches, allowing the user to log into the app, then they pick from a list of permission-ed drop targets within the app and send the object In doing some research this morning regarding sharing files/pictures within our application, I found this thread Eskimo had more or less advised against what we intended to do: https://developer.apple.com/forums/thread/114485 We don’t want to save session tokens because of security concerns; we’re concerned primarily with third-party actors (governments primarily) having access to encryption keys. Is there a best-practice way for my team to open the app we're building and then passing the files/photos into our application? Does anyone have any advice on how to securely launch the application and pass the file/pic into the app given the constraints? Thanks!
Posted
by
Post not yet marked as solved
2 Replies
43 Views
I feel like I’m going nuts. I understand the concept of direct versus indirect gestures. I can make entities with targeted indirect gestures all day long. Piece of cake. All I want to do is figure out how to add a DIRECT gesture to an entity so that I can detect a user touch on an object. Apples docs provide a nice video of knocking over cubes and what direct gestures typically do, but I can find zero gesture documentation that actually speaks to implementation?!??? Just hoping someone out there can point ***** me at a sample, class, anything, that says “here’s how to implement a direct gesture in visionOS”? Thanks much!
Posted
by
Post not yet marked as solved
0 Replies
27 Views
Note: I'd like the solution to work for iOS 15 as well. With the following implementation, tapping on the stepper from iPhone (iOS 15.8 (physical device) as well as iOS 17.2 (simulator and canvas)) presents ModalView, instead of changing the stepper's value as one would expect. It's a somewhat real-life example but still basic, as I felt that having a view with just a stepper would have made the problem unrealistically easy. struct CategoryView: View { @State private var modalIsPresented = false @State private var stepperValue = 0 var body: some View { List { StepperRow(value: self.$stepperValue) .onTapGesture { modalIsPresented = true } } .sheet(isPresented: $modalIsPresented) { modalIsPresented = false } content: { ModalView() } } } struct StepperRow: View { @Binding var value: Int var body: some View { VStack(alignment: .leading) { Stepper( "\(value) Name of the article", value: $value, in: 0...Int.max ) Text("Item description, which could be long and I'd like to go under the stepper.") .font(.caption) } } } What doesn't work: setting the stepper's style to .plain or BorderlessButtonStyle(), as might work for a button. The following code is a working solution, though it's ugly. struct CategoryView: View { @State private var stepperValue = 0 var body: some View { List { StepperRow(value: self.$stepperValue) } } } struct StepperRow: View { @Binding var value: Int @State private var modalIsPresented = false var body: some View { ZStack(alignment: .leading) { VStack(alignment: .leading) { HStack { Text("\(value) Name of the article") Spacer() Stepper( "", value: $value, in: 0...Int.max ) .labelsHidden() .hidden() } Text("Item description, which could be long and I'd like to go under the stepper.") .font(.caption) } .onTapGesture { modalIsPresented = true } VStack(alignment: .leading) { HStack { Text("\(value) Name of the article") .hidden() Spacer() Stepper( "", value: $value, in: 0...Int.max ) .labelsHidden() } Text("Item description, which could be long and I'd like to go under the stepper.") .font(.caption) .hidden() } } .sheet(isPresented: $modalIsPresented) { modalIsPresented = false } content: { ModalView() } } } Basically I've put the stepper above the view to which I've added the onTapGesture recognizer, but to do so I had to duplicate the view code, so that everything laid out correctly, and hide the appropriate subviews, so that VoiceOver would ignore the duplicates, and also because it felt right. Can anyone come up with a better solution?
Posted
by
Post not yet marked as solved
0 Replies
31 Views
My matter accessory define an endpoint of type light, with a custom cluster. if I connect my accessory using Home app, I'm I supposed to find HMService/HMCharacteristic corresponding to my custom matter cluster? Is there any requirement on the custom cluster to have it visible in HomeKit ? Thanks.
Posted
by
Post not yet marked as solved
0 Replies
30 Views
Hello, I am working on the Musickit web browser application. I have created my developer token as mentioned in the documentation. When I call the authorize() method to authenticate, I get the Apple Music pop up as expected. However, after entering the user credentials and "allowing" access, I get the following error: POST https://play.itunes.apple.com/WebObjects/MZPlay.woa/wa/webPlayerLogout 403 (Forbidden) musickit.js:28 Uncaught (in promise) AUTHORIZATION_ERROR: Unauthorized at https://js-cdn.music.apple.com/musickit/v3/musickit.js:28:269512 at Generator.next () at asyncGeneratorStep$u (https://js-cdn.music.apple.com/musickit/v3/musickit.js:28:266594) at _next (https://js-cdn.music.apple.com/musickit/v3/musickit.js:28:266821) I am using an user account with paid subscription to Apple Music. With the JWT created, I am able to make API calls and receive the response for requests that do that need the userToken. I am currently stuck at this step and would like some help to root cause this issue.
Posted
by
Post not yet marked as solved
0 Replies
27 Views
I can't seem to get any hand tracking working in the simulator. And it will fail to launch webXR requesting hand tracking. So I can't test any controls in it. How is it possible to test controls in WebXR ? Any of these should work https://threejs.org/examples/?q=xr#webxr_vr_handinput_pressbutton
Posted
by
Post not yet marked as solved
1 Replies
34 Views
Hi All, I have this code and I would like to send the payload of the completed purchase to my server. How to do that? Regards Thomas S ` SubscriptionStoreView(...) .onInAppPurchaseCompletion { product, result in if case .success(.success(let transaction)) = result { print("Purchased successfully: \(transaction.signedDate)") // this looks good in Xcode // Pass payload of transaction to my server let url = URL(string: "... my server ...")! var request = URLRequest(url: url) request.httpMethod = "POST" request.httpBody = ???? // how do I pass the payload of the transaction to the httpBody request.setValue("application/json", forHTTPHeaderField: "Content-Type") let task = URLSession.shared.dataTask(with: request) { data, response, error in let statusCode = (response as! HTTPURLResponse).statusCode if statusCode == 200 { print("SUCCESS") } else { print("FAILURE") } } task.resume() } else { print("Something else happened") } } `
Posted
by

TestFlight Public Links

Get Started

Pinned Posts

Categories

See all