Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 09-13-2010, 05:09 PM   #1 (permalink)
Registered Member
 
Join Date: Feb 2010
Posts: 102
chrysb is on a distinguished road
Default Adding a custom message to the location permission alert view

I've noticed several apps that now add a reason to why they're asking for location, e.g.

Code:
MyApp would like to use your current location.

This is so we can add your location to the photos you take.
How is this done?
chrysb is offline   Reply With Quote
Old 09-13-2010, 05:40 PM   #2 (permalink)
Emphasizing Fundamentals
 
BrianSlick's Avatar
 
Join Date: Jul 2009
Location: NoVA / DC Area
Age: 36
Posts: 7,990
BrianSlick has a spectacular aura about
Default

CLLocationManager

Quote:
purpose
An application-provided string that describes the reason for using location services.

@property(copy, nonatomic) NSString *purpose
Discussion
If this property is not nil and the system needs to ask for the user’s consent to use location services, it displays the provided string. You can use this string to explain why your application is using location services.

You must set the value of this property prior to starting any location services. Because the string is ultimately displayed to the user, you should always load it from a localized strings file.
I did not know the answer before looking in the documentation.
__________________
BriTer Ideas LLC - Professional iOS App Development. Available for hire.

SlickShopper 2 | Free NSLog utility | Leave a PayPal donation.

Are you a newbie? Things you should read:
Definitive Guide To Properties | UITableView Series | Guide To Troubleshooting | Model Object Overview

Do you sit at a desk all day? Walk instead! Follow along with my treadmill desk adventures.
BrianSlick is offline   Reply With Quote
Old 09-14-2010, 02:14 PM   #3 (permalink)
Registered Member
 
Join Date: Feb 2010
Posts: 102
chrysb is on a distinguished road
Default

Quote:
Originally Posted by BrianSlick View Post
CLLocationManager



I did not know the answer before looking in the documentation.
Thanks Brian! I've just found that in the sample code.
chrysb is offline   Reply With Quote
Old 12-02-2011, 04:11 AM   #4 (permalink)
Registered Member
 
Join Date: May 2011
Posts: 53
pavlicky is on a distinguished road
Default

Hi guys,

I have problem with CLLocationManager purpose property. I set it up in my viewDidLoad:
PHP Code:
self.locationManager = [[CLLocationManager allocinit];
    
self.locationManager.delegate self;
    
self.locationManager.desiredAccuracy kCLLocationAccuracyBest
    
self.locationManager.distanceFilter 100;   
    
self.locationManager.purpose = [NSString stringWithFormat:@"We'll spy on you!!!"]; 
In my viewWillAppear I call startUpdatingLocation.

However when I launch the app in the simulator or device for the very first time, I get just message "xxx app would like to use your current location" - the purpose string is not shown - why???

Cheers for replies
pavlicky is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 332
14 members and 318 guests
Absentia, cgokey, fiftysixty, givensur, heshiming, iGamesDev, linkmx, michaelhansen, mraalex, PixelInteractive, raihan.zbr, Sloshmonster, Trickphotostudios
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,657
Threads: 94,117
Posts: 402,890
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jenniead38
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 12:07 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0