Post

Replies

Boosts

Views

Activity

Reply to 1 app with 4 different names in 4 different countries' app stores
Welcome on the forum. For iOS, just localise the name that appears on the device's home screen via InfoPlist.strings /* Bundle name */ "CFBundleName" = "MyAppNo"; // In Norway InfoPlist file "CFBundleName" = "MyAppDk"; // In Danish InfoPlist file Get details here: https://stackoverflow.com/questions/10616650/how-to-make-ios-app-name-localizable If that's OK, don't forget to close the thread by marking the answer as correct. Otherwise, explain more in detail what you are looking for. For Android, you should ask on an Android forum.
May ’25
Reply to onReceive(_:perform:) on Frontmost Window Only?
don't even know what this @FocusedBinding guy is. I find this is more and more a problem with SwiftUI. At the beginning, it was made to be very simple (and it is for very simple apps). But with the need to get more flexibility (closer to UIKit), it is now adding a lot of concepts such as @FocusedBinding, to "turn around" the limits of State based architecture. Simplicity has gone. In your case, can't you add a user info, with the ID of the window for instance ? And test in each window if the notification if for itself.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’25
Reply to Checking the contents of a TextField variable method not working
You don't say on which line is the error (are you sure it is in this part of code ?), but this appears wrong for char in charArray { if char != allowed { char is a Character but allowed is probably an array of Character (you don't show much code, so we have to check, which is a bit boring). Correct syntax would be (if I understand correctly your intent and if charArray is effectively an array of Character, which is likely as cards.firstCardLatitude is a String) for char in charArray { if !allowed.contains(char) { If that works, don't forget to close the thread by marking the correct answer ; otherwise show more code.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’25
Reply to Facing the same error
@Brij_iOS25 Seems you are new here, so welcome to the forum. You should read the excellent post of Quinn's on how to properly use the forum, (which is not a social network wall to post one's own feelings, except maybe in forums feedback, but a place to ask questions to other developers). https://developer.apple.com/forums/thread/706527 Have a good day.
Topic: App & System Services SubTopic: StoreKit Tags:
May ’25
Reply to ios 18.5
I fear no one here can tell. So, read carefully the release notes to check if the bug you have in mind is corrected. Did you file a bug report about it ? It would help.
Topic: Community SubTopic: Apple Developers Tags:
May ’25
Reply to Behavior of Drawings in Portrait/Landscape Mode
I tested your code. When rotating, the canvas size changes, but the drawing remains the same. I cannot find immediately in your code what should make the existing drawing scale to the new format. Where is it ? Is it here ? override func draw(_ rect: CGRect) { super.draw(rect) guard let context: CGContext = UIGraphicsGetCurrentContext() else { return } for stroke in Database.strokes { context.setLineCap(.round) context.setLineJoin(.round) context.setLineWidth(2.0) context.setAlpha(1.0) context.setBlendMode(.normal) context.setStrokeColor(UIColor.black.cgColor) context.addPath(stroke.path) context.strokePath() } } But Database.strokes is not scaled on device rotation. Why should the drawing change ? Try to scale Database.strokes when you rotate device, then drawing will adapt.
Topic: UI Frameworks SubTopic: UIKit Tags:
May ’25
Reply to Random crash on app language change from app
Why do you create a new root VC ? You should not. You simply have to: use NSLocalizedString everywhere go to app setting to change the language there For this, I use openSettings: @objc func openSettings() { guard let settingsUrl = URL(string: UIApplication.openSettingsURLString) else { return } if UIApplication.shared.canOpenURL(settingsUrl) { UIApplication.shared.open(settingsUrl, completionHandler: nil) } } It is called from an alert, could be from any button: Here is the alert action okAction = UIAlertAction(title: "any title you want", style: .default, handler: { (action) -> Void in self.openSettings()} )
Topic: UI Frameworks SubTopic: UIKit Tags:
Apr ’25
Reply to Unable to dismiss app's keyboard even after clicking 'Done' button, and it does not hide when the viewController pop
@develop1226 I once experienced a similar problem when I defined shouldChangeCharactersIn(), which discarded return keystroke. Could it be your problem ? If so, you should add this early in shouldChangeCharactersIn() if let char = string.cString(using: String.Encoding.utf8) { let isReturn = strcmp(char, "\\r") if (isReturn == -82) { backSpace = true } }
Topic: Community SubTopic: Apple Developers Tags:
Apr ’25
Reply to Unable to dismiss app's keyboard even after clicking 'Done' button, and it does not hide when the viewController pop
Welcome to the forum. It is UIKit app (not SwiftUI ?) Is it on device or simulator ? You can add this func in your viewController: func textFieldShouldReturn(_ textField: UITextField) -> Bool { self.view.endEditing(true) return false } Tell if it works, then don't forget to close the thread by marking the correct answer. Otherwise, could you show the complete attributes inspector for the TextField ? As well as its connections Inspector panel.
Topic: Community SubTopic: Apple Developers Tags:
Apr ’25