diff --git a/SPGooglePlacesAutocomplete/SPGooglePlacesAutocompletePlace.h b/Library/SPGooglePlacesAutocompletePlace.h similarity index 89% rename from SPGooglePlacesAutocomplete/SPGooglePlacesAutocompletePlace.h rename to Library/SPGooglePlacesAutocompletePlace.h index 799b6dd..6322dbe 100644 --- a/SPGooglePlacesAutocomplete/SPGooglePlacesAutocompletePlace.h +++ b/Library/SPGooglePlacesAutocompletePlace.h @@ -19,7 +19,7 @@ /*! Contains the human-readable name for the returned result. For establishment results, this is usually the business name. */ -@property (nonatomic, retain, readonly) NSString *name; +@property (nonatomic, strong, readonly) NSString *name; /*! Contains the primary 'type' of this place (i.e. "establishment" or "gecode"). @@ -29,12 +29,12 @@ /*! Contains a unique token that you can use to retrieve additional information about this place in a Place Details request. You can store this token and use it at any time in future to refresh cached data about this Place, but the same token is not guaranteed to be returned for any given Place across different searches. */ -@property (nonatomic, retain, readonly) NSString *reference; +@property (nonatomic, strong, readonly) NSString *reference; /*! Contains a unique stable identifier denoting this place. This identifier may not be used to retrieve information about this place, but can be used to consolidate data about this Place, and to verify the identity of a Place across separate searches. */ -@property (nonatomic, retain, readonly) NSString *identifier; +@property (nonatomic, strong, readonly) NSString *identifier; /*! Resolves the place to a CLPlacemark, issuing Google Place Details request if needed. diff --git a/SPGooglePlacesAutocomplete/SPGooglePlacesAutocompletePlace.m b/Library/SPGooglePlacesAutocompletePlace.m similarity index 87% rename from SPGooglePlacesAutocomplete/SPGooglePlacesAutocompletePlace.m rename to Library/SPGooglePlacesAutocompletePlace.m index bf8e434..d29e535 100644 --- a/SPGooglePlacesAutocomplete/SPGooglePlacesAutocompletePlace.m +++ b/Library/SPGooglePlacesAutocompletePlace.m @@ -10,9 +10,9 @@ #import "SPGooglePlacesPlaceDetailQuery.h" @interface SPGooglePlacesAutocompletePlace() -@property (nonatomic, retain, readwrite) NSString *name; -@property (nonatomic, retain, readwrite) NSString *reference; -@property (nonatomic, retain, readwrite) NSString *identifier; +@property (nonatomic, strong, readwrite) NSString *name; +@property (nonatomic, strong, readwrite) NSString *reference; +@property (nonatomic, strong, readwrite) NSString *identifier; @property (nonatomic, readwrite) SPGooglePlacesAutocompletePlaceType type; @end @@ -21,7 +21,7 @@ @implementation SPGooglePlacesAutocompletePlace @synthesize name, reference, identifier, type; + (SPGooglePlacesAutocompletePlace *)placeFromDictionary:(NSDictionary *)placeDictionary { - SPGooglePlacesAutocompletePlace *place = [[[self alloc] init] autorelease]; + SPGooglePlacesAutocompletePlace *place = [[self alloc] init]; place.name = [placeDictionary objectForKey:@"description"]; place.reference = [placeDictionary objectForKey:@"reference"]; place.identifier = [placeDictionary objectForKey:@"id"]; @@ -81,12 +81,5 @@ - (void)resolveToPlacemark:(SPGooglePlacesPlacemarkResultBlock)block { } } -- (void)dealloc { - [name release]; - [reference release]; - [identifier release]; - [geocoder release]; - [super dealloc]; -} @end diff --git a/SPGooglePlacesAutocomplete/SPGooglePlacesAutocompleteQuery.h b/Library/SPGooglePlacesAutocompleteQuery.h similarity index 93% rename from SPGooglePlacesAutocomplete/SPGooglePlacesAutocompleteQuery.h rename to Library/SPGooglePlacesAutocompleteQuery.h index 6684fc3..dc0b91e 100644 --- a/SPGooglePlacesAutocomplete/SPGooglePlacesAutocompleteQuery.h +++ b/Library/SPGooglePlacesAutocompleteQuery.h @@ -30,7 +30,7 @@ /*! The text string on which to search. The Place service will return candidate matches based on this string and order results based on their perceived relevance. Defaults to nil. */ -@property (nonatomic, retain) NSString *input; +@property (nonatomic, strong) NSString *input; /*! Indicates whether or not the Place request came from a device using a location sensor (e.g. a GPS) to determine the location sent in this request. This value must be either true or false. Defaults to YES. @@ -40,7 +40,7 @@ /*! Your application's API key. This key identifies your application for purposes of quota management. Visit the APIs Console to select an API Project and obtain your key. Maps API for Business customers must use the API project created for them as part of their Places for Business purchase. Defaults to kGoogleAPIKey. */ -@property (nonatomic, retain) NSString *key; +@property (nonatomic, strong) NSString *key; #pragma mark - #pragma mark Optional parameters @@ -53,7 +53,7 @@ /*! The point around which you wish to retrieve Place information. */ -@property (nonatomic) CLLocationCoordinate2D location; +@property (nonatomic, strong) CLLocation *location; /*! The distance (in meters) within which to return Place results. Note that setting a radius biases results to the indicated area, but may not fully restrict results to the specified area. @@ -63,7 +63,7 @@ /*! The language in which to return results. See the supported list of domain languages. Note that we often update supported languages so this list may not be exhaustive. If language is not supplied, the Place service will attempt to use the native language of the domain from which the request is sent. */ -@property (nonatomic, retain) NSString *language; +@property (nonatomic, strong) NSString *language; /*! The types of Place results to return. If no type is specified, all types will be returned. diff --git a/SPGooglePlacesAutocomplete/SPGooglePlacesAutocompleteQuery.m b/Library/SPGooglePlacesAutocompleteQuery.m similarity index 90% rename from SPGooglePlacesAutocomplete/SPGooglePlacesAutocompleteQuery.m rename to Library/SPGooglePlacesAutocompleteQuery.m index 2faf0f1..2c04d21 100644 --- a/SPGooglePlacesAutocomplete/SPGooglePlacesAutocompleteQuery.m +++ b/Library/SPGooglePlacesAutocompleteQuery.m @@ -18,7 +18,7 @@ @implementation SPGooglePlacesAutocompleteQuery @synthesize input, sensor, key, offset, location, radius, language, types, resultBlock; + (SPGooglePlacesAutocompleteQuery *)query { - return [[[self alloc] init] autorelease]; + return [[self alloc] init]; } - (id)init { @@ -28,7 +28,7 @@ - (id)init { self.sensor = YES; self.key = kGoogleAPIKey; self.offset = NSNotFound; - self.location = CLLocationCoordinate2DMake(-1, -1); + self.location = nil; self.radius = NSNotFound; self.types = -1; } @@ -39,14 +39,6 @@ - (NSString *)description { return [NSString stringWithFormat:@"Query URL: %@", [self googleURLString]]; } -- (void)dealloc { - [googleConnection release]; - [responseData release]; - [input release]; - [key release]; - [language release]; - [super dealloc]; -} - (NSString *)googleURLString { NSMutableString *url = [NSMutableString stringWithFormat:@"https://maps.googleapis.com/maps/api/place/autocomplete/json?input=%@&sensor=%@&key=%@", @@ -55,8 +47,8 @@ - (NSString *)googleURLString { if (offset != NSNotFound) { [url appendFormat:@"&offset=%u", offset]; } - if (location.latitude != -1) { - [url appendFormat:@"&location=%f,%f", location.latitude, location.longitude]; + if (self.location) { + [url appendFormat:@"&location=%f,%f", self.location.coordinate.latitude, self.location.coordinate.longitude]; } if (radius != NSNotFound) { [url appendFormat:@"&radius=%f", radius]; @@ -71,8 +63,6 @@ - (NSString *)googleURLString { } - (void)cleanup { - [googleConnection release]; - [responseData release]; googleConnection = nil; responseData = nil; self.resultBlock = nil; @@ -84,7 +74,7 @@ - (void)cancelOutstandingRequests { } - (void)fetchPlaces:(SPGooglePlacesAutocompleteResultBlock)block { - if (!SPEnsureGoogleAPIKey()) { + if (!SPEnsureGoogleAPIKey(self.key)) { return; } diff --git a/SPGooglePlacesAutocomplete/SPGooglePlacesAutocompleteUtilities.h b/Library/SPGooglePlacesAutocompleteUtilities.h similarity index 100% rename from SPGooglePlacesAutocomplete/SPGooglePlacesAutocompleteUtilities.h rename to Library/SPGooglePlacesAutocompleteUtilities.h diff --git a/SPGooglePlacesAutocomplete/SPGooglePlacesAutocompleteUtilities.m b/Library/SPGooglePlacesAutocompleteUtilities.m similarity index 92% rename from SPGooglePlacesAutocomplete/SPGooglePlacesAutocompleteUtilities.m rename to Library/SPGooglePlacesAutocompleteUtilities.m index 894e743..44269b2 100644 --- a/SPGooglePlacesAutocomplete/SPGooglePlacesAutocompleteUtilities.m +++ b/Library/SPGooglePlacesAutocompleteUtilities.m @@ -26,13 +26,12 @@ SPGooglePlacesAutocompletePlaceType SPPlaceTypeFromDictionary(NSDictionary *plac return (type == SPPlaceTypeGeocode) ? @"geocode" : @"establishment"; } -BOOL SPEnsureGoogleAPIKey() { +BOOL SPEnsureGoogleAPIKey(NSString *key) { BOOL userHasProvidedAPIKey = YES; - if ([kGoogleAPIKey isEqualToString:@"YOUR_API_KEY"]) { + if ([key isEqualToString:@"YOUR_API_KEY"] || [key isEqualToString:@""] || !key) { userHasProvidedAPIKey = NO; UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"API Key Needed" message:@"Please replace kGoogleAPIKey with your Google API key." delegate:nil cancelButtonTitle:@"Dismiss" otherButtonTitles:nil]; [alert show]; - [alert release]; } return userHasProvidedAPIKey; } @@ -40,7 +39,6 @@ BOOL SPEnsureGoogleAPIKey() { void SPPresentAlertViewWithErrorAndTitle(NSError *error, NSString *title) { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:title message:[error localizedDescription] delegate:nil cancelButtonTitle:@"Dismiss" otherButtonTitles:nil]; [alert show]; - [alert release]; } extern BOOL SPIsEmptyString(NSString *string) { diff --git a/SPGooglePlacesAutocomplete/SPGooglePlacesAutocompleteViewController.h b/Library/SPGooglePlacesAutocompleteViewController.h similarity index 91% rename from SPGooglePlacesAutocomplete/SPGooglePlacesAutocompleteViewController.h rename to Library/SPGooglePlacesAutocompleteViewController.h index ec72b67..04f1797 100644 --- a/SPGooglePlacesAutocomplete/SPGooglePlacesAutocompleteViewController.h +++ b/Library/SPGooglePlacesAutocompleteViewController.h @@ -18,6 +18,6 @@ BOOL shouldBeginEditing; } -@property (retain, nonatomic) IBOutlet MKMapView *mapView; +@property (strong, nonatomic) IBOutlet MKMapView *mapView; @end diff --git a/SPGooglePlacesAutocomplete/SPGooglePlacesAutocompleteViewController.m b/Library/SPGooglePlacesAutocompleteViewController.m similarity index 92% rename from SPGooglePlacesAutocomplete/SPGooglePlacesAutocompleteViewController.m rename to Library/SPGooglePlacesAutocompleteViewController.m index d959b89..9022128 100644 --- a/SPGooglePlacesAutocomplete/SPGooglePlacesAutocompleteViewController.m +++ b/Library/SPGooglePlacesAutocompleteViewController.m @@ -36,12 +36,6 @@ - (void)viewDidUnload { [super viewDidUnload]; } -- (void)dealloc { - [selectedPlaceAnnotation release]; - [mapView release]; - [searchQuery release]; - [super dealloc]; -} - (IBAction)recenterMapToUserLocation:(id)sender { MKCoordinateRegion region; @@ -71,7 +65,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N static NSString *cellIdentifier = @"SPGooglePlacesAutocompleteCell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier]; if (!cell) { - cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier] autorelease]; + cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier]; } cell.textLabel.font = [UIFont fontWithName:@"GillSans" size:16.0]; @@ -97,7 +91,6 @@ - (void)recenterMapToPlacemark:(CLPlacemark *)placemark { - (void)addPlacemarkAnnotationToMap:(CLPlacemark *)placemark addressString:(NSString *)address { [self.mapView removeAnnotation:selectedPlaceAnnotation]; - [selectedPlaceAnnotation release]; selectedPlaceAnnotation = [[MKPointAnnotation alloc] init]; selectedPlaceAnnotation.coordinate = placemark.location.coordinate; @@ -135,14 +128,13 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath #pragma mark UISearchDisplayDelegate - (void)handleSearchForSearchString:(NSString *)searchString { - searchQuery.location = self.mapView.userLocation.coordinate; + searchQuery.location = self.mapView.userLocation.location; searchQuery.input = searchString; [searchQuery fetchPlaces:^(NSArray *places, NSError *error) { if (error) { SPPresentAlertViewWithErrorAndTitle(error, @"Could not fetch Places"); } else { - [searchResultPlaces release]; - searchResultPlaces = [places retain]; + searchResultPlaces = places; [self.searchDisplayController.searchResultsTableView reloadData]; } }]; @@ -193,7 +185,7 @@ - (MKAnnotationView *)mapView:(MKMapView *)mapViewIn viewForAnnotation:(id 'MIT', :file => 'LICENSE' } + s.authors = { "Matej Bukovinski" => "matej@bukovinski.com", "Chris Chen" => "chrischen79@gmail.com" } + s.platform = :ios, '6.0' + s.source = { :git => "https://github.com/chrischentickbox/SPGooglePlacesAutocomplete.git", :tag => '1.0.2'} + s.source_files = 'Library/*.{h,m}' + s.frameworks = 'CoreLocation' + s.requires_arc = true +end diff --git a/SPGooglePlacesAutocomplete.xcodeproj/project.pbxproj b/SPGooglePlacesAutocomplete.xcodeproj/project.pbxproj index 1a2e66f..f23401f 100644 --- a/SPGooglePlacesAutocomplete.xcodeproj/project.pbxproj +++ b/SPGooglePlacesAutocomplete.xcodeproj/project.pbxproj @@ -7,27 +7,38 @@ objects = { /* Begin PBXBuildFile section */ + 65D5BBD7192525BD0014596B /* SPGooglePlacesAutocompletePlace.m in Sources */ = {isa = PBXBuildFile; fileRef = 65D5BBCE192525BD0014596B /* SPGooglePlacesAutocompletePlace.m */; }; + 65D5BBD8192525BD0014596B /* SPGooglePlacesAutocompleteQuery.m in Sources */ = {isa = PBXBuildFile; fileRef = 65D5BBD0192525BD0014596B /* SPGooglePlacesAutocompleteQuery.m */; }; + 65D5BBD9192525BD0014596B /* SPGooglePlacesAutocompleteUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 65D5BBD2192525BD0014596B /* SPGooglePlacesAutocompleteUtilities.m */; }; + 65D5BBDA192525BD0014596B /* SPGooglePlacesAutocompleteViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 65D5BBD4192525BD0014596B /* SPGooglePlacesAutocompleteViewController.m */; }; + 65D5BBDB192525BD0014596B /* SPGooglePlacesPlaceDetailQuery.m in Sources */ = {isa = PBXBuildFile; fileRef = 65D5BBD6192525BD0014596B /* SPGooglePlacesPlaceDetailQuery.m */; }; 9C4A632215B64A3F00E15FBA /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9C4A632115B64A3F00E15FBA /* UIKit.framework */; }; 9C4A632415B64A3F00E15FBA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9C4A632315B64A3F00E15FBA /* Foundation.framework */; }; 9C4A632615B64A3F00E15FBA /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9C4A632515B64A3F00E15FBA /* CoreGraphics.framework */; }; 9C4A632C15B64A3F00E15FBA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 9C4A632A15B64A3F00E15FBA /* InfoPlist.strings */; }; 9C4A632E15B64A3F00E15FBA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C4A632D15B64A3F00E15FBA /* main.m */; }; 9C4A633215B64A3F00E15FBA /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C4A633115B64A3F00E15FBA /* AppDelegate.m */; }; - 9C4A633A15B64AF700E15FBA /* SPGooglePlacesAutocompleteQuery.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C4A633915B64AF700E15FBA /* SPGooglePlacesAutocompleteQuery.m */; }; 9C4A633C15B64C9200E15FBA /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9C4A633B15B64C9200E15FBA /* CoreLocation.framework */; }; - 9C4A633F15B64FA400E15FBA /* SPGooglePlacesAutocompletePlace.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C4A633E15B64FA400E15FBA /* SPGooglePlacesAutocompletePlace.m */; }; - 9C4A634715B6950C00E15FBA /* SPGooglePlacesAutocompleteViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C4A634515B6950B00E15FBA /* SPGooglePlacesAutocompleteViewController.m */; }; 9C4A634815B6950C00E15FBA /* SPGooglePlacesAutocompleteViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9C4A634615B6950B00E15FBA /* SPGooglePlacesAutocompleteViewController.xib */; }; 9C4A634A15B695FA00E15FBA /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9C4A634915B695FA00E15FBA /* MapKit.framework */; }; - 9C4A63A015B6A4FB00E15FBA /* SPGooglePlacesAutocompleteUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C4A639F15B6A4FB00E15FBA /* SPGooglePlacesAutocompleteUtilities.m */; }; 9C4A63A615B6C01100E15FBA /* location.png in Resources */ = {isa = PBXBuildFile; fileRef = 9C4A63A415B6C01100E15FBA /* location.png */; }; 9C4A63A715B6C01100E15FBA /* location@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 9C4A63A515B6C01100E15FBA /* location@2x.png */; }; 9C4A63AE15B6C0DB00E15FBA /* locateButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 9C4A63AC15B6C0DB00E15FBA /* locateButton.png */; }; 9C4A63AF15B6C0DB00E15FBA /* locateButton@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 9C4A63AD15B6C0DB00E15FBA /* locateButton@2x.png */; }; - 9C4A63B215B73EA300E15FBA /* SPGooglePlacesPlaceDetailQuery.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C4A63B115B73EA200E15FBA /* SPGooglePlacesPlaceDetailQuery.m */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 65D5BBCC192525BD0014596B /* SPGooglePlacesAutocomplete-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SPGooglePlacesAutocomplete-Prefix.pch"; sourceTree = ""; }; + 65D5BBCD192525BD0014596B /* SPGooglePlacesAutocompletePlace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPGooglePlacesAutocompletePlace.h; sourceTree = ""; }; + 65D5BBCE192525BD0014596B /* SPGooglePlacesAutocompletePlace.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPGooglePlacesAutocompletePlace.m; sourceTree = ""; }; + 65D5BBCF192525BD0014596B /* SPGooglePlacesAutocompleteQuery.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPGooglePlacesAutocompleteQuery.h; sourceTree = ""; }; + 65D5BBD0192525BD0014596B /* SPGooglePlacesAutocompleteQuery.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPGooglePlacesAutocompleteQuery.m; sourceTree = ""; }; + 65D5BBD1192525BD0014596B /* SPGooglePlacesAutocompleteUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPGooglePlacesAutocompleteUtilities.h; sourceTree = ""; }; + 65D5BBD2192525BD0014596B /* SPGooglePlacesAutocompleteUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPGooglePlacesAutocompleteUtilities.m; sourceTree = ""; }; + 65D5BBD3192525BD0014596B /* SPGooglePlacesAutocompleteViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPGooglePlacesAutocompleteViewController.h; sourceTree = ""; }; + 65D5BBD4192525BD0014596B /* SPGooglePlacesAutocompleteViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPGooglePlacesAutocompleteViewController.m; sourceTree = ""; }; + 65D5BBD5192525BD0014596B /* SPGooglePlacesPlaceDetailQuery.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPGooglePlacesPlaceDetailQuery.h; sourceTree = ""; }; + 65D5BBD6192525BD0014596B /* SPGooglePlacesPlaceDetailQuery.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPGooglePlacesPlaceDetailQuery.m; sourceTree = ""; }; 9C4A631D15B64A3F00E15FBA /* SPGooglePlacesAutocomplete.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SPGooglePlacesAutocomplete.app; sourceTree = BUILT_PRODUCTS_DIR; }; 9C4A632115B64A3F00E15FBA /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 9C4A632315B64A3F00E15FBA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; @@ -38,23 +49,13 @@ 9C4A632F15B64A3F00E15FBA /* SPGooglePlacesAutocomplete-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SPGooglePlacesAutocomplete-Prefix.pch"; sourceTree = ""; }; 9C4A633015B64A3F00E15FBA /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 9C4A633115B64A3F00E15FBA /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 9C4A633815B64AF700E15FBA /* SPGooglePlacesAutocompleteQuery.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPGooglePlacesAutocompleteQuery.h; sourceTree = ""; }; - 9C4A633915B64AF700E15FBA /* SPGooglePlacesAutocompleteQuery.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPGooglePlacesAutocompleteQuery.m; sourceTree = ""; }; 9C4A633B15B64C9200E15FBA /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; }; - 9C4A633D15B64FA400E15FBA /* SPGooglePlacesAutocompletePlace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPGooglePlacesAutocompletePlace.h; sourceTree = ""; }; - 9C4A633E15B64FA400E15FBA /* SPGooglePlacesAutocompletePlace.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPGooglePlacesAutocompletePlace.m; sourceTree = ""; }; - 9C4A634415B6950B00E15FBA /* SPGooglePlacesAutocompleteViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPGooglePlacesAutocompleteViewController.h; sourceTree = ""; }; - 9C4A634515B6950B00E15FBA /* SPGooglePlacesAutocompleteViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPGooglePlacesAutocompleteViewController.m; sourceTree = ""; }; 9C4A634615B6950B00E15FBA /* SPGooglePlacesAutocompleteViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SPGooglePlacesAutocompleteViewController.xib; sourceTree = ""; }; 9C4A634915B695FA00E15FBA /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; }; - 9C4A639E15B6A4FB00E15FBA /* SPGooglePlacesAutocompleteUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPGooglePlacesAutocompleteUtilities.h; sourceTree = ""; }; - 9C4A639F15B6A4FB00E15FBA /* SPGooglePlacesAutocompleteUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPGooglePlacesAutocompleteUtilities.m; sourceTree = ""; }; 9C4A63A415B6C01100E15FBA /* location.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = location.png; sourceTree = ""; }; 9C4A63A515B6C01100E15FBA /* location@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "location@2x.png"; sourceTree = ""; }; 9C4A63AC15B6C0DB00E15FBA /* locateButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = locateButton.png; sourceTree = ""; }; 9C4A63AD15B6C0DB00E15FBA /* locateButton@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "locateButton@2x.png"; sourceTree = ""; }; - 9C4A63B015B73EA200E15FBA /* SPGooglePlacesPlaceDetailQuery.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPGooglePlacesPlaceDetailQuery.h; sourceTree = ""; }; - 9C4A63B115B73EA200E15FBA /* SPGooglePlacesPlaceDetailQuery.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPGooglePlacesPlaceDetailQuery.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -73,6 +74,24 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 65D5BBCB192525BD0014596B /* Library */ = { + isa = PBXGroup; + children = ( + 65D5BBCC192525BD0014596B /* SPGooglePlacesAutocomplete-Prefix.pch */, + 65D5BBCD192525BD0014596B /* SPGooglePlacesAutocompletePlace.h */, + 65D5BBCE192525BD0014596B /* SPGooglePlacesAutocompletePlace.m */, + 65D5BBCF192525BD0014596B /* SPGooglePlacesAutocompleteQuery.h */, + 65D5BBD0192525BD0014596B /* SPGooglePlacesAutocompleteQuery.m */, + 65D5BBD1192525BD0014596B /* SPGooglePlacesAutocompleteUtilities.h */, + 65D5BBD2192525BD0014596B /* SPGooglePlacesAutocompleteUtilities.m */, + 65D5BBD3192525BD0014596B /* SPGooglePlacesAutocompleteViewController.h */, + 65D5BBD4192525BD0014596B /* SPGooglePlacesAutocompleteViewController.m */, + 65D5BBD5192525BD0014596B /* SPGooglePlacesPlaceDetailQuery.h */, + 65D5BBD6192525BD0014596B /* SPGooglePlacesPlaceDetailQuery.m */, + ); + path = Library; + sourceTree = SOURCE_ROOT; + }; 9C4A631215B64A3F00E15FBA = { isa = PBXGroup; children = ( @@ -105,18 +124,9 @@ 9C4A632715B64A3F00E15FBA /* SPGooglePlacesAutocomplete */ = { isa = PBXGroup; children = ( - 9C4A639E15B6A4FB00E15FBA /* SPGooglePlacesAutocompleteUtilities.h */, - 9C4A639F15B6A4FB00E15FBA /* SPGooglePlacesAutocompleteUtilities.m */, + 65D5BBCB192525BD0014596B /* Library */, 9C4A633015B64A3F00E15FBA /* AppDelegate.h */, 9C4A633115B64A3F00E15FBA /* AppDelegate.m */, - 9C4A633815B64AF700E15FBA /* SPGooglePlacesAutocompleteQuery.h */, - 9C4A633915B64AF700E15FBA /* SPGooglePlacesAutocompleteQuery.m */, - 9C4A63B015B73EA200E15FBA /* SPGooglePlacesPlaceDetailQuery.h */, - 9C4A63B115B73EA200E15FBA /* SPGooglePlacesPlaceDetailQuery.m */, - 9C4A633D15B64FA400E15FBA /* SPGooglePlacesAutocompletePlace.h */, - 9C4A633E15B64FA400E15FBA /* SPGooglePlacesAutocompletePlace.m */, - 9C4A634415B6950B00E15FBA /* SPGooglePlacesAutocompleteViewController.h */, - 9C4A634515B6950B00E15FBA /* SPGooglePlacesAutocompleteViewController.m */, 9C4A634615B6950B00E15FBA /* SPGooglePlacesAutocompleteViewController.xib */, 9C4A632815B64A3F00E15FBA /* Supporting Files */, 9C4A63A315B6BFFC00E15FBA /* Resources */, @@ -172,7 +182,7 @@ 9C4A631415B64A3F00E15FBA /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0450; + LastUpgradeCheck = 0510; ORGANIZATIONNAME = "Stephen Poletto"; }; buildConfigurationList = 9C4A631715B64A3F00E15FBA /* Build configuration list for PBXProject "SPGooglePlacesAutocomplete" */; @@ -213,13 +223,13 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 65D5BBDA192525BD0014596B /* SPGooglePlacesAutocompleteViewController.m in Sources */, + 65D5BBD8192525BD0014596B /* SPGooglePlacesAutocompleteQuery.m in Sources */, + 65D5BBDB192525BD0014596B /* SPGooglePlacesPlaceDetailQuery.m in Sources */, + 65D5BBD9192525BD0014596B /* SPGooglePlacesAutocompleteUtilities.m in Sources */, 9C4A632E15B64A3F00E15FBA /* main.m in Sources */, 9C4A633215B64A3F00E15FBA /* AppDelegate.m in Sources */, - 9C4A633A15B64AF700E15FBA /* SPGooglePlacesAutocompleteQuery.m in Sources */, - 9C4A633F15B64FA400E15FBA /* SPGooglePlacesAutocompletePlace.m in Sources */, - 9C4A634715B6950C00E15FBA /* SPGooglePlacesAutocompleteViewController.m in Sources */, - 9C4A63A015B6A4FB00E15FBA /* SPGooglePlacesAutocompleteUtilities.m in Sources */, - 9C4A63B215B73EA300E15FBA /* SPGooglePlacesPlaceDetailQuery.m in Sources */, + 65D5BBD7192525BD0014596B /* SPGooglePlacesAutocompletePlace.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -244,7 +254,7 @@ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; COPY_PHASE_STRIP = NO; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; @@ -258,6 +268,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 6.0; + ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; }; name = Debug; @@ -269,7 +280,7 @@ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; COPY_PHASE_STRIP = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_WARN_ABOUT_RETURN_TYPE = YES; @@ -285,6 +296,7 @@ 9C4A633615B64A3F00E15FBA /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ENABLE_OBJC_ARC = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "SPGooglePlacesAutocomplete/SPGooglePlacesAutocomplete-Prefix.pch"; INFOPLIST_FILE = "SPGooglePlacesAutocomplete/SPGooglePlacesAutocomplete-Info.plist"; @@ -297,6 +309,7 @@ 9C4A633715B64A3F00E15FBA /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ENABLE_OBJC_ARC = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "SPGooglePlacesAutocomplete/SPGooglePlacesAutocomplete-Prefix.pch"; INFOPLIST_FILE = "SPGooglePlacesAutocomplete/SPGooglePlacesAutocomplete-Info.plist"; @@ -325,6 +338,7 @@ 9C4A633715B64A3F00E15FBA /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; diff --git a/SPGooglePlacesAutocomplete.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/SPGooglePlacesAutocomplete.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..09df3f9 --- /dev/null +++ b/SPGooglePlacesAutocomplete.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/SPGooglePlacesAutocomplete.xcodeproj/project.xcworkspace/xcshareddata/SPGooglePlacesAutocomplete.xccheckout b/SPGooglePlacesAutocomplete.xcodeproj/project.xcworkspace/xcshareddata/SPGooglePlacesAutocomplete.xccheckout new file mode 100644 index 0000000..f8e91ad --- /dev/null +++ b/SPGooglePlacesAutocomplete.xcodeproj/project.xcworkspace/xcshareddata/SPGooglePlacesAutocomplete.xccheckout @@ -0,0 +1,41 @@ + + + + + IDESourceControlProjectFavoriteDictionaryKey + + IDESourceControlProjectIdentifier + F6D49258-0A05-4B63-8500-D726ED7022A7 + IDESourceControlProjectName + SPGooglePlacesAutocomplete + IDESourceControlProjectOriginsDictionary + + 8EC61E37-3D49-4761-8768-42F8B7792DC4 + ssh://github.com/andreamazz/SPGooglePlacesAutocomplete.git + + IDESourceControlProjectPath + SPGooglePlacesAutocomplete.xcodeproj/project.xcworkspace + IDESourceControlProjectRelativeInstallPathDictionary + + 8EC61E37-3D49-4761-8768-42F8B7792DC4 + ../.. + + IDESourceControlProjectURL + ssh://github.com/andreamazz/SPGooglePlacesAutocomplete.git + IDESourceControlProjectVersion + 110 + IDESourceControlProjectWCCIdentifier + 8EC61E37-3D49-4761-8768-42F8B7792DC4 + IDESourceControlProjectWCConfigurations + + + IDESourceControlRepositoryExtensionIdentifierKey + public.vcs.git + IDESourceControlWCCIdentifierKey + 8EC61E37-3D49-4761-8768-42F8B7792DC4 + IDESourceControlWCCName + SPGooglePlacesAutocomplete + + + + diff --git a/SPGooglePlacesAutocomplete/AppDelegate.m b/SPGooglePlacesAutocomplete/AppDelegate.m index dd1f14a..d987749 100644 --- a/SPGooglePlacesAutocomplete/AppDelegate.m +++ b/SPGooglePlacesAutocomplete/AppDelegate.m @@ -14,18 +14,14 @@ @implementation AppDelegate @synthesize window; - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; + self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; - SPGooglePlacesAutocompleteViewController *viewController = [[[SPGooglePlacesAutocompleteViewController alloc] init] autorelease]; + SPGooglePlacesAutocompleteViewController *viewController = [[SPGooglePlacesAutocompleteViewController alloc] init]; self.window.rootViewController = viewController; [self.window makeKeyAndVisible]; return YES; } -- (void)dealloc { - [window release]; - [super dealloc]; -} @end