Discussion Forums  >  Uncategorized

Replies: 26    Views: 574

elaine
buzztouch Evangelist
Profile
Posts: 385
Reg: Dec 26, 2010
Ireland
3,850
01/09/11 02:04 PM (15 years ago)

location

Hello, I don't need my apps to know my users location. How do I turn this off? Thanks, Elaine.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
01/10/11 10:26 AM (15 years ago)
Good questions. If you're working with Android... Look at Act_Home.java in the /src directory. Scroll down and find these two methods: downloadAppData() and checkForUpdates() then comment out the part of the URL that adds the devices latitude and longitude. These URL's don't need the devices info to provide the appropriate data, the device info is only sent to show user information on your control panel map.
 
aussiedra
Code is Art
Profile
Posts: 431
Reg: Dec 25, 2010
Brisbane, Austr...
8,260
like
01/11/11 03:48 AM (15 years ago)
how about to remove in xcode?
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
01/11/11 10:28 AM (15 years ago)
To remove location reporting in Xcode, find the miscObjects folder > DownloadFile.m In DownloadFile.m, find the downloadFile() method. Remove the latitude, longitude references so it doesn't append these to the URL
 
elaine
buzztouch Evangelist
Profile
Posts: 385
Reg: Dec 26, 2010
Ireland
3,850
like
01/12/11 01:55 PM (15 years ago)
Thanks! Apple will refuse to publish your app if it looks for a users location but that info it not required in the app itself. Maybe 'location' could be optional into a build down the road. ;) thanks again!
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
01/12/11 06:12 PM (15 years ago)
FYI: Apple will not refuse apps that look for users locations - there are literally tens of thousands of apps in the App Store that use location information - including loads of buzztouch built apps. Where Apple gets difficult is if you're using a users location to pipe them ads and other annoying content.
 
elaine
buzztouch Evangelist
Profile
Posts: 385
Reg: Dec 26, 2010
Ireland
3,850
like
01/13/11 01:27 AM (15 years ago)
We've reviewed your app but cannot post this version to the App Store because it requests location information yet does not have location features or provide location-based advertising. Applications using Core Location information must provide some user benefit, as documented in section 3.3.9 of the iOS Developer Program License Agreement: 3.3.9 You and Your Applications may not collect user or device data without prior user consent, and then only to provide a service or function that is directly relevant to the use of the Application, or to serve advertising. You may not use analytics software in Your Application to collect and send device data to a third party.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
01/13/11 01:52 AM (15 years ago)
Interesting, welcome to Apple-Mania. Hard to imagine they are sooooo arbitrary in their acceptance policy. I guess you'll have to turn off your location reporting like you originally posted. does not have location features or provide location based advertising and provide some user benefit. Opinions, opinions. Thanks for the update.
 
elaine
buzztouch Evangelist
Profile
Posts: 385
Reg: Dec 26, 2010
Ireland
3,850
like
01/15/11 06:38 AM (15 years ago)
thank you :)
 
elaine
buzztouch Evangelist
Profile
Posts: 385
Reg: Dec 26, 2010
Ireland
3,850
like
01/16/11 02:16 PM (15 years ago)
Hello, In xcode in the downloadfile.m I did this: //[postVars appendString:[NSString stringWithFormat:@&deviceLatitude=%@, [appDelegate.currentDevice deviceLatitude] == nil ? @0 : [appDelegate.currentDevice deviceLatitude]]]; //[postVars appendString:[NSString stringWithFormat:@&deviceLongitude=%@, [appDelegate.currentDevice deviceLongitude] == nil ? @0 : [appDelegate.currentDevice deviceLongitude]]]; Should I just delete these two lines instead? Thanks! Elaine.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
01/18/11 10:49 AM (15 years ago)
Commenting them out like did should be fine. No need to delete them if you commented them like above.
 
