|
- {"sections":[],"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/fueling\/coredatamanager\/savedata(context:)"]}],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"@","kind":"attribute"},{"kind":"attribute","preciseIdentifier":"s:ScM","text":"MainActor"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"saveData"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"context"},{"text":": ","kind":"text"},{"preciseIdentifier":"c:objc(cs)NSManagedObjectContext","text":"NSManagedObjectContext","kind":"typeIdentifier"},{"text":")","kind":"text"}],"languages":["swift"],"platforms":["iOS"]}]},{"kind":"parameters","parameters":[{"content":[{"inlineContent":[{"type":"text","text":"The NSManagedObjectContext to save the data in."}],"type":"paragraph"}],"name":"context"}]},{"kind":"content","content":[{"text":"Discussion","level":2,"type":"heading","anchor":"discussion"},{"code":["func saveData(context: NSManagedObjectContext) {"," do {"," try context.save()"," print(\"Successfully saved data!\")"," } catch let error {"," print(\"ERROR SAVING CORE DATA. \\(error.localizedDescription)\")"," }","}"],"type":"codeListing","syntax":"swift"}]}],"metadata":{"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"saveData","kind":"identifier"},{"text":"(","kind":"text"},{"text":"context","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"NSManagedObjectContext","preciseIdentifier":"c:objc(cs)NSManagedObjectContext","kind":"typeIdentifier"},{"kind":"text","text":")"}],"roleHeading":"Instance Method","title":"saveData(context:)","role":"symbol","symbolKind":"method","externalID":"s:7Fueling15CoreDataManagerC04saveC07contextySo22NSManagedObjectContextC_tF","modules":[{"name":"Fueling"}]},"abstract":[{"type":"text","text":"Saves the data to Core Data."}],"hierarchy":{"paths":[["doc:\/\/rpm.com.production.Scanner\/documentation\/Fueling","doc:\/\/rpm.com.production.Scanner\/documentation\/Fueling\/CoreDataManager"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/rpm.com.production.Scanner\/documentation\/Fueling\/CoreDataManager\/saveData(context:)"},"schemaVersion":{"patch":0,"major":0,"minor":3},"references":{"doc://rpm.com.production.Scanner/documentation/Fueling":{"kind":"symbol","url":"\/documentation\/fueling","title":"Fueling","identifier":"doc:\/\/rpm.com.production.Scanner\/documentation\/Fueling","abstract":[{"type":"text","text":"The Scanner app is designed to facilitate secure and efficient fuel management operations, primarily focusing on user authentication, fuel data collection, and network communication. The app includes several key features to ensure seamless and reliable interactions between users and the backend systems, leveraging technologies like WebSockets, Core Data, and biometric authentication."}],"type":"topic","role":"collection"},"doc://rpm.com.production.Scanner/documentation/Fueling/CoreDataManager":{"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"CoreDataManager","kind":"identifier"}],"type":"topic","identifier":"doc:\/\/rpm.com.production.Scanner\/documentation\/Fueling\/CoreDataManager","kind":"symbol","title":"CoreDataManager","abstract":[],"navigatorTitle":[{"text":"CoreDataManager","kind":"identifier"}],"url":"\/documentation\/fueling\/coredatamanager","role":"symbol"},"doc://rpm.com.production.Scanner/documentation/Fueling/CoreDataManager/saveData(context:)":{"url":"\/documentation\/fueling\/coredatamanager\/savedata(context:)","kind":"symbol","title":"saveData(context:)","abstract":[{"text":"Saves the data to Core Data.","type":"text"}],"type":"topic","role":"symbol","identifier":"doc:\/\/rpm.com.production.Scanner\/documentation\/Fueling\/CoreDataManager\/saveData(context:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"saveData","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"context"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"c:objc(cs)NSManagedObjectContext","text":"NSManagedObjectContext"},{"kind":"text","text":")"}]}}}
|