Hi,When I try to save the information provided by the user on the Settings view and come back to the settings again it does not load the previous stored information. This is how I am saving:After entering all the fields and pressing the "submit" button, I save the information using User Defaults:let advancedSettingArray = [self.custCodeTextField.text, self.pcsAddrTextField.text]UserDefaults.standard.set(advancedSettingArray, forKey: "ArrayKey")UserDefaults.standard.synchronize()When I navigate back to the Settings page, I use the following code in ViewDidLoad() :let defaults = UserDefaults.standardif let myArray = defaults.object(forKey: "ArrayKey") as? [String] { print(myArray)}It does not work, somehow. Can someone please tell what I am doing wrong.Thanks,Marc.
Post
Replies
Boosts
Views
Activity
Hello,Is there a way to unpair a Bluetooth accessory programmatically instead done by the user to manually "forget" it in Bluetooth Settings? I am using the Core Bluetooth framework.If not so, then how many Bluetooth devices can be there present in the list in Bluetooth Settings?I would really appreciate if someone can help me here.Thanks,Marc.