Buddy starter, new BuddyObject::initWithId, logout fix

* Added Buddy Starter sample that is a completely basic example of getting the SDK bootstraped and using the auth fail callback

* Add public initWithId ctor on BuddyObject to allow wrapping an object around a raw ID (e.g. profile picture ID).

* Fix logout to clear user token.

Yeah, sorry.


The pattern here is important.  There's lots of APIs we have that just return IDs.


The classic case is profile photo.  In some of these cases (like that one), we could have the User object expose a Picture object, but you'll run into the same problem eventually where you want to wrap an ID in a live object.


The .NET SDK does this all over the place.


________________________________
From: Erik Kerber <notifications@github.com>
Sent: Monday, June 09, 2014 8:49 PM
To: BuddyPlatform/Buddy-iOS-SDK
Subject: Re: [Buddy-iOS-SDK] Buddy starter, new BuddyObject::initWithId, logout fix (#95)


In Src/Lib/BuddySDK/BaseObjects/BuddyObject.m:

> @@ -55,6 +55,32 @@ - (instancetype)init
>      return self;
>  }
>
> +
> +- (instancetype)initWithId:(NSString*)id


Interesting. So much of my design had revolved around not allowing this :).

Either way, #youdaboss

-
Reply to this email directly or view it on GitHub<https://github.com/BuddyPlatform/Buddy-iOS-SDK/pull/95/files#r13576898>.