location updates from iPhone Simulator - ios-simulator

i am testing my application on XCode 4 using iPhone simulator.
i have made program which will take location updates using G.P.S. on my MAC there is no G.P.S only internet working. So how can i check my application is working or not.
Thanks

The guys from future tap created FTLocationSimulator for this task.
It is a replacement class for CLLocationManager and it allows the replay of tracks recorded in kml format.
Works very well.
I heard that there is a built-in location simulator in the iPhone Simulator of iOS5. But I've never used it.

Related

Xamarin Forms - iOS debug on actual device hangs on launchscreen. Workin on simulator

I have a XF app already published on the play store and now I am targetting iOS. During developpent I made sure the app was still working on iOS, using the simulator only.
On the simulator everything works as expected, the launch screen is shown then the MainPage starts. But when I debug on an actual IPhone device, the app get stuck on the Launchscreen.storyboard for about 20 sec then the app exits. I've no debug output and it seems that the AppDelegate is never hit. Breakpoints in AppDelegate.FinishedLaunching method are not hit for instance. I tried to F11 for start in debugging mode but I don't hit anything, still hanging on the launch screen. I was expecting the transition from simulator to device to be less painful.
My plist file contains the following permission requirements
...
<key>NSLocationAlwaysUsageDescription</key>
<string>We need to use your location</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>We are using your location</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>This app needs access to photos.</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>This app needs access to the photo gallery.</string>
The only difference I saw is that location permissions are not asked on the device while in the simulator it asks for it at start. But this might be related to the fact that I can't reach AppDelegate, I am not sure yet.
The iOS project was generated via Prism templates. I am using VS 16.8.0 on Windows, XF 4.8.0.1687, Prism 8.0.0.1909, Xamarin iOS SDK 14.4.1.3 and I am set to "don't link" for linkers option. The device is an Iphone 10.
Any idea how can I find out the root cause - or get some useful logs?
Thanks in advance for your help.
EDIT:
Here are the device log output during a new installation https://taits.s3-eu-west-1.amazonaws.com/devicelogs.txt. I am trying to go through them but kinda lost.

watchOS2 and NSLog on device

I am using XCode 7 (beta) to write standalone watchOS2 App Extension.
Debugger works fine, so I can use breakpoints for example, but seems to be that NSLog() is not working for the Watch. Note: It works fine on simulator, but doesn't work on device
Whatever I write to NSLog(#"..") is not displayed in Debug Area.
So the question is:
Is this behavior expected or am I doing something wrong? Are there some workarounds to see some debug logs, may be use WatchConnectivity for example?
Thanks in advance!
Until NSLog() works on real watchOS 2 devices I've ended up using -[WCSession sendMessage:replyHandler:errorHandler:] to send log strings from my watchOS 2 app back to my iOS phone app and then NSLog them from my phone app.
Did you try this one?
It's a known issue on developer forum.
You have to unpair and re-pair your watch to trust your computer.
Then you could see NSLog in Debug area.

URLForUbiquityContainerIdentifier never returns on iPad Air 2 running iOS 8.1

I have a new iPad Air 2 running iOS 8.1 that I am using to test my app.
The call to URLForUbiquityContainerIdentifier never returns.
I installed iOS 8.1 on my iPhone 5s and everything works as expected.
I am thinking there may be a bug in iOS 8.1 for the iPad Air 2 but I am not sure. I noticed that in Settings for iCloud that Documents and Data wasn't even listed, and I signed out and signed back in and Documents & Data showed up in settings. That leads me to believe that this might be an iOS bug.
But in case it is not, is anyone else had the call to URLForUbiquityContainerIdentifier never return? If so, what did you do to fix it?
This is a Core Data app using iCLoud storage for an sqlite data store.
I call ubiquityIdentityToken before and it retuns a non-nil value, so iCloud is available.
NSURL *cloudStoreURL = [fileManager URLForUbiquityContainerIdentifier:#"XXYYZZ.com.yourcompany.appname"];
A user emailed me and said it suddenly started working for him. I just ran my app with no changes and everything works as it should. I do not know why it is working, but something changed somewhere, my guess is Apple changed something.
I've seen the same issue recently for one of my apps. It never occurred directly for me but it has occurred for Apple during the review process. However, it happened only for one of my apps. A second app with the same code never showed the issue for myself or for Apple. I have contacted DTS regarding the problem. If I get a solution I'll post it here.

iOS Simulator keeps asking for an app to simulate

I only use the iOS simulator for testing websites, not actual apps. Today I opened it up and it keeps asking me for an app for it to simulate. If I click cancel, it just quits the simulator.
I've tried deleting preference files, but I'm just not familiar enough with the simulator to know what's going on. How can I just get this back to normal, or satisfy this dialog?
I think you could try the menu
iOS Simulator -> Reset Content and Settings...
This would clean your simulator storage.
Update
According to this link, Cleaning up the iPhone simulator
move to path
/Users/<username>/Library/Application Support/iPhone Simulator/{6.0 / 6.1}
You could try to clean it manually

Location service permission(alert) not showing in iPod

I have uploaded a GPS based iPhone app(iOS 6) to app store. One of my friend told that, core location permission is not asking for his device(iPod). As his location is not getting updated, he misses the functionalities. I have tried many devices here (iPhone 4S, 5 and iPad), but all get worked nicely. I don't know what is wrong with my app. If any body has idea then please help me.
Chances are that the iPod he is testing with is not location capable. If the device is not capable of location updates, it will never prompt the user for location.
I would embed an alert if the device can't use location so the user/tester knows why location updates aren't working.
Newer iPad/iPod Touch devices can get location updates based on the new Wifi tiling, but that functionality (new to iOS 6) is not backwards compatible with older devices. That is why it is best to test for location availability first, then alert if not available.
The API got a update recently (iOS 6) and I remember the way to get the permissions for Location and showing its message (purpose) got deprecated.
Take a look at the docs and find the deprecated stuff.
I hope it helps.

Resources