Skip to content

Simple Swift file for store and retrieve property lists

License

Notifications You must be signed in to change notification settings

mudithsilva/AppDataPlist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AppDataPlist

Simple Swift file for store and retrieve property lists.

Installation

Simply copy and paste AppDataPlist File on your Project :)

Usage

Data Type

Data type should be in Codable. eg:-

   import Foundation

    struct User: Codable {
    
        var name: String
        var email: String
    
    }

Save Data on plist

Use AppDataPlist.saveUserInformation(info: <#T##Decodable & Encodable#>, key: <#T##UserData.RawValue#>) for save data. eg :-

  let myUser = User(name: "Chathuranga",
                          email: "chathu@gmail.com")
  AppDataPlist.saveUserInformation(info: myUser, key: UserData.userInfo.rawValue)

Retrieve Data on plist

Use AppDataPlist.retrieveUserInformation(key: <#T##UserData.RawValue#>, type: <#T##(Decodable & Encodable).Protocol#>) for retrieve data. eg :-

  AppDataPlist.retrieveUserInformation(key: UserData.userInfo.rawValue, type: User.self)

About

Simple Swift file for store and retrieve property lists

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages