NBSoundCloudActivity is a simple subclass of UIActivity that allows you to post audio content to SoundCloud via the UIActivityViewController introduced in iOS 6. It wraps the SoundCloud sharing SDK to display a posting user interface and to actually send the data.

Setup

First, clone or download the Git repository to your local disk.

The sample project uses CocoaPods to manage dependencies, so you'll need to install it and run the following command within the project root directory to get the dependent code

pod install

Now you're ready to open the sample project and run it. Make sure you open the NBSoundCloudActivity.xcworkspace in order to get the Pods dependencies. In "ViewController.m" you'll also need to set the Client ID, Client Secret, and Redirect URL for your SoundCloud account in order for the demo to work.

Once you're satisfied, you can copy the source and assets from the "NBSoundCloudActivity" group into your own project. Keep in mind you'll also need the SoundCloud SDK dependencies in your own project as well.

Usage

Using NBSoundCloudActivity couldn't be easier. All you have to do is create an instance using your SoundCloud API Client ID and Secret and pass it along to an instance of UIActivityViewController along with an AVURLAsset object representing the audio file you'd like to share.