Posts

Post not yet marked as solved
2 Replies
69 Views
I have added a button in UIController: let button = UIButton(type: .custom) button.setTitle("test", for: .normal) button.addTarget(self, action: #selector(addToSiri), for: .touchUpInside) self.view.addSubview(button) Then using it in SwiftUI HStack { Controller() }.frame(maxWidth:.infinity, idealHeight: 60) And then using swiftUI in UIHostingController: let vc = UIHostingController(rootView: SwiftUIView()) But when I tap the button, the addToSiri is never called. I don't know why.
Posted
by WWWang.
Last updated
.
Post not yet marked as solved
0 Replies
68 Views
I have pushed an UIHostingController which contains SwiftUI and set the navigationBar hidden: class CoverVC : UIHostingController<AnyView>{ public init(shouldShowNavigationBar: Bool, rootView: ICloudSyncView) { super.init(rootView: AnyView(rootView.navigationBarHidden(!shouldShowNavigationBar))) self.navigationController?.interactivePopGestureRecognizer?.delegate = self } @objc required dynamic init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } } extension CoverVC: UIGestureRecognizerDelegate { func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldBeRequiredToFailBy otherGestureRecognizer: UIGestureRecognizer) -> Bool { return true } } But the InteractivePopGestureRecognizer is disabled. How can I to solve this?
Posted
by WWWang.
Last updated
.
Post not yet marked as solved
0 Replies
87 Views
I'm using core data in app, widget extension and intent, but I found the data is not updated between targets. such as I added a new record in app, the widget is not updated unless remove the widget and re-add it. I added a new record in intent, the data in app is not updated unless I run the app again. I have set container.viewContext.automaticallyMergesChangesFromParent = true but it doesn't work. So how can I make the data is updated no matter it is modified any targets.
Posted
by WWWang.
Last updated
.
Post not yet marked as solved
0 Replies
112 Views
I'm using CoreData+CloudKit. It works fine in development, so I deployed to production. But I cannot see the data in CloudKit DataBase in a testflight version. I don't know where I missed. Can I just run in Release mode to check it works?
Posted
by WWWang.
Last updated
.
Post not yet marked as solved
0 Replies
219 Views
I have copied an sqlite file from document to app group container. I found that if I delete the app and reinstall, the file is automatically created. How is that happed? The app group container is not just a folder and can be synchronized by iCloud? I cannot find any informations about the feature. If there is, please show me the link, thanks
Posted
by WWWang.
Last updated
.
Post not yet marked as solved
0 Replies
303 Views
I wanna add an intents app extension on iOS 15, I'm following the link https://toolboxpro.app/blog/adding-shortcuts-to-an-app-1. It works fine when running the extension target on device, but here comes the error "Could not run Make Uppercase,There was a problem with the app" when I running the main target. There is no exception or breakpoint in Xcode so I don't know what's the problem. Any help will be appreciate, thanks.
Posted
by WWWang.
Last updated
.