Post

Replies

Boosts

Views

Activity

Reply to iOS 18.1 Backup Bug
These are the Developer Forums, where developers of apps for Apple's platforms ask each other for hints and tips on coding. Your question is more of a product support one, so I'd suggest you ask it over at the Apple Support Forums. Thanks.
Nov ’24
Reply to Update of my app Gunny Rush
You should rethink how you do these releases. You can version an API such that, for example, version 1.0.0 of your app uses version 1 of your API, and any updates to the app also use version 1 up to the point where you need to use version 2 of the API. When that happens your app update will be sent to App Review and will use version 2 of the API. Version 1 will still exist and work for the existing users of the currently-released app, and version 2 will be used with the new app.
Nov ’24
Reply to IOS 18 sucks
Thanks for your comment. Given that these forums are for developers of third-party apps for Apple's OSes - and we aren't actual Apple employees - your comment isn't going to get you anywhere here. You may wish to take your comment to an Apple fansite instead.
Nov ’24
Reply to Xcode basics
Is there a particular reason you've picked C as your first language to learn? You will likely find Swift a much easier language to learn, and it's built right into Xcode. If you're set on C, it's not particularly easy for us to determine why you're getting "Build failed" without seeing your code.
Nov ’24
Reply to Issues with UserDefault boolean
As @MobileTen stated, never store passwords in UserDefaults. You need to use the Keychain. Also, I'm not sure why you need to store something called passcode-reset and passcode-set. The very fact that a password exists means it has been set, and if you're resetting a passcode, then that should be done as part of the journey for the user, not something that needs storing anywhere. In other words, if the user wants to reset their password, ask them for a new one, and save the new password to the keychain. There's no need to store in UDs that you're resetting the password. So, here's how to use the keychain: let userAccount: String = "AuthenticatedUser" let passwordKey: String = "SomeSortOfStringIdentifyingThisIsAPasswordForYourApp" // Choose a relevant value and never change it, as the password is stored against this value func getKeychainPasscode() -> String { return KeychainService.loadPassword(service: passwordKey, account: userAccount) ?? "" } // getKeychainPasscode() will tell you if a password is set. If it returns "" then it hasn't been set. func updatePasscode(_ value: String) { KeychainService.updatePassword(service: passwordKey, account: userAccount, data: value) } // Arguments for the keychain queries let kSecClassValue = NSString(format: kSecClass) let kSecAttrAccountValue = NSString(format: kSecAttrAccount) let kSecValueDataValue = NSString(format: kSecValueData) let kSecClassGenericPasswordValue = NSString(format: kSecClassGenericPassword) let kSecAttrServiceValue = NSString(format: kSecAttrService) let kSecMatchLimitValue = NSString(format: kSecMatchLimit) let kSecReturnDataValue = NSString(format: kSecReturnData) let kSecMatchLimitOneValue = NSString(format: kSecMatchLimitOne) public class KeychainService: NSObject { class func updatePassword(service: String, account: String, data: String) { if let dataFromString: Data = data.data(using: String.Encoding.utf8, allowLossyConversion: false) { // Instantiate a new default keychain query let keychainQuery: NSMutableDictionary = NSMutableDictionary(objects: [kSecClassGenericPasswordValue, service, account], forKeys: [kSecClassValue, kSecAttrServiceValue, kSecAttrAccountValue]) let status = SecItemUpdate(keychainQuery as CFDictionary, [kSecValueDataValue : dataFromString] as CFDictionary) if(status == errSecItemNotFound) { // No existing passcode, so just save the new one savePassword(service: service, account: account, data: data) } else { // Passcode exists, so delete it and save the new one removePassword(service: service, account: account) savePassword(service: service, account: account, data: data) } } } class func removePassword(service: String, account: String) { // Instantiate a new default keychain query let keychainQuery: NSMutableDictionary = NSMutableDictionary(objects: [kSecClassGenericPasswordValue, service, account, kCFBooleanTrue ?? true], forKeys: [kSecClassValue, kSecAttrServiceValue, kSecAttrAccountValue, kSecReturnDataValue]) // Delete any existing items let status = SecItemDelete(keychainQuery as CFDictionary) if(status != errSecSuccess) { if let err = SecCopyErrorMessageString(status, nil) { print("Remove failed: \(err)") } } } class func savePassword(service: String, account: String, data: String) { if let dataFromString = data.data(using: String.Encoding.utf8, allowLossyConversion: false) { // Instantiate a new default keychain query let keychainQuery: NSMutableDictionary = NSMutableDictionary(objects: [kSecClassGenericPasswordValue, service, account, dataFromString], forKeys: [kSecClassValue, kSecAttrServiceValue, kSecAttrAccountValue, kSecValueDataValue]) // Add the new keychain item let status = SecItemAdd(keychainQuery as CFDictionary, nil) // Always check the status if (status != errSecSuccess) { if let err = SecCopyErrorMessageString(status, nil) { print("Write failed: \(err)") } } } } class func loadPassword(service: String, account: String) -> String? { // Instantiate a new default keychain query // Tell the query to return a result // Limit our results to one item let keychainQuery: NSMutableDictionary = NSMutableDictionary(objects: [kSecClassGenericPasswordValue, service, account, kCFBooleanTrue ?? true, kSecMatchLimitOneValue], forKeys: [kSecClassValue, kSecAttrServiceValue, kSecAttrAccountValue, kSecReturnDataValue, kSecMatchLimitValue]) var dataTypeRef: AnyObject? // Search for the keychain items let status: OSStatus = SecItemCopyMatching(keychainQuery, &dataTypeRef) var contentsOfKeychain: String? if(status == errSecSuccess) { if let retrievedData = dataTypeRef as? Data { contentsOfKeychain = String(data: retrievedData, encoding: String.Encoding.utf8) } } return contentsOfKeychain } }
Topic: Design SubTopic: General Tags:
Nov ’24
Reply to Double-tap to activate a UITextField?
If single-tapping on a text field in your app can be calamitous I'd say your app isn't designed properly. You need to revisit the user experience. Also, since text fields exist across the entire OS and users expect them to be activated when they single-tap them, changing this just for your app will ruin a user's 'muscle memory' and give them a poor experience.
Topic: UI Frameworks SubTopic: UIKit Tags:
Nov ’24
Reply to iOS 18.1 Backup Bug
These are the Developer Forums, where developers of apps for Apple's platforms ask each other for hints and tips on coding. Your question is more of a product support one, so I'd suggest you ask it over at the Apple Support Forums. Thanks.
Replies
Boosts
Views
Activity
Nov ’24
Reply to (Swift) Failed to produce diagnostic for expression
It's likely you don't need to send a report because it's an issue in your code. Show us the block of code that causes the error. In the meantime, you can narrow it down by commenting out lines of code until the error disappears, then you'll know which bit is causing it, and we can help you.
Replies
Boosts
Views
Activity
Nov ’24
Reply to Update of my app Gunny Rush
You should rethink how you do these releases. You can version an API such that, for example, version 1.0.0 of your app uses version 1 of your API, and any updates to the app also use version 1 up to the point where you need to use version 2 of the API. When that happens your app update will be sent to App Review and will use version 2 of the API. Version 1 will still exist and work for the existing users of the currently-released app, and version 2 will be used with the new app.
Replies
Boosts
Views
Activity
Nov ’24
Reply to IOS 18 sucks
Thanks for your comment. Given that these forums are for developers of third-party apps for Apple's OSes - and we aren't actual Apple employees - your comment isn't going to get you anywhere here. You may wish to take your comment to an Apple fansite instead.
Replies
Boosts
Views
Activity
Nov ’24
Reply to Xcode basics
Is there a particular reason you've picked C as your first language to learn? You will likely find Swift a much easier language to learn, and it's built right into Xcode. If you're set on C, it's not particularly easy for us to determine why you're getting "Build failed" without seeing your code.
Replies
Boosts
Views
Activity
Nov ’24
Reply to SwiftUI Lists down arrow handling broken
Do you have some code for your two examples? Maybe you're doing something wrong, and there's a different way of doing what you want to achieve?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’24
Reply to Top Shelf and App Icon not appearing on tvOS 18.
You should probably raise this as a bug in the usual way. It won't really get progressed if it's only posted in these Developer Forums. You need to raise each issue you find separately at https://feedbackassistant.apple.com/ You can post the FB numbers here if you want, so that others can link to them.
Replies
Boosts
Views
Activity
Nov ’24
Reply to New iOS 18
Favourites is in the Pinned Collections. Just scroll down.
Topic: Design SubTopic: General Tags:
Replies
Boosts
Views
Activity
Nov ’24
Reply to Android Emulator "System UI Isn't Responding" Error on macOS Monterey
Have you tried asking the people who wrote Android Studio? How about asking on the forums for that application?
Replies
Boosts
Views
Activity
Nov ’24
Reply to Issues with UserDefault boolean
As @MobileTen stated, never store passwords in UserDefaults. You need to use the Keychain. Also, I'm not sure why you need to store something called passcode-reset and passcode-set. The very fact that a password exists means it has been set, and if you're resetting a passcode, then that should be done as part of the journey for the user, not something that needs storing anywhere. In other words, if the user wants to reset their password, ask them for a new one, and save the new password to the keychain. There's no need to store in UDs that you're resetting the password. So, here's how to use the keychain: let userAccount: String = "AuthenticatedUser" let passwordKey: String = "SomeSortOfStringIdentifyingThisIsAPasswordForYourApp" // Choose a relevant value and never change it, as the password is stored against this value func getKeychainPasscode() -> String { return KeychainService.loadPassword(service: passwordKey, account: userAccount) ?? "" } // getKeychainPasscode() will tell you if a password is set. If it returns "" then it hasn't been set. func updatePasscode(_ value: String) { KeychainService.updatePassword(service: passwordKey, account: userAccount, data: value) } // Arguments for the keychain queries let kSecClassValue = NSString(format: kSecClass) let kSecAttrAccountValue = NSString(format: kSecAttrAccount) let kSecValueDataValue = NSString(format: kSecValueData) let kSecClassGenericPasswordValue = NSString(format: kSecClassGenericPassword) let kSecAttrServiceValue = NSString(format: kSecAttrService) let kSecMatchLimitValue = NSString(format: kSecMatchLimit) let kSecReturnDataValue = NSString(format: kSecReturnData) let kSecMatchLimitOneValue = NSString(format: kSecMatchLimitOne) public class KeychainService: NSObject { class func updatePassword(service: String, account: String, data: String) { if let dataFromString: Data = data.data(using: String.Encoding.utf8, allowLossyConversion: false) { // Instantiate a new default keychain query let keychainQuery: NSMutableDictionary = NSMutableDictionary(objects: [kSecClassGenericPasswordValue, service, account], forKeys: [kSecClassValue, kSecAttrServiceValue, kSecAttrAccountValue]) let status = SecItemUpdate(keychainQuery as CFDictionary, [kSecValueDataValue : dataFromString] as CFDictionary) if(status == errSecItemNotFound) { // No existing passcode, so just save the new one savePassword(service: service, account: account, data: data) } else { // Passcode exists, so delete it and save the new one removePassword(service: service, account: account) savePassword(service: service, account: account, data: data) } } } class func removePassword(service: String, account: String) { // Instantiate a new default keychain query let keychainQuery: NSMutableDictionary = NSMutableDictionary(objects: [kSecClassGenericPasswordValue, service, account, kCFBooleanTrue ?? true], forKeys: [kSecClassValue, kSecAttrServiceValue, kSecAttrAccountValue, kSecReturnDataValue]) // Delete any existing items let status = SecItemDelete(keychainQuery as CFDictionary) if(status != errSecSuccess) { if let err = SecCopyErrorMessageString(status, nil) { print("Remove failed: \(err)") } } } class func savePassword(service: String, account: String, data: String) { if let dataFromString = data.data(using: String.Encoding.utf8, allowLossyConversion: false) { // Instantiate a new default keychain query let keychainQuery: NSMutableDictionary = NSMutableDictionary(objects: [kSecClassGenericPasswordValue, service, account, dataFromString], forKeys: [kSecClassValue, kSecAttrServiceValue, kSecAttrAccountValue, kSecValueDataValue]) // Add the new keychain item let status = SecItemAdd(keychainQuery as CFDictionary, nil) // Always check the status if (status != errSecSuccess) { if let err = SecCopyErrorMessageString(status, nil) { print("Write failed: \(err)") } } } } class func loadPassword(service: String, account: String) -> String? { // Instantiate a new default keychain query // Tell the query to return a result // Limit our results to one item let keychainQuery: NSMutableDictionary = NSMutableDictionary(objects: [kSecClassGenericPasswordValue, service, account, kCFBooleanTrue ?? true, kSecMatchLimitOneValue], forKeys: [kSecClassValue, kSecAttrServiceValue, kSecAttrAccountValue, kSecReturnDataValue, kSecMatchLimitValue]) var dataTypeRef: AnyObject? // Search for the keychain items let status: OSStatus = SecItemCopyMatching(keychainQuery, &dataTypeRef) var contentsOfKeychain: String? if(status == errSecSuccess) { if let retrievedData = dataTypeRef as? Data { contentsOfKeychain = String(data: retrievedData, encoding: String.Encoding.utf8) } } return contentsOfKeychain } }
Topic: Design SubTopic: General Tags:
Replies
Boosts
Views
Activity
Nov ’24
Reply to WhatsApp is not available for iPad 11 pro on App Store
You should probably get in touch with Meta. It's Meta who develop and release that app, not Apple, and certainly not the third-party developers who use these forums.
Replies
Boosts
Views
Activity
Nov ’24
Reply to The bad service by App Review Team
Cutting out the excessive nonsense in this post, what's your actual issue? Try and restrain yourself to a couple of sentences.
Replies
Boosts
Views
Activity
Nov ’24
Reply to Issue: The page goes blank and gets stuck after login.
What app are you talking about? How do you expect anyone to understand what you'r talking about when you don't provide even the most basic of info?
Replies
Boosts
Views
Activity
Nov ’24
Reply to Double-tap to activate a UITextField?
If single-tapping on a text field in your app can be calamitous I'd say your app isn't designed properly. You need to revisit the user experience. Also, since text fields exist across the entire OS and users expect them to be activated when they single-tap them, changing this just for your app will ruin a user's 'muscle memory' and give them a poor experience.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Nov ’24
Reply to Draining battery health so fast
These are the Developer Forums, where developers of apps for Apple's platforms ask each other for hints and tips on coding. Your question is more of a product support one, so I'd suggest you ask it over at the Apple Support Forums. Thanks.
Replies
Boosts
Views
Activity
Nov ’24