有没有办法可以使用firebase在iphone设备上存储数据,这样即使用户关闭然后打开设备,数据仍会保留在设备中?
答案 0 :(得分:0)
将其放入AppDelegate文件
Swift 3
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
FIRApp.configure()
FIRDatabase.database().persistenceEnabled = true
return true
}