This project is aimed to be an easy way for iOS developers to add APP.NET sharing to their own applications. It is designed to look and behave similar to the iOS5 TWTweetComposeViewController / Tweet Sheet. I built it as a way to add sharing to our Discovr apps and a new app we have on the way :)
Like the API this code is alpha and subject to a lot of changes. I wouldn't ship an app with this code until the API is out of alpha and we can be sure the endpoints won't change.
Getting the code
git clone https://github.com/stuartkhall/AppDotNetSheet.git
cd AppDotNetSheet
git submodule update --init
Adding your app credentials
touch iOS-Example/iOS-Example/Credentials.h
Now create a new app at the APP.NET developer site and add your details to Credentials.h:
#import <Foundation/Foundation.h>
static NSString* const kAppDotNetClientId = @"your_client_id";
static NSString* const kAppDotNetCallbackURL = @"http://yourcallback";
static NSString* const kAppDotNetScopes = @"write_post stream";
Open the project
open iOS-Example/iOS-Example.xcodeproj/
After you have created your project add this repository to it, e.g. as a submodule:
git submodule add https://github.com/stuartkhall/AppDotNetSheet.git AppDotNetSheet
You'll also need AFNetworking:
git submodule add https://github.com/AFNetworking/AFNetworking.git AFNetworking
Then drag the AppDotNetClient and AppDotNetSheet folders into your app.
Initialise the client with your details from the APP.NET developer site.
#import "AppDotNetClient.h"
...
[AppDotNetClient initWithClientId:kAppDotNetClientId
andCallbackURL:kAppDotNetCallbackURL
andScopes:[kAppDotNetScopes componentsSeparatedByString:@" "]];
And finally show the control:
AppDotNetComposeViewController* controller = [[AppDotNetComposeViewController alloc] init];
[self presentModalViewController:controller animated:NO];
If you are a designer or developer please jump in and help out.
- Test, test, test
- Internationalisation / Localisation
- Multiple users
- Update design to better match TWTweetComposeViewController.
- Better error handling.
- Validate tokens.
- Images.
Ask away on APP.NET of course I'm @stuartkhall, or I'm the same handle on Twitter @stuartkhall