Git Product home page Git Product logo

mojio-ios-sdk's People

Contributors

8um8lebee avatar agarwalashish avatar alex-kepar avatar alexeylubyanoy avatar andriimakukha avatar andriy-morgunov-epam avatar dilipsabat avatar mhumeniuk-epam avatar mykolakibysh avatar nickkibish avatar nsainaney avatar olegyankiwskyi avatar oleksii-lubianyi-epam avatar pauluhn avatar romanmovchan91 avatar stepanrazin avatar vladpetruk avatar vladyslavpetruk-epam avatar volodymyr-kolesnik avatar wowbroforce avatar

Stargazers

 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mojio-ios-sdk's Issues

Cocoapods are unable to find specification for `MojioSDK`

Hey!

Adding

pod 'MojioSDK

to project's Podfile and running pod install results in cocoapods install failing on:

[!] Unable to find a specification for `MojioSDK`

Using

pod 'MojioSDK', :git => "https://github.com/mojio/mojio-ios-sdk.git"

gently solves this issue.

It might be a good idea to update this part of readme.

Thanx!

Consider storing token in Keychain instead of NSUserDefaults

Current implementation of the SDK stores token in NSUserDefaults.

Since MojioAccessToken is something that grants you access to whole range of sensitive user information, it should be probably stored in Keychain as it is the recommended place where to store such information.

Function logoutWithCompletionBlock of MojioClient erases whole NSUserDefaults

This particular function in MojioClient erases everything stored in NSUserDefaults:

- (void)logoutWithCompletionBlock:(void (^)(void))completionBlock {
    [[self.manager requestSerializer] setValue:nil forHTTPHeaderField:@"MojioAPIToken"];

    // remove all objects from the NSUserDefaults
    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    NSDictionary *defaultsDict = [defaults dictionaryRepresentation];
    for (id key in defaultsDict) {
        [defaults removeObjectForKey:key];
    }
    [defaults synchronize];

    if (completionBlock) {
        completionBlock();
    }
}

This is not wise. You should probably only erase values stored by your SDK. Current implementation erases any other possible values stored by other parties.

Support Carthage

Many iOS projects these days are making use of Carthage for dependencies instead of CocoaPods. Currently the MojioSDK requires you to use CocoaPods to install its dependencies which breaks the ability to use MojioSDK as a Carthage dependency.

There are two ways to solve this.

  1. Bundle MojioSDK's dependencies in the git repo and increase the size of the project overall.
  2. Convert MojioSDK to use Carthage for dynamic dependency building

Both options still allow MojioSDK to function and install as a CocoaPod. The only change is how you develop on MojioSDK.

Option 2 replaces pod install inside the mojio-ios-sdk project you with carthage update. You would not need to use the .xcworkspace anymore.

Option 1 has no build step as the frameworks are already bundled.

I'll be pushing a PR for the swift4 branch that makes the changes necessary for option 2. I think this is a big benefit for the MojioSDK and does not impact development on the sdk severely. Please leave any feedback on how I can improve this as I'd like to see it merged in.

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.