Post

Replies

Boosts

Views

Activity

Reply to SwiftUI @State var not sync in .popover
Really strange. Not sure of the explanation, but looks like the VStack is not reevaluated when popover is called. But, if added a Text in the VStack, and it works OK. VStack is reevaluated. var body: some View { VStack { Button("xxxx") { print("Button") visableHiddenMenu = true print("visableHiddenMenu \(visableHiddenMenu)") visable.toggle() } .popover(isPresented: $visable) { VStack { let _ = print("visableHiddenMenu2 \(visableHiddenMenu)") Text("Popover presented \(visableHiddenMenu)") } .onAppear { print("appear \(visableHiddenMenu)") visableHiddenMenu = visableHiddenMenu } } Text("Popover visible \(visableHiddenMenu)") } .padding() } In log: Button visableHiddenMenu true visableHiddenMenu2 true appear true visableHiddenMenu2 true Note that visableHiddenMenu2 true appears twice, showing Stack is reevaluated. PS: what is the purpose of line 19 ?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’25
Reply to accedentlyy deleted info.plist
Hope you have a recent backup somewhere. You should. To create an info.plist: In Xcode, File > File > File from template (or cmd N) select Property List in Resource section name it info (Info.plist) Then populate it as needed. Typical content, in source code format: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>$(DEVELOPMENT_LANGUAGE)</string> <key>CFBundleDisplayName</key> <string>YourAppName</string> <key>CFBundleExecutable</key> <string>$(EXECUTABLE_NAME)</string> <key>CFBundleIdentifier</key> <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> <key>CFBundleInfoDictionaryVersion</key> <string>1.0</string> <key>CFBundleName</key> <string>$(PRODUCT_NAME)</string> <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> <string>$(MARKETING_VERSION)</string> <key>CFBundleVersion</key> <string>$(CURRENT_PROJECT_VERSION)</string> <key>ITSAppUsesNonExemptEncryption</key> <false/> <key>LSRequiresIPhoneOS</key> <true/> <key>NSCameraUsageDescription</key> <string>Text to authorise camera access.</string> <key>NSPhotoLibraryUsageDescription</key> <string>Text to authorise album access.</string> <key>UIApplicationSceneManifest</key> <dict> <key>UIApplicationSupportsMultipleScenes</key> <true/> <key>UISceneConfigurations</key> <dict> <key>UIWindowSceneSessionRoleApplication</key> <array> <dict> <key>UISceneConfigurationName</key> <string>Default Configuration</string> <key>UISceneDelegateClassName</key> <string>$(PRODUCT_MODULE_NAME).SceneDelegate</string> <key>UISceneStoryboardFile</key> <string>Main</string> </dict> </array> </dict> </dict> <key>UILaunchStoryboardName</key> <string>LaunchScreen</string> <key>UIMainStoryboardFile</key> <string>Main</string> <key>UIRequiredDeviceCapabilities</key> <array> <string>armv7</string> </array> <key>UISupportedInterfaceOrientations</key> <array> <string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeRight</string> <string>UIInterfaceOrientationPortraitUpsideDown</string> </array> <key>UISupportedInterfaceOrientations~ipad</key> <array> <string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationPortraitUpsideDown</string> <string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeRight</string> </array> </dict> </plist>
Jun ’25
Reply to Software Updates
Do you want to upgrade or downgrade (from which version ?) If your device supports iOS 15, settings > General > Software update will give you access to upgrade. So, what is precisely the problem ?
Topic: Community SubTopic: Apple Developers Tags:
Jun ’25
Reply to App Rejected (4.3.0 Design Spam) (I'm a iOs developer since 2009 and this is the first time)
There are several reasons for 4.3 rejection, some are not spam by itself but overcrowded category. b) Also avoid piling on to a category that is already saturated;… We will reject these apps unless they provide a unique, high-quality experience. Searching on the AppStore, one can see there are a lot of puzzle games. So may be that's just the reason. If so, have you arguments to convince reviewer that your app creates a unique, high-quality experience ?
Jun ’25
Reply to Question about `UITextField`'s `markedTextRange` when handling Korean input
You should probably count for unicodeScalars.count, as described in Xcode doc about Character. Because each character in a string can be made up of one or more Unicode scalar values, the number of characters in a string may not match the length of the Unicode scalar value representation or the length of the string in a particular binary representation. print("Unicode scalar value count: \(greeting.unicodeScalars.count)") // Prints "Unicode scalar value count: 8" print("UTF-8 representation count: \(greeting.utf8.count)") // Prints "UTF-8 representation count: 11" So change to func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { guard let text = textField.text else { return true } return text.unicodeScalars.count <= 5 }
Topic: UI Frameworks SubTopic: UIKit Tags:
Jun ’25
Reply to Horrendous Swift overlay of vDSP Fourier Transform functions
I had to refresh my mind on FFT. Found this interesting reference, may be of interest for those of us who need as well. https://www.analog.com/media/en/technical-documentation/dsp-book/dsp_book_Ch31.pdf
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jun ’25
Reply to SwiftUI @State var not sync in .popover
Really strange. Not sure of the explanation, but looks like the VStack is not reevaluated when popover is called. But, if added a Text in the VStack, and it works OK. VStack is reevaluated. var body: some View { VStack { Button("xxxx") { print("Button") visableHiddenMenu = true print("visableHiddenMenu \(visableHiddenMenu)") visable.toggle() } .popover(isPresented: $visable) { VStack { let _ = print("visableHiddenMenu2 \(visableHiddenMenu)") Text("Popover presented \(visableHiddenMenu)") } .onAppear { print("appear \(visableHiddenMenu)") visableHiddenMenu = visableHiddenMenu } } Text("Popover visible \(visableHiddenMenu)") } .padding() } In log: Button visableHiddenMenu true visableHiddenMenu2 true appear true visableHiddenMenu2 true Note that visableHiddenMenu2 true appears twice, showing Stack is reevaluated. PS: what is the purpose of line 19 ?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’25
Reply to accedentlyy deleted info.plist
Hope you have a recent backup somewhere. You should. To create an info.plist: In Xcode, File > File > File from template (or cmd N) select Property List in Resource section name it info (Info.plist) Then populate it as needed. Typical content, in source code format: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>$(DEVELOPMENT_LANGUAGE)</string> <key>CFBundleDisplayName</key> <string>YourAppName</string> <key>CFBundleExecutable</key> <string>$(EXECUTABLE_NAME)</string> <key>CFBundleIdentifier</key> <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> <key>CFBundleInfoDictionaryVersion</key> <string>1.0</string> <key>CFBundleName</key> <string>$(PRODUCT_NAME)</string> <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> <string>$(MARKETING_VERSION)</string> <key>CFBundleVersion</key> <string>$(CURRENT_PROJECT_VERSION)</string> <key>ITSAppUsesNonExemptEncryption</key> <false/> <key>LSRequiresIPhoneOS</key> <true/> <key>NSCameraUsageDescription</key> <string>Text to authorise camera access.</string> <key>NSPhotoLibraryUsageDescription</key> <string>Text to authorise album access.</string> <key>UIApplicationSceneManifest</key> <dict> <key>UIApplicationSupportsMultipleScenes</key> <true/> <key>UISceneConfigurations</key> <dict> <key>UIWindowSceneSessionRoleApplication</key> <array> <dict> <key>UISceneConfigurationName</key> <string>Default Configuration</string> <key>UISceneDelegateClassName</key> <string>$(PRODUCT_MODULE_NAME).SceneDelegate</string> <key>UISceneStoryboardFile</key> <string>Main</string> </dict> </array> </dict> </dict> <key>UILaunchStoryboardName</key> <string>LaunchScreen</string> <key>UIMainStoryboardFile</key> <string>Main</string> <key>UIRequiredDeviceCapabilities</key> <array> <string>armv7</string> </array> <key>UISupportedInterfaceOrientations</key> <array> <string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeRight</string> <string>UIInterfaceOrientationPortraitUpsideDown</string> </array> <key>UISupportedInterfaceOrientations~ipad</key> <array> <string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationPortraitUpsideDown</string> <string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeRight</string> </array> </dict> </plist>
Replies
Boosts
Views
Activity
Jun ’25
Reply to Capturing self instead of using self. in switch case in DispatchQueue causes compiler error
Bug corrected in Xcode 26ß. I closed the bug report. Thanks to all.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jun ’25
Reply to Deleting a post not possible
You have to ask to moderator. One way may be to mark your own post as Duplicate.
Replies
Boosts
Views
Activity
Jun ’25
Reply to SwiftUI TextField corrupts selection when inserting utf16
I did my tests on MacOS 15.5 with Xcode 16.4 and simulator 18.4. Could not see the issue there. So bug report is best way to go on now.
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Jun ’25
Reply to Xcode 26 is amazing?!?!
Refreshing to read such positive comments. Enjoy.
Replies
Boosts
Views
Activity
Jun ’25
Reply to Software Updates
Do you want to upgrade or downgrade (from which version ?) If your device supports iOS 15, settings > General > Software update will give you access to upgrade. So, what is precisely the problem ?
Topic: Community SubTopic: Apple Developers Tags:
Replies
Boosts
Views
Activity
Jun ’25
Reply to Xcode26.0 beta has a compilation error
I tested both in Xcode 16.4 and 26ß. No error, except for line 69, I had to change to: label.textColor = UIColor(named: "#666666") Could you post the code where you use songNameLabel or artistName ?
Topic: UI Frameworks SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jun ’25
Reply to Grid right to left
I did not find anything native. But hope this helps: https://stackoverflow.com/questions/69844570/is-it-possible-to-modify-the-position-of-items-in-a-lazyvgrid-lazyhgrid-swiftui
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’25
Reply to App Rejected (4.3.0 Design Spam) (I'm a iOs developer since 2009 and this is the first time)
There are several reasons for 4.3 rejection, some are not spam by itself but overcrowded category. b) Also avoid piling on to a category that is already saturated;… We will reject these apps unless they provide a unique, high-quality experience. Searching on the AppStore, one can see there are a lot of puzzle games. So may be that's just the reason. If so, have you arguments to convince reviewer that your app creates a unique, high-quality experience ?
Replies
Boosts
Views
Activity
Jun ’25
Reply to Issue with Animations Blocking Taps in UIView Toasts (SwiftUI + Separate UIWindow)
Could you post the relevant code for animation (to avoid the need to download the whole project). Did you enable userInteraction (allowUserInteraction)? See details here: https://stackoverflow.com/questions/7337363/how-to-recognize-tap-gesture-while-a-view-is-animating
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Jun ’25
Reply to My app has been waiting for the review status
May be some reviewers are busy preparing for WWDC25. Hence extended delays.
Replies
Boosts
Views
Activity
Jun ’25
Reply to Question about `UITextField`'s `markedTextRange` when handling Korean input
You should probably count for unicodeScalars.count, as described in Xcode doc about Character. Because each character in a string can be made up of one or more Unicode scalar values, the number of characters in a string may not match the length of the Unicode scalar value representation or the length of the string in a particular binary representation. print("Unicode scalar value count: \(greeting.unicodeScalars.count)") // Prints "Unicode scalar value count: 8" print("UTF-8 representation count: \(greeting.utf8.count)") // Prints "UTF-8 representation count: 11" So change to func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { guard let text = textField.text else { return true } return text.unicodeScalars.count <= 5 }
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Jun ’25
Reply to Contact owner of app?
If you search for the app on the AppStore, in the Information section, tap on Supplier. You will get all info: address in Singapore telephone email That should be enough to get contact.
Replies
Boosts
Views
Activity
Jun ’25