elaine
buzztouch Evangelist
Profile
Posts: 385
Reg: Dec 26, 2010
Ireland
3,850
like
01/18/11 03:09 PM (15 years ago)
Hello, I did as above (the code above was copied and pasted from my app in xcode) but the location still is on in the app and I think its just gone to round 2 with Apple. Is there anything else I need to delete / comment out? Thanks again!
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
01/19/11 08:37 AM (15 years ago)
I guess it depends on what they are worred about - lol. The first code-snppet prevented the device from sending any location information to a remote server. However, it did not turn off the app's location updating. In other words, it still would track where it was, it just wouldn't send that info anywhere. If you want to turn off the app's location updating, and prevent it from turning on the users GPS... see [you app name]AppDelegate.m, around line 126. This file is in the /config folder. Around line 126, comment out the line that turns on the location updater... it looks like this.. [self performSelector:@selector(startLocationUpdates) withObject:nil afterDelay:.2]; If you comment this line out, the GPS will never turn on.
 
elaine
buzztouch Evangelist
Profile
Posts: 385
Reg: Dec 26, 2010
Ireland
3,850
like
03/02/11 11:07 AM (14 years ago)
Hello, Coming up with the same thing in v1.5. I have selected 'no do not start GPS on launch' option in the app core properties but when I launched app on my iphone it asked me to allow app to access iphones location. How do I completely stop this (delete this out in the code) as I had to do in v1.4? The 1.5 code looks a bit different ;D thanks A MILLION!!!!!!!!!!! Elaine.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
03/02/11 12:25 PM (14 years ago)
Your post didnt' make any sense, I couldn't come up with any reason the device would try to turn on the GPS with the setting 'no' in the control panel. Duh, major brain-fade on our part. I did find the source code where this could happens. It's been fixed (see the v1.5 change log). So, you should be ok now with the new download. BUT, if you really really want to make this change in the source code (which means you'll need to do it every-single-time you download the project), do this: a) Find BT_application.m in BT_Objects folder b) find this line self.rootLocationManager = [[BT_locationManager alloc] init]; Comment it out to //self.rootLocationManager = [[BT_locationManager alloc] init]; We went through great pains to allow you to control this from the panel so you wouldn't have to mess with code so many times. Make the change on the panel, use the app's refresh button, then look at the Output console. I'm thinking you'll be all-good now.
 
elaine
buzztouch Evangelist
Profile
Posts: 385
Reg: Dec 26, 2010
Ireland
3,850
like
03/02/11 12:31 PM (14 years ago)
you're a legend thanks :) App done and on the way to itunes :D
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
03/02/11 12:33 PM (14 years ago)
How cool is that. It's gettin' a bit crazy around here - nearing 15,000 app's powered by buzztouch. Scary.
 
elaine
buzztouch Evangelist
Profile
Posts: 385
Reg: Dec 26, 2010
Ireland
3,850
like
03/03/11 11:05 AM (14 years ago)
hiya, just downloaded new 1.5 app. ran simulator (thanks for fixing bug) It asked me 'app wants to use users location' oh oh in buzztouch i had selected - no do not start gps :( (if you ever need a QA tester you know who to call lol!) Elaine
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
03/03/11 11:13 AM (14 years ago)
Yeah, this should not happen. Have you looked at the console? See what it says about Starting or Reporting location manager. If it's still starting the location manager, it will tell you in the console, it shouldn't be. My tests didn't ;-)
 
elaine
buzztouch Evangelist
Profile
Posts: 385
Reg: Dec 26, 2010
Ireland
3,850
like
03/03/11 11:30 AM (14 years ago)
ok copied a few random location related lines from the console - thanks again david 2011-03-03 18:03:38.361 horsethoughts[1106:207] BT_locationManager: startLocationUpdates 2011-03-03 18:03:38.358 horsethoughts[1106:6e03] horsethoughts_appDelegate: loadSoundEffects 2011-03-03 18:03:38.364 horsethoughts[1106:207] BT_application: App is starting the location monitor. 2011-03-03 18:03:38.563 horsethoughts[1106:207] horsethoughts_appDelegate: reporting to cloud at : http://www.buzztouch.com/appdata/v1.5.php?command=reportToCloud&appGuid=[buzztouchAppId]&apiKey=[buzztouchAPIKey]&deviceId=[deviceId]&deviceLatitude=[deviceLatitude]&deviceLongitude=[deviceLongitude]&deviceModel=[deviceModel]&userId=[userId] 2011-03-03 18:03:47.065 horsethoughts[1106:207] BT_locationManager: Location services not-allowed by user.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
03/03/11 11:36 AM (14 years ago)
OK.. so it is starting location updates (like you already realized). When you clicked 'NO' on the simulator to dissallow, thats what trigged the 'Location service not-allowed by user' message in the console. Do this for me: Remove the app totally from the simulator. Re-lauch it - DON'T click Yes or No when it prompts you. Next, copy the entire console and plop it in a text document... send that thing to info 'at' buzztouch.com so I can figure it out! Gotta be something dumb I'm missing ;-) Recap: Send the Console output as it reads BEFORE it prompts you for permission to use the location.
 
