Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 AppDotNetClient
Octocat-spinner-32 AppDotNetSheet
Octocat-spinner-32 iOS-Example
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .gitmodules
Octocat-spinner-32 README.md
README.md

AppDotNetSheet

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 :)

Step 1Step 2Step 3

Disclaimer

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.

Compiling the example project.

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/

Adding to your project

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];

TODO:

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.

Questions

Ask away on APP.NET of course I'm @stuartkhall, or I'm the same handle on Twitter @stuartkhall

Something went wrong with that request. Please try again.