Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sparrowcode/firebaseprofile
Ready use service for Firebase. Included interface, recored devices and notifications.
https://github.com/sparrowcode/firebaseprofile
auth firebase ios profile swift xcode
Last synced: 2 days ago
JSON representation
Ready use service for Firebase. Included interface, recored devices and notifications.
- Host: GitHub
- URL: https://github.com/sparrowcode/firebaseprofile
- Owner: sparrowcode
- License: mit
- Created: 2022-02-07T08:37:45.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-09T13:48:27.000Z (4 months ago)
- Last Synced: 2024-07-09T17:31:13.751Z (4 months ago)
- Topics: auth, firebase, ios, profile, swift, xcode
- Language: Swift
- Homepage: https://sparrowcode.io/frameworks
- Size: 85.9 KB
- Stars: 19
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://swift.org/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`.
```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:
```swift
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`.
```swift
ProfileModel.isAuthed
ProfileModel.isAnonymous
ProfileModel.currentProfileProfileModel.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(...)
```