elaine
buzztouch Evangelist
Profile
Posts: 385
Reg: Dec 26, 2010
Ireland
3,850
like
03/03/11 11:42 AM (14 years ago)
ok, closed simulator. cleared console hit build and run email sent to you of console text ironically this time it didn't ask about the location.....!
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
03/03/11 12:30 PM (14 years ago)
@Elaine: The output you sent looks exactly like we want and I'm sure it works as expected. Here's the tricky part. On iOS devices, when the phone prompts for approval or dissapproval to allow locaiton updates, it remembers this stuff for a very long time. This is why removing and re-installing is necessary sometimes - just a good way to make sure you're starting from scratch and the phone doesn't have any possible way of using any historical data it saved when you chose Yes or No. Another thing about this. If a user chooses NO, prevent location services for an app, they will NOT be given another choice to say YES. If you say NO, it's NO. The only way a user can go back and allow location monitoring is to go into their apps settings screen (not the settings screen you may have included in your app, but the iOS settings screen) and reseting the permission. If they reset this, they will be prompted again. If they say YES, they may be asked at random times to say YES again. iOS will always remember NO, but YES is not permanent. It's Apple's way to randomly confirm a users previous choice.
 
elaine
buzztouch Evangelist
Profile
Posts: 385
Reg: Dec 26, 2010
Ireland
3,850
like
03/03/11 04:45 PM (14 years ago)
redownloaded the app 5 mins ago and installed on my iphone. It started up and then asked me to access my location :( GPS turned off in buzztouch. ;/
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
03/03/11 10:38 PM (14 years ago)
Back to MY drawing board, sounds like you're doing everyting you can / should. I'm a bit baffled b-cuz it tested 'so good' on this end. I'll download YOUR app and see what happens on the device, simulator, etc.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
03/04/11 01:11 AM (14 years ago)
Our thread is approaching the record - 25 posts! HUGE SIGH... very frustrating. I've been trying to figure this darned thing out for hours. FINALLY got it. You'll be the ultimate test though (ur good at it!). So get this, one character, one silly '1' where we needed a '0' - nuts. Literally tens of thousands of lines of code, like a needle in a haystack and the fix was one fricken character - gimme a break. So laughing. Before you re-download the package (you'll need to), check this out. Open up your project in Xcode (the one you have now) and have a look at BT_config.txt in the BT_config folder. Notice the 'startLocationUpdates' setting. I'll bet it equals 1. 1 is yes, 0 (zero) is no. Crazy eh' That silly little one is the gotcha. The app was using that 1 (yes, turn on the location manager) instead of the ZERO in the configuration data it downloads from the control panel. This means refreshing, deleting, nothing would change it. The '1' in the BT_config file that ships with the download never gets changed, it's just the default config file where the app learns it dataURL, api key, etc, etc. What a joke. I'll have to find a new line of work if you download the project and it asks you for permission again - gonna freak out. Funny. Super glad to have a buddy willing to battle through this with me - THANKS TONS. And, of course, don't be bashful to re-post if it's still not working.
 
elaine
buzztouch Evangelist
Profile
Posts: 385
Reg: Dec 26, 2010
Ireland
3,850
like
03/04/11 01:18 PM (14 years ago)
yes, it says 1 alright. Will redown load, wipe it off my phone and try again. Thanks again David. Email on the way to you soon as well.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.