Post

Replies

Boosts

Views

Activity

Avoid rotation in a UIViewController with two UIWindow app
Hi, I have an iPhone App with an UIWindowScene and two UIWindow's(mainWindow and alertWindow). In the mainWindow I have the whole app and it is allowed to rotate. The alertWindow is a window to show alert's to the user on the top of the screen and I do not want that the content inside rotate. I thought I may do: override var supportedInterfaceOrientations: UIInterfaceOrientationMask { return .portrait } And override var shouldAutorotate: Bool { return false } In the rootviewcontroller of alertWindow but after doing those changes the rootviewcontroller of mainWindow does not rotate until I do any navigation. I have thought to have two UIWindowScene's (one per UIWindow) but as far I know iPhone app only supports one UIWindowScene. So, how can I avoid rotation in the viewcontroller of alertWindow without losing the rotation on rootviewcontroller of mainWindow? My viewcontroller is a UIHostingController, so I tried also to avoid from my SwiftUI view but I did not find any solution neither. Thank you in advance
3
0
128
Jun ’25
HCE events without SceneDelegate
Dear, Is there any way to handle events from HCE without using UISceneDelegate? I am using this documentation (https://developer.apple.com/documentation/corenfc/nfcwindowsceneevent) but I don't know if there is other way to handle these events from AppDelegate for example. My application is only for iPhone and until now I have not seen the need to use SceneDelegate instead of AppDelegate. Is any way to keep using AppDelegate or I should migrate to SceneDelegate if I want to listen this events? Regards
1
0
327
Feb ’25
CardSession.Error doubts
Hi, I am dealing with CardSession.Error (https://developer.apple.com/documentation/corenfc/cardsession/error) and I have some doubts to force some of them. radiodisabled --> I do not know how reproduce this error. I thought it happen on flight mode but it is does not. Until I know you cannot disable de NFC on iPhone. How can I reproduce? transmissionerror --> I guess it happens when somethings is wrong during the apdu respond. But I have never got, how can it force? emulationStopped --> I try to force by code with stopemulation(status:) but I have not got this error. How I can get it? Which is the difference between accessnotaccepted and systemeligibilityfailed? I think both of them are happening when the user decline the permissions, right? I hope you can help me to solve these doubts. Thank you in advance. Best regards.
1
0
72
Apr ’25