CloudKit does not work with Simulator - ios

Recently I've been having trouble getting the iOS Simulator to work with the records I've made in the CloudKit Dashboard. The interesting thing is that it works with a real device, but not with the simulator. CloudKit Dashboard says that it is a development environment. When I run my app with the simulator I get one of these two errors:
Error Domain=NSCocoaErrorDomain Code=4097 "The operation couldn’t be completed. (Cocoa error 4097.)" (connection to service named com.apple.cloudd) UserInfo=0x7a276d40 {NSDebugDescription=connection to service named com.apple.cloudd}
or I get
Error : CKError 0x7b658890: "Request Rate Limited" (7/2008); "This operation has been rate limited"; Retry after 3.0 seconds
Any idea of what is causing this problem?
Thanks!

You have to sign into iCloud on your simulator. Go to settings, iCloud, and enter your iCloud credentials.

Related

iOS app crashing when trying to create email

I am getting the following dialog pop up whenever I try and create an email from within my app:
I have tried deploying to 7, 7.1 & 8 and it crashed on each version.
Here is the error log:
2015-06-20 12:53:09.434 CDM App[1045:29809] Result: canceled
2015-06-20 12:53:09.446 CDM App[1045:29780] viewServiceDidTerminateWithError: Error Domain=_UIViewServiceInterfaceErrorDomain Code=3 "The operation couldn’t be completed. (_UIViewServiceInterfaceErrorDomain error 3.)" UserInfo=0x7ae62340 {Message=Service Connection Interrupted}
any help greatly appreciated!
Many Thanks,
Possibly duplication of this.
There is issue with composing mail on simulators, it will not effect on real device
You should also visit here.

Different NSError localizedDescription between iOS 7 and 8

I was testing how my app displays erros when not connected to the internet and I noticed that iOS 7 and 8 return different error messages for NSURLErrorNotConnectedToInternet (-1009)
iOS 7 Error
Error Domain=NSURLErrorDomain
Code=-1009 "The Internet connection appears to be offline."
UserInfo=0x17d5edc0 {NSLocalizedDescription=The Internet connection appears to be offline.,
NSUnderlyingError=0x17ecdd20 "The Internet connection appears to be offline."}
iOS 8 error
Error Domain=NSURLErrorDomain
Code=-1009 "The operation couldn’t be completed. (NSURLErrorDomain error -1009.)"
UserInfo=0x1740f9c80 {_kCFStreamErrorDomainKey=12,
_kCFStreamErrorCodeKey=8,
NSUnderlyingError=0x17405dd90 "The operation couldn’t be completed. (kCFErrorDomainCFNetwork error -1009.)"}
Is there any way to have iOS generate an error message that would be the same on both iOS 7 and 8?
Use the code, it's the same.
If they choosed to update the error message in iOS8, you can't do anything.
Maybe the intent is that this is an error where you shouldn't just show an error message with the technical reason, but where you should think what it means in terms of the user. The Internet connection could be down because WiFi is turned off, or 3G data is turned off, so you could ask to turn it on depending on how important the data is. If you are doing some background update, you might just do nothing. Or you might suggest to the user to do the operation later if that makes sense.
You can use the error code mapping from http://nshipster.com/nserror/

Voip app IOS getting error Error Domain=NSPOSIXErrorDomain Code=61 "The operation couldn’t be completed. Connection refused

I'm trying to create a Voip application as this tutorial
http://www.raywenderlich.com/29948/backgrounding-for-ios
But when running its getting the error
Error Domain=NSPOSIXErrorDomain Code=61 "The operation couldn’t be completed. Connection refused
When I run the source from tutorial gets same error
I think its the problem with the port assigned.
How can I solve this problem.
What value to give for port?
If you read his tutorial he mentions this. I'm sure it's your issue.
Before you run the app, you need a server with which to test it. You
can use a handy little utility every Mac already has called netcat
that, among other things, allows you to easily create simple
text-based servers.

mobileconfig file adding access to location services

We have an Enterprise app which needs to use Core Location. Our Ipad which will be distributed to our employees has some built in apps successfully "locked" out for certain apps, like Safari and Camera, et al. We do allow other built in apps such as mail and contacts and maps which is my problem at the moment. The Maps will load but it shows only a blank grid. No Map and location manager fails as shown in the error below.
Some one else create the profile and made the changes to the iPad. This person is unreachable and I have been given the challenge to fix it. I'm guessing it has something to do with the mobileconfig file because when I deleted it from a test iPad, all was well. I need to update the mobileconfig file but have no idea what to do to allow location updates. We do have a specific server we connect to, but like I said it works on the test iPad that does not have the mobileConfig profile installed. Please HELP!
Thanks
The message I get is:
Nov 6 11:45:23 iPad locationd[40] : PBRequester failed with Error Error Domain=NSURLErrorDomain Code=-1004 "Could not connect to the server." UserInfo=0x1d687fc0 {NSErrorFailingURLStringKey=https://gs-loc.apple.com/clls/wloc, NSErrorFailingURLKey=https://gs-loc.apple.com/clls/wloc, NSLocalizedDescription=Could not connect to the server., NSUnderlyingError=0x1d67c020 "Could not connect to the server."}
Nov 6 11:45:23 iPad locationd[40] : NETWORK: no response from server, reachability, 2, queryRetries, 2
Nov 6 11:45:37 iPad Aerobics[117] : location manager failed with location: Error Domain=kCLErrorDomain Code=0 "The operation couldn’t be completed. (kCLErrorDomain error 0.)"
Turns out the new .mobileconfig profile was not the cause, or it was but not directly. I needed to logon to our server and establish connection with location manager, then logon to our private server and do it again which included a compass error but fixed that by waving the ipad around - lol. Spent a full day trying to resolve this so I hope it helps someone.
Thanks to all who looked into my issue.

iAd refusing to display

iAd framework is doing my nut. AGAIN!
Please someone help me towards sanity.
Yesterday was working on the simulator, today it isn't. After an hour of raging at it I actually plug in my brain and log the error (iirc this is on the simulator)
Error Domain=ADErrorDomain
Code=3 "The operation couldn’t be completed. Ad inventory unavailable"
UserInfo=0x5a5bb50
{
ADInternalErrorCode=3,
NSLocalizedFailureReason=Ad inventory unavailable
}
then I try a reboot.
on the simulator:
Error Domain=ADErrorDomain
Code=4 "The operation couldn’t be completed. Application has iAd Network configuration error"
UserInfo=0x5839510
{
ADInternalErrorCode=4,
NSLocalizedFailureReason=Application has iAd Network configuration error
}
now try on the device:
Err Domain=ADErrorDomain
Code=1 "The operation couldn’t be completed. (ADErrorDomain error 1.)"
UserInfo=0x19c8c0 {}
finally I find something on Google:
http://useyourloaf.com/blog/2010/11/28/ad-inventory-unavailable-with-ios-42.html
This guy is saying it seems to be an issue with >= iOS 4.2.
So I try again using iOS 4.0 iPhone simulator
Yay, I get yet another error code.
Error Domain=ADErrorDomain Code=0 "Invalid data."
On your device, go to the Settings app. Tap Developer. Under iAd Developer App Testing, tap Fill Rate. Select the error rate you want to test.

Resources