Git Product home page Git Product logo

cely's People

Contributors

alextall avatar canatac avatar initfabian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cely's Issues

Cely Locksmith error

Hi folks, running Cely, I get the following error on iOS 12:

error: The operation couldn’t be completed. (Cely.LocksmithError error 7.)

Im following the same example as in the docs, and im not sure what the issues is.

Carthage update failed with Cely/Cely

Hi,
When trying to update by :
carthage update
with
github "Cely/Cely" ~> 2.0.0
in Cartfile

I got this response :

A shell task (/usr/bin/env git clone --bare --quiet https://github.com/Cely/Cely.git /Users/xxx/Library/Caches/org.carthage.CarthageKit/dependencies/Cely) failed with exit code 128:
fatal: could not read Username for 'https://github.com': terminal prompts disabled

This works only with repo :
github "chaione/Cely" ~> 2.0.0

Sign up

Hi,

thanks for this library! Do you have any plan to implement a signup flow as well, i.e. with a separate screen and a callback similar to loginCompletionBlock?

Dependency injection

How should I do dependency injection?
Suppose I need to access an external service inside my login viewcontroller (the initial viewcontroller for loginStoryboard). The service is defined as a protocol.
I could use an implicitly unwrapped optional, but how could I set it?
Thank you, Luca-

Only compatible with storyboards?

I am trying out Cely in a small app that I am building, but I am not using Storyboards. I use the 'old' way, of just instantiating a UIViewController and assigning it to my UIWindow.

AppDelegate.swift

self.window = UIWindow()
self.window?.rootViewController = MainViewController()
self.window?.makeKeyAndVisible()

After this I setup Cely:
Cely.setup(with: window, forModel: User(), requiredProperties: [.token], withOptions: nil)

But while starting my application it crashes with the following error message:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Could not find a storyboard named 'Main' in bundle NSBundle

Would using a custom CelyAnimator solve this (not sure?)

How to integrate expirable into CelyUser to manage different tokens?

@initFabian I'd like to get your opinion on how to add the following Expirable protocol so I can manage tokens.

https://github.com/AndrewSB/Expirable

This will enable us see which token expired or is expiring soon. So far following your example I don't know where I am able to enable the Expirable protocol

struct AuthUser: CelyUser {
    
    enum Property: CelyProperty {
        
        case username = "username"
        case email = "email"
        case access_token = "access_token"
        case refresh_token = "refresh_token"
            
        func securely() -> Bool {
            switch self {
            case .access_token, .refresh_token:
                return true
            default:
                return false
            }
        }
        
        func persisted() -> Bool {
            switch self {
            case .access_token, .refresh_token:
                return true
            default:
                return false
            }
        }
        
        func save(_ value: Any) {
            Cely.save(value, forKey: rawValue, securely: securely(), persisted: persisted())
        }
        
        func get() -> Any? {
            return Cely.get(key: rawValue)
        }
    }
}

// MARK: - Save/Get User Properties

extension AuthUser {
    
    static func save(_ value: Any, as property: Property) {
        property.save(value)
    }
    
    static func save(_ data: [Property : Any]) {
        data.forEach { property, value in
            property.save(value)
        }
    }
    
    static func get(_ property: Property) -> Any? {
        return property.get()
    }
}

Non-iOS targets fail to build

We have targets for macOS, watchOS, tvOS that don’t build (watchOS doesn’t even make sense 🤪). I’m leaving this here so I can fix/remove as appropriate.

Cocoapods Support

Is there any support for Cocoapods? If not, how can I integrate this to my apps? Thanks!

I need help with swift 4

Hey, man, I need to upgrade one app which uses Cely for login and build in Xcode 9, Can you help me with that?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.