Install

  1. This is optional, but we recommend you turn on Inter App Audio in your app. This allows the library to launch the AudioCopy app smoothly in the background and will help with more efficient audio previews in the future.
  2. If you already have a previous version of AudioCopy in your app remove it and all the resources.
  3. Next drag the AudioCopy3 folder into your project. Make sure to add ../AudioCopy3 to your Framework Search Path build setting so your project can find the headers.
  4. Add other missing frameworks (AVFoundation.framework, MobileCoreServices.framework, AudioToolbox.framework, SystemConfiguration.framework, libstdc++.dylib) if they aren't there already. N.B. StoreKit.framework is required for the latest 3.2 SDK.
  5. Add a custom launch url scheme to your app's Info.plist. To do this, click on the last line in the Info.plist and then click the "+" sign off to the right to add a new line. Select "URL Types" for the new item. Once that's added, click the grey arrow next to "URL Types" to show "Item 0". Set your URL identifier to a unique string - something like com.yourcompany.yourappname.

Important Information for iOS 9

Changes in Apple’s URL security mean that new keys are required in your app’s info.plist in iOS 9: NSAppTransportSecurity and LSApplicationQueriesScheme. For easiest integration, we recommend setting NSAppTransportSecurity's NSAllowsArbitraryLoads key to YES. However, you can follow the pattern below if you'd prefer.

Audiocopyplist

The sdk won't work properly in iOS 9 without them, and it will warn you if they're required. For more information have a look at this page.

Usage — AudioCopy

The simplest case is handled in SimpleExample:

#import "AudioCopy/AudioCopyViewController.h"

- (IBAction)audioCopyPressed:(id)sender {
    // Copy path
    NSString *fileToCopy = [[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent:@"testaudio-stereo.wav"];

    // Create the AudioCopyViewController
    AudioCopyViewController *audioCopyController = [[AudioCopyViewController alloc] initWithPath:fileToCopy];

    // Present modally
    [self presentViewController:audioCopyController animated:YES completion:nil];
    [audioCopyController release];
}

The view controller will take care of all the preview, copying and other workflows.

Usage — AudioPaste

#import "AudioCopy/AudioPasteViewController.h"

- (IBAction)audioPastePressed:(id)sender {
    // Paste path.
    // To create a new file, this should be a directory.
    // To let the user choose to overwrite or append, this should be an existing file.
    NSString *docsPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
    
    // Create the AudioPasteViewController
    AudioPasteViewController *audioPasteController = [[AudioPasteViewController alloc] initWithPath:docsPath];
    audioPasteController.delegate = self;

    // Present modally
    [self presentViewController:audioPasteController animated:YES completion:nil];
    [audioPasteController release];
}

This will walk users through the paste workflow. By default, this includes pasting to a new file, loop pasting, pasting over existing files, and appending to existing files. For basic copy and paste, that's it!

If you want to use optional, advanced features like multi-pasting (a.k.a. Paste All), UIPopoverControllers, or get delegate callbacks as progress is made, the various methods are listed below or demonstrated in the Example app.

Multiple Paste (Paste All)

Multiple paste allows multiple files in a directory to be pasted at once. Just implement one of the multiplepaste delegate methods from AudioPasteViewControllerDelegate (-[AudioPasteViewControllerDelegate didMultiplePaste:fromDirectory:atPaths:withMetaData:] or -[AudioPasteViewControllerDelegate didMultiplePaste:fromDirectory:atPaths:withMetaData:withGroupMetaData]) to turn on this feature. If you haven’t implemented the standard -[AudioPasteViewControllerDelegate didPaste:atPath:itemNamed:withMetaData:] single paste callback, only multiple paste will be supported.

Sound Metadata

Metadata is returned by all three of the AudioPasteViewControllerDelegate callback methods mentioned above. When pasting content from the Content Store, for example, we can see lots of useful metadata including transient info and other tags:

{  
MetaDataSource = WAV; beats = 8; "bundle_id" = "com.loopmasters.NuCumbia"; channels = 2; denominator = 4; "disk based" = 0;
duration = "4.800000190734863"; filetitle = "NCU_100_Drums_01.wav"; flag = 0; numerator = 4; "one shot" = 0; path = "Documents/ACPApps/com.loopmasters.NuCumbia/Loops/Drum Loops/NCU_100_Drums_01.wav"; "root set" = 0; sender = "Nu Cumbia"; stretch = 0; tempo = 120; transient0 = 0; transient1 = 11438; transient10 = 79311; transient11 = 90853; transient12 = 98157; transient13 = 105874; transient14 = 117244; transient15 = 124376; transient16 = 125685; transient17 = 132438; transient18 = 144117; transient19 = 151835; transient2 = 18570; transient20 = 158898; transient21 = 171990; transient22 = 178536; transient23 = 185392; transient24 = 197141; transient25 = 204066; transient3 = 19811; transient4 = 26494; transient5 = 38312; transient6 = 46098; transient7 = 52954; transient8 = 66116; transient9 = 71628;
}

Affiliate Program

AudioCopy also features an affiliate program where developers can get rewards when paid content is pasted. Visit acp.retronyms.com/developers for more info. All that’s required to sign up is implementing this method with the affiliate code you receive on login: +[AudioCopyPaste setAffiliateCode:@“<affiliate code>”];

Don’t forget to check out the Example app, where you can get more information on all these features.

Compatible Apps List

By using AudioCopy and Paste as above you will automatically be added to CompatibleApps list. We will order this list by usage with a bonus given to apps that have recently added support for AudioCopy3. We will also include new apps in our newsletters from time to time.

Partner Program

To join the partner program:

1. Your app must include the AudioCopy SDK

2. Your app must include your affiliate token

3. Your app must link to the content store

4. You must have an agreement with us. Please email taylor@retronyms.com to begin the process.

Once the app is live, you earn credits when Sound Packs are pasted to your app for the first time. Sound Pack revenue (after Apple's cut) is divided like so: Your Partner App earns 35%, the Content Store earns 25%, and the Content Producer earns 40%. You can see the credits/commission earned at any time by logging into your developer account. When the commission earned passes a $100 threshold, you can request a payment, which is sent as a royalty check.

The Content Store link(s) can go wherever you want. Naturally, you can get the best conversion rates with a thoughtful integration that fits into the workflow in a way that's useful to users. You can take a look at our app, Hook (free for iPhone) to see how we integrate Content Store links.

We recommend accessing the content store like this:

- (IBAction) contentStoreButtonPressed
{    
    if ( ! [[UIApplication sharedApplication] openURL:[AudioCopyPaste contentStoreLaunchURL]])
    {
        SKStoreProductViewController *spvc = [[[SKStoreProductViewController alloc] init] autorelease];

        NSMutableDictionary *params = [[AudioCopyPaste parametersForStoreKit] mutableCopy];
        
        [spvc loadProductWithParameters:params completionBlock:nil];
        spvc.delegate = self;
        
        [self presentViewController:spvc animated:YES completion:nil];
    }
}

You will need to have your Info.plist set up as described above.

Thank You

Thanks for your support. With your help we can make iOS a fantastic music platform. Download the SDK here.