I have A Array List
private var deviceArray: [SearchPeripheral]? = []
I want to hold data of device array in UserDefaults but its crashing when I store it. please help me on it
Thank you.
I have A Array List
private var deviceArray: [SearchPeripheral]? = []
I want to hold data of device array in UserDefaults but its crashing when I store it. please help me on it
Thank you.
Copyright © 2021 Jogjafile Inc.
You can't store custom models in UserDefaults. You can make the following improvements to save your objects as [[String:Any]]
Saving Array of SearchPeripheral:
Getting Array of SearchPeripherals: