Swiftpack.co - sparrowcode/FirebaseProfile as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by sparrowcode.
sparrowcode/FirebaseProfile 1.1.9
Ready use service for Firebase. Included interface, recored devices and notifications.
⭐️ 10
🕓 3 days ago
iOS
.package(url: "https://github.com/sparrowcode/FirebaseProfile.git", from: "1.1.9")

SPProfiling

Ready use service with using Firebase. Included interface, manage auth process, recored devices and profile data.

Installation

Ready for use on iOS 13+.

Swift Package Manager

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies.

Once you have your Swift package set up, adding as a dependency is as easy as adding it to the dependencies value of your Package.swift.

dependencies: [
    .package(url: "https://github.com/ivanvorobei/SPProfiling", .upToNextMajor(from: "1.0.2"))
]

Manually

If you prefer not to use any of dependency managers, you can integrate manually. Put Sources/SPProfiling folder in your Xcode project. Make sure to enable Copy items if needed and Create groups.

Usage

First call configure services:

let filePath = Bundle.main.path(forResource: Constants.Firebase.plist_filename, ofType: .empty)!
let options = FirebaseOptions(contentsOfFile: filePath)!
SPProfiling.configure(firebaseOptions: options)

All actions doing from ProfileModel.

ProfileModel.isAuthed
ProfileModel.isAnonymous
ProfileModel.currentProfile

ProfileModel.getProfile(userID...)
ProfileModel.getProfile(email...)

ProfileModel.signInApple(...)
ProfileModel.signInAnonymously(...)
ProfileModel.signOut(...)

let profileModel = ProfileModel.currentProfile
profileModel.setName(...)
profileModel.getAvatarURL(...)
profileModel.setAvatar(...)
profileModel.deleteAvatar(...)

// Ready-use interface
ProfileModel.showCurrentProfile(...)

GitHub

link
Stars: 10
Last commit: 2 days ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

Updated deps.
8 weeks ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics