This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>rules</key> | |
<dict> | |
<key>.*</key> | |
<true/> | |
<key>Info.plist</key> | |
<dict> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# IAP | |
curl -s -d "{ \"receipt-data\" : \"$(base64 receipt)\" }" https://buy.itunes.apple.com/verifyReceipt | python -mjson.tool | |
# autorenewing subscription | |
curl -s -d "{ \"password\" : \"shared-secret\", \"receipt-data\" : \"$(base64 receipt)\" }" https://buy.itunes.apple.com/verifyReceipt | python -mjson.tool |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Was hoping to find at least bitrate in packet data, maybe in attachments | |
// via AVFoundation/CoreMedia. This data is in every mp3 and (I think) aac packet | |
// yet it seems to be discarded. Anyone know where I can find it without parsing | |
// by hand or inferring from file duration and size? | |
// sample rate and number of channels is available. | |
NSString *path = @"path to mp3/aac/whatevs"; | |
AVAsset *asset = [[AVURLAsset alloc] initWithURL:[NSURL fileURLWithPath:path] options:nil]; | |
[asset loadValuesAsynchronouslyForKeys:@[@"duration"] completionHandler:^{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "AppDelegate.h" | |
#import <AVFoundation/AVFoundation.h> | |
@interface AppDelegate () | |
@property (nonatomic) AVAssetWriter *writer; | |
@property (nonatomic) AVAssetWriterInputPixelBufferAdaptor *adaptor; | |
@property (nonatomic) dispatch_queue_t q; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSError *error = nil; | |
if (![[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryMultiRoute error: &error]) { | |
NSLog(@"setCategory: %@", error); | |
} | |
if (![[AVAudioSession sharedInstance] setActive: YES error: &error]) { | |
NSLog(@"setActive: %@", error); | |
} |