目录
目录README.md

MultiUser handling for swift

MultiUser is created and maintaned with ❥ by Sascha Muellner.


Travis CI Maintainability Test Coverage Platforms Version License Swift Version SPM compatible Reviewed by Hound README

Requirements

The latest version of MultiUser requires:

  • Swift 5+
  • iOS 13+
  • Xcode 11+

Installation

Swift Package Manager

Using SPM add the following to your dependencies

'MultiUser', 'master', 'https://github.com/smuellner/MultiUser-for-swift.git'

CocoaPods

Using CocoaPods add the following to your Podfile:

pod 'MultiUser-for-Swift', '~> 1.0.1'

What?

This is a Swift package with support for iOS/macOS/tvOS/watchOS that allows to store user releated data for multiple users of an application.

How to use?

Service

The UserService cares for the whole user handling and implements the UserServiceProtocol. To allow for access throughout your application place the UserService in a shared instance like the Application Delegate or use a dependency injection framework like Swinject.


// AppDelegate.swift

let userService = UserService()




User

Retrieve a list of all users:


let userService = UserService()

print(userService.allUsers)
//

Create a user


let user = userService.createUser()
user.username = ""
user.firstname = ""
user.lastname = ""

userService.saveUser(user)
关于
74.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

©Copyright 2023 CCF 开源发展委员会
Powered by Trustie& IntelliDE 京ICP备13000930号