Posts

Post not yet marked as solved
9 Replies
834 Views
Hello all, RealityKit. visionOS. I have a parent entity (surface in the code below) that I'm adding him a child entity with all the required components for gestures (collision & input target). I'm setting the TapGesture as expected (same for SpatialTapGesture). Result: gesture is not working. Neither the hover effect. The entity is not recognized as a tappable element. However, if I'm adding the child entity to the content and not to the parent entity - everything is working. Enclosed code below for both scenarios. Any idea? Many thanks, Dudi Doesn't work - RealityView { content, attachments in let scene = clonedEntity.clone(recursive: true) ... surface.addChild(scene) // <- Doesn't work } attachments: { ... } .gesture(SpatialTapGesture().targetedToAnyEntity().onEnded { value in openWindow(id: "detailed-window") }) .hoverEffect() Work - RealityView { content, attachments in let scene = clonedEntity.clone(recursive: true) ... content.add(scene) // <- Work } attachments: { ... } .gesture(SpatialTapGesture().targetedToAnyEntity().onEnded { value in openWindow(id: "detailed-window") }) .hoverEffect()
Posted
by DudiSG.
Last updated
.
Post not yet marked as solved
1 Replies
365 Views
Hello all, I'm facing a major bug where all my app's Interactive Widgets stopped working on iOS 17.4 - testing on multi devices and iOS simulators. App Intent + SwiftData. Stopped working totally. Any advice?! Thanks a lot.
Posted
by DudiSG.
Last updated
.
Post not yet marked as solved
1 Replies
296 Views
Hello all, Is there any best practice how it's possible to add native visionOS support for existing app, that already includes WidgetKit extension, where both targets should share some files? "Your target is built for visionOS but contains embedded content built for the iOS platform (WidgetsExtension.appex), which is not allowed" Thanks a lot!
Posted
by DudiSG.
Last updated
.
Post not yet marked as solved
2 Replies
1.8k Views
Hello all, Created and tested successfully auto renewal subscription products in my app. Both products offer 7 days free trial. Once purchased for the first time, isEligibleForIntroOffer value was true and when I tried to subscribe again later, the value is false - everything worked as expected. However, when I reset the eligibility for my sandbox user through the edit subscription screen, I do see that the Free Trial offering becomes available again, as expected, but when I test it in the app, the value for isEligibleForIntroOffer is still false. The value is false for the group (Product.SubscriptionInfo.isEligibleForIntroOffer(for: renewableSubscription.subscriptionGroupID)) and also for the product (renewableSubscription.isEligibleForIntroOffer). iOS 15.4. Is this a bug? Can I still trust this property value as the only source to check whether the user is eligible for intro in production? Thanks a lot.
Posted
by DudiSG.
Last updated
.
Post not yet marked as solved
0 Replies
521 Views
Hello to team, I have a very challenging issue that I'm not able to fix. I have an app that works with SwiftData Model Container that is generated when the app is launched. In the app I also added a Demo Mode area, where the user can load a mock data and simulating app behavior with more data. In order to switch to demo mode, I'm loading new UI layer and loading a new model container, which is configured to work with the same scheme, but isStoredInMemoryOnly = true. Everything works fine. Now, when the user toggles off the demo mode and go back to the main UI, any persistent changes to the modelContext leads to a crash where it says that the create store is different from the open store. Tried almost everything - I'm not sure even if it's possible to have this flow with SwiftData, butI'm trying. Please advice. Thanks a lot!
Posted
by DudiSG.
Last updated
.
Post marked as solved
4 Replies
1.8k Views
Hello all, Working on Xcode 15 GA. I'd like to archive my new iOS 17 project, which works properly on iOS and macOS (includes SwiftData library, new WidgetKit extension and StoreKit). However, when I'm trying to archive the project (either for iOS or macOS) I get an error as follows - "Error opening _.stringsdata for output: File name too long. I tried everything - still happens. When I'm looking inside the build folder, I see that this error probably related to new @__swiftmacro files. Have no idea how to proceed from here. Blocked from distributing my new app. Any idea? Thanks a lot! Dudi
Posted
by DudiSG.
Last updated
.
Post not yet marked as solved
0 Replies
1.1k Views
Hello to the team, Our app (targeting iOS 16) is sharing data between users via CloudKit, and now we'd like to add the new SWCollaborationView feature. I created a CollaborationViewRep: UIViewRepresentable view as follows -     var activityItem: NSItemProvider     var eventName: String     @Binding var isCollaborationViewPresented: Bool     func makeUIView(context: Context) -> SWCollaborationView {         let collaborationView = SWCollaborationView(itemProvider: activityItem)         collaborationView.delegate = context.coordinator         return collaborationView     }     func updateUIView(_ uiView: SWCollaborationView, context: Context) {     }     class Coordinator: NSObject, SWCollaborationViewDelegate {         var parent: CollaborationViewRep         init(_ parent: CollaborationViewRep) {             self.parent = parent         }                  func collaborationViewShouldPresentPopover(_ collaborationView: SWCollaborationView) -> Bool {             return true         }         func collaborationViewWillPresentPopover(_ collaborationView: SWCollaborationView) {         }     }     func makeCoordinator() -> Coordinator {         Coordinator(self)     } } And when I'm trying to add this view as a toolbar item to my SwiftUI view, it doesn't work properly. If I'm adding this view as the toolbar item, without wrap it into a button, then nothing happens when I'm tapping the view (as it should work on UIKit). If I do wrap it with a button, and present the view as popover, then the view icon is presented and then, only when I tap this popover, the content view is presented (screenshot attached). It feels like this feature is not fully available for SwiftUI, unless I'm missing something. Unfortunately, the documentation is not covering the SwiftUI flow and there is no sample app for reference. Any idea how to best practice this situation? Thanks a lot!
Posted
by DudiSG.
Last updated
.