From 4d1236db027d14de42db8703fc504950d3a227f3 Mon Sep 17 00:00:00 2001 From: Dan Grigsby Date: Wed, 19 Aug 2009 13:25:33 -0500 Subject: [PATCH] Initial import --- .gitignore | 7 + Classes/MicBlowAppDelegate.h | 22 +++ Classes/MicBlowAppDelegate.m | 33 ++++ Classes/MicBlowViewController.h | 14 ++ Classes/MicBlowViewController.m | 49 ++++++ MainWindow.xib | 218 +++++++++++++++++++++++++ MicBlow-Info.plist | 30 ++++ MicBlow.xcodeproj/project.pbxproj | 253 ++++++++++++++++++++++++++++++ MicBlowViewController.xib | 150 ++++++++++++++++++ MicBlow_Prefix.pch | 8 + README.markdown | 39 +++++ main.m | 17 ++ 12 files changed, 840 insertions(+) create mode 100644 .gitignore create mode 100644 Classes/MicBlowAppDelegate.h create mode 100644 Classes/MicBlowAppDelegate.m create mode 100644 Classes/MicBlowViewController.h create mode 100644 Classes/MicBlowViewController.m create mode 100644 MainWindow.xib create mode 100644 MicBlow-Info.plist create mode 100755 MicBlow.xcodeproj/project.pbxproj create mode 100644 MicBlowViewController.xib create mode 100644 MicBlow_Prefix.pch create mode 100644 README.markdown create mode 100644 main.m diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..756d191 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +build +*.pbxuser +*.perspective +*.perspectivev3 +*.mode1v3 +*.mode2v3 +.DS_Store diff --git a/Classes/MicBlowAppDelegate.h b/Classes/MicBlowAppDelegate.h new file mode 100644 index 0000000..8a6bcdf --- /dev/null +++ b/Classes/MicBlowAppDelegate.h @@ -0,0 +1,22 @@ +// +// MicBlowAppDelegate.h +// MicBlow +// +// Created by Dan Grigsby on 8/19/09. +// Copyright __MyCompanyName__ 2009. All rights reserved. +// + +#import + +@class MicBlowViewController; + +@interface MicBlowAppDelegate : NSObject { + UIWindow *window; + MicBlowViewController *viewController; +} + +@property (nonatomic, retain) IBOutlet UIWindow *window; +@property (nonatomic, retain) IBOutlet MicBlowViewController *viewController; + +@end + diff --git a/Classes/MicBlowAppDelegate.m b/Classes/MicBlowAppDelegate.m new file mode 100644 index 0000000..7a64d6c --- /dev/null +++ b/Classes/MicBlowAppDelegate.m @@ -0,0 +1,33 @@ +// +// MicBlowAppDelegate.m +// MicBlow +// +// Created by Dan Grigsby on 8/19/09. +// Copyright __MyCompanyName__ 2009. All rights reserved. +// + +#import "MicBlowAppDelegate.h" +#import "MicBlowViewController.h" + +@implementation MicBlowAppDelegate + +@synthesize window; +@synthesize viewController; + + +- (void)applicationDidFinishLaunching:(UIApplication *)application { + + // Override point for customization after app launch + [window addSubview:viewController.view]; + [window makeKeyAndVisible]; +} + + +- (void)dealloc { + [viewController release]; + [window release]; + [super dealloc]; +} + + +@end diff --git a/Classes/MicBlowViewController.h b/Classes/MicBlowViewController.h new file mode 100644 index 0000000..81306b3 --- /dev/null +++ b/Classes/MicBlowViewController.h @@ -0,0 +1,14 @@ +#import +#import +#import + +@interface MicBlowViewController : UIViewController { + AVAudioRecorder *recorder; + NSTimer *levelTimer; + double lowPassResults; +} + +- (void)levelTimerCallback:(NSTimer *)timer; + +@end + diff --git a/Classes/MicBlowViewController.m b/Classes/MicBlowViewController.m new file mode 100644 index 0000000..bbcb181 --- /dev/null +++ b/Classes/MicBlowViewController.m @@ -0,0 +1,49 @@ +#import "MicBlowViewController.h" + +@implementation MicBlowViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + + NSURL *url = [NSURL fileURLWithPath:@"/dev/null"]; + + NSDictionary *settings = [NSDictionary dictionaryWithObjectsAndKeys: + [NSNumber numberWithFloat: 44100.0], AVSampleRateKey, + [NSNumber numberWithInt: kAudioFormatAppleLossless], AVFormatIDKey, + [NSNumber numberWithInt: 1], AVNumberOfChannelsKey, + [NSNumber numberWithInt: AVAudioQualityMax], AVEncoderAudioQualityKey, + nil]; + + NSError *error; + + recorder = [[AVAudioRecorder alloc] initWithURL:url settings:settings error:&error]; + + if (recorder) { + [recorder prepareToRecord]; + recorder.meteringEnabled = YES; + [recorder record]; + levelTimer = [NSTimer scheduledTimerWithTimeInterval: 0.03 target: self selector: @selector(levelTimerCallback:) userInfo: nil repeats: YES]; + } else + NSLog([error description]); +} + + +- (void)levelTimerCallback:(NSTimer *)timer { + [recorder updateMeters]; + + const double ALPHA = 0.05; + double peakPowerForChannel = pow(10, (0.05 * [recorder peakPowerForChannel:0])); + lowPassResults = ALPHA * peakPowerForChannel + (1.0 - ALPHA) * lowPassResults; + + if (lowPassResults < 0.95) + NSLog(@"Mic blow detected"); +} + + +- (void)dealloc { + [levelTimer release]; + [recorder release]; + [super dealloc]; +} + +@end diff --git a/MainWindow.xib b/MainWindow.xib new file mode 100644 index 0000000..c2cf73c --- /dev/null +++ b/MainWindow.xib @@ -0,0 +1,218 @@ + + + + 768 + 10A288 + 715 + 1010 + 411.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 46 + + + YES + + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + YES + + YES + + + YES + + + + YES + + IBFilesOwner + + + IBFirstResponder + + + + MicBlowViewController + + + + + 292 + {320, 480} + + 1 + MSAxIDEAA + + NO + NO + + + + + + YES + + + delegate + + + + 4 + + + + viewController + + + + 11 + + + + window + + + + 14 + + + + + YES + + 0 + + + + + + -1 + + + File's Owner + + + 3 + + + MicBlow App Delegate + + + -2 + + + + + 10 + + + + + 12 + + + + + + + YES + + YES + -1.CustomClassName + -2.CustomClassName + 10.CustomClassName + 10.IBEditorWindowLastContentRect + 10.IBPluginDependency + 12.IBEditorWindowLastContentRect + 12.IBPluginDependency + 3.CustomClassName + 3.IBPluginDependency + + + YES + UIApplication + UIResponder + MicBlowViewController + {{512, 351}, {320, 480}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + {{525, 346}, {320, 480}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + MicBlowAppDelegate + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + YES + + + YES + + + + + YES + + + YES + + + + 14 + + + + YES + + MicBlowAppDelegate + NSObject + + YES + + YES + viewController + window + + + YES + MicBlowViewController + UIWindow + + + + IBProjectSource + Classes/MicBlowAppDelegate.h + + + + MicBlowAppDelegate + NSObject + + IBUserSource + + + + + MicBlowViewController + UIViewController + + IBProjectSource + Classes/MicBlowViewController.h + + + + + 0 + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + MicBlow.xcodeproj + 3 + + diff --git a/MicBlow-Info.plist b/MicBlow-Info.plist new file mode 100644 index 0000000..3289444 --- /dev/null +++ b/MicBlow-Info.plist @@ -0,0 +1,30 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.yourcompany.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + NSMainNibFile + MainWindow + + diff --git a/MicBlow.xcodeproj/project.pbxproj b/MicBlow.xcodeproj/project.pbxproj new file mode 100755 index 0000000..daa3e86 --- /dev/null +++ b/MicBlow.xcodeproj/project.pbxproj @@ -0,0 +1,253 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 45; + objects = { + +/* Begin PBXBuildFile section */ + 1D3623260D0F684500981E51 /* MicBlowAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* MicBlowAppDelegate.m */; }; + 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; + 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; + 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; + 265E393C103C528D009679FD /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 265E393B103C528D009679FD /* AVFoundation.framework */; }; + 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; }; + 2899E5220DE3E06400AC0155 /* MicBlowViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2899E5210DE3E06400AC0155 /* MicBlowViewController.xib */; }; + 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; }; + 28D7ACF80DDB3853001CB0EB /* MicBlowViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28D7ACF70DDB3853001CB0EB /* MicBlowViewController.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 1D3623240D0F684500981E51 /* MicBlowAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MicBlowAppDelegate.h; sourceTree = ""; }; + 1D3623250D0F684500981E51 /* MicBlowAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MicBlowAppDelegate.m; sourceTree = ""; }; + 1D6058910D05DD3D006BFB54 /* MicBlow.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MicBlow.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 265E393B103C528D009679FD /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; + 288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + 2899E5210DE3E06400AC0155 /* MicBlowViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MicBlowViewController.xib; sourceTree = ""; }; + 28AD733E0D9D9553002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = ""; }; + 28D7ACF60DDB3853001CB0EB /* MicBlowViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MicBlowViewController.h; sourceTree = ""; }; + 28D7ACF70DDB3853001CB0EB /* MicBlowViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MicBlowViewController.m; sourceTree = ""; }; + 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 32CA4F630368D1EE00C91783 /* MicBlow_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MicBlow_Prefix.pch; sourceTree = ""; }; + 8D1107310486CEB800E47090 /* MicBlow-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "MicBlow-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, + 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, + 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */, + 265E393C103C528D009679FD /* AVFoundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 080E96DDFE201D6D7F000001 /* Classes */ = { + isa = PBXGroup; + children = ( + 1D3623240D0F684500981E51 /* MicBlowAppDelegate.h */, + 1D3623250D0F684500981E51 /* MicBlowAppDelegate.m */, + 28D7ACF60DDB3853001CB0EB /* MicBlowViewController.h */, + 28D7ACF70DDB3853001CB0EB /* MicBlowViewController.m */, + ); + path = Classes; + sourceTree = ""; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 1D6058910D05DD3D006BFB54 /* MicBlow.app */, + ); + name = Products; + sourceTree = ""; + }; + 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { + isa = PBXGroup; + children = ( + 080E96DDFE201D6D7F000001 /* Classes */, + 29B97315FDCFA39411CA2CEA /* Other Sources */, + 29B97317FDCFA39411CA2CEA /* Resources */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 19C28FACFE9D520D11CA2CBB /* Products */, + ); + name = CustomTemplate; + sourceTree = ""; + }; + 29B97315FDCFA39411CA2CEA /* Other Sources */ = { + isa = PBXGroup; + children = ( + 32CA4F630368D1EE00C91783 /* MicBlow_Prefix.pch */, + 29B97316FDCFA39411CA2CEA /* main.m */, + ); + name = "Other Sources"; + sourceTree = ""; + }; + 29B97317FDCFA39411CA2CEA /* Resources */ = { + isa = PBXGroup; + children = ( + 2899E5210DE3E06400AC0155 /* MicBlowViewController.xib */, + 28AD733E0D9D9553002E5188 /* MainWindow.xib */, + 8D1107310486CEB800E47090 /* MicBlow-Info.plist */, + ); + name = Resources; + sourceTree = ""; + }; + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 265E393B103C528D009679FD /* AVFoundation.framework */, + 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, + 1D30AB110D05D00D00671497 /* Foundation.framework */, + 288765A40DF7441C002DB57D /* CoreGraphics.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 1D6058900D05DD3D006BFB54 /* MicBlow */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "MicBlow" */; + buildPhases = ( + 1D60588D0D05DD3D006BFB54 /* Resources */, + 1D60588E0D05DD3D006BFB54 /* Sources */, + 1D60588F0D05DD3D006BFB54 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = MicBlow; + productName = MicBlow; + productReference = 1D6058910D05DD3D006BFB54 /* MicBlow.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "MicBlow" */; + compatibilityVersion = "Xcode 3.1"; + hasScannedForEncodings = 1; + mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 1D6058900D05DD3D006BFB54 /* MicBlow */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 1D60588D0D05DD3D006BFB54 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */, + 2899E5220DE3E06400AC0155 /* MicBlowViewController.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 1D60588E0D05DD3D006BFB54 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1D60589B0D05DD56006BFB54 /* main.m in Sources */, + 1D3623260D0F684500981E51 /* MicBlowAppDelegate.m in Sources */, + 28D7ACF80DDB3853001CB0EB /* MicBlowViewController.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 1D6058940D05DD3E006BFB54 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = MicBlow_Prefix.pch; + INFOPLIST_FILE = "MicBlow-Info.plist"; + PRODUCT_NAME = MicBlow; + }; + name = Debug; + }; + 1D6058950D05DD3E006BFB54 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = MicBlow_Prefix.pch; + INFOPLIST_FILE = "MicBlow-Info.plist"; + PRODUCT_NAME = MicBlow; + }; + name = Release; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PREBINDING = NO; + SDKROOT = iphoneos3.0; + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PREBINDING = NO; + SDKROOT = iphoneos3.0; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "MicBlow" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1D6058940D05DD3E006BFB54 /* Debug */, + 1D6058950D05DD3E006BFB54 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "MicBlow" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} diff --git a/MicBlowViewController.xib b/MicBlowViewController.xib new file mode 100644 index 0000000..0a77fe8 --- /dev/null +++ b/MicBlowViewController.xib @@ -0,0 +1,150 @@ + + + + 768 + 10A288 + 715 + 1010 + 411.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 46 + + + YES + + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + YES + + YES + + + YES + + + + YES + + IBFilesOwner + + + IBFirstResponder + + + + 274 + {320, 460} + + + 3 + MC43NQA + + 2 + + + NO + + + + + + YES + + + view + + + + 7 + + + + + YES + + 0 + + + + + + -1 + + + File's Owner + + + -2 + + + + + 6 + + + + + + + YES + + YES + -1.CustomClassName + -2.CustomClassName + 6.IBEditorWindowLastContentRect + 6.IBPluginDependency + + + YES + MicBlowViewController + UIResponder + {{438, 347}, {320, 480}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + YES + + + YES + + + + + YES + + + YES + + + + 7 + + + + YES + + MicBlowViewController + UIViewController + + IBProjectSource + Classes/MicBlowViewController.h + + + + + 0 + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + MicBlow.xcodeproj + 3 + + diff --git a/MicBlow_Prefix.pch b/MicBlow_Prefix.pch new file mode 100644 index 0000000..2a597d8 --- /dev/null +++ b/MicBlow_Prefix.pch @@ -0,0 +1,8 @@ +// +// Prefix header for all source files of the 'MicBlow' target in the 'MicBlow' project +// + +#ifdef __OBJC__ + #import + #import +#endif diff --git a/README.markdown b/README.markdown new file mode 100644 index 0000000..35ac802 --- /dev/null +++ b/README.markdown @@ -0,0 +1,39 @@ +Overview +-------- + +This is the source code for the [Alocola iPhone application](http://www.alocola.com). + + +What's Alocola? +--------------- + +On its own, Alocola is a simple application that uses the iPhone's location-services to present your position, altitude, speed and course. When paired with a website, Alocola enables the website to be location aware. + +Alocola is a web-helper application that lets users provide their location information when websites ask for it. + +Alocola works with Safari, the built-in web browser. With Alocola, web developers don't need to create their own iPhone app. Users simply browse in Safari the way they normally would; when a site asks for location information Alocola pops up, asks permission to give the location to the site, returns to Safari and passes the location along as part of the URL. + + +Using Alocola With A Website +---------------------------- + +See the [web developer guide](http://www.alocola.com/developer.html). + + +Understanding the iPhone Code +----------------------------- + +I've written a couple of articles about how the code works: + +[URL handling for Inter-process Communication (IPC)](http://www.mobileorchard.com/apple-approved-iphone-inter-process-communication/) + +[CoreLocation tutorial](http://www.mobileorchard.com/hello-there-a-corelocation-tutorial/) + +About +----- + +Alocola was developed by [Dan Grigsby](http://www.unpossible.com) for the iPhone programming blog and podcast [Mobile Orchard](http://www.mobileorchard.com). + +Read the [launch announcement](http://www.mobileorchard.com/alocola-mobile-orchards-safari-helper-makes-websites-location-aware/) for the backstory behind Alocola. + +Visit the [Alocola website](http://www.alocola.com) for contact info. diff --git a/main.m b/main.m new file mode 100644 index 0000000..b3b32ab --- /dev/null +++ b/main.m @@ -0,0 +1,17 @@ +// +// main.m +// MicBlow +// +// Created by Dan Grigsby on 8/19/09. +// Copyright __MyCompanyName__ 2009. All rights reserved. +// + +#import + +int main(int argc, char *argv[]) { + + NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; + int retVal = UIApplicationMain(argc, argv, nil, nil); + [pool release]; + return retVal; +}