What does SKErrorCloudServicePermissionDenied and SKErrorCloudServiceNetworkConnectionFailed mean? - ios

There are two new StoreKit errors that have come up in iOS 9.3. I'm trying to make sure my app handles errors in the best way that it can, so was hoping someone could explain what they mean in terms of when they would be called, how you might handle them, and in what cases they wouldn't be called where they normally would?
According to Apple's documentation:
SKErrorCloudServicePermissionDenied
: Indicates that the user has not allowed access to Cloud service information.
SKErrorCloudServiceNetworkConnectionFailed
: Indicates that the device could not connect to the ne(t)work.
First of all, what is Cloud service? And what does it have to do with StoreKit? When I think of Cloud Service, I think of CloudKit and iCloud. But these technologies, to my knowledge, aren't used in StoreKit. Or if they are, no one told me, and WWDC hasn't explained it either.
How could one turn on/off cloud service, and if it's just iCloud, then would that actually stop an IAP from being processed? I don't think so.
And for the SKErrorCloudServiceNetworkConnectionFailed, by the description, that sort of sounds like something that would've been implemented long before iOS 9.3 (checking handling an error such as not being able to connect to the network). Of course, if it's not just 'the network', but rather this unknown CloudService network they're talking about, then maybe that's something different?

Related

Can I send a push notifiction from ios to ios, without a server?

In my research, I see this question has been asked a few times, but generally the response seems to be somewhere between "why would you do this?", "it's theoretically possible but not practical" and "yes, but there are technical issues".
I have a real world case where push messages will originate on an iphone and terminate on another iphone. The app is designed for family/couples, who can scan each other's phones to get device tokens, and store them within the app.
Most of the questions I found around this subject are pretty old and mentioned Apple's requirement to keep the APNS connection open for as long as possible, however I am not sure if this still holds with the HTTP2 interface that is now available.
Another comment is that it is difficult, but I'm not worried about that - I've written the server side for APNS and HTTP2, so it's "just" a case of rewriting it in objective C.
I realize that certificates are an issue, and might require users to update regularly to keep it working, although I wonder if there's some way to store them and just have the app update them automatically, without needing to update the whole app. No biggie either way.
So my question is, in 2018, is it possible to implement an iphone to iphone push notification and (taking into account what I said above), are there reasons not to? I could easily make a server for it, but the less third parties the message has to pass through, the better it is from a privacy/transparency perspective, hence peer to peer would be the ideal option.

Is it possible to create a call tracking app on iOS?

From all I have read here, creating a call tracking app on iOS seems impossible. However, after some investigation, I have found a couple of workarounds and would like to know if they are legal and would work at all.
So, at least, I will need one of these features:
access call log history. I've read that's impossible, but also I know that on many devices where iCloud backup is turned on, call history data is saved there, so using some API, for example, this, I can access it. Am I right?
receive notifications when the call is ended. I've read this is possible only in foreground, therefore makes no sense. But following this question, I see that you can initiate calls from the application, which allows at least to track outgoing calls.
Would this be enough or I am wasting time?
Unless you're running on a jailbroken device, the answer is no because there is no publicly available API that provides access to the call list and that is a good thing from a privacy point of view.
A quick search shows that CallKit is for integrating VOIP into the call list, so again the answer is no, CallKit will not be of any use to you.
The notifications are there so that your app can respond properly to calls that take place while it is active.

Saving resource on shared framework

I'm making a framework for iOS that collect data from the phone (GPS, WiFi, etc) and sends to a server and notifies the user on events.
My problem is that if two or more apps use the framework on the same device it will consume the battery and I only need to send the data from one app because the collection continues in the background.
Is there any way to know if these multiple apps are running and notify the app that other app is collection and sending the data?
No. The apps are sandboxed and cannot interact.
The framework will have no way of communicating with the other apps unless it sets-up some sort of networking on the client (not advised).
I wouldn't worry about it.
I'll probably look the problem inside out. When I start receiving info on the server from same ip/mac combination simultaneously I'll return a flag to all but one client on that particular device. When my framework receive that kind of flag, it will stop sending data, because someone else is already doing the same.
PS Your framework sounds like creepy spy thing though :)

Are there any benefits to using a push notification provider?

I am building an app that needs to use push notifications. Currently it is only an iPhone app and i have already implemented a manual version for push notifications.
There are quite a few services that do this kindof thing for you... Are there any benefits to using them? Having a nice API is not really relevant because of the fact that i have already implemented pushing manually.
The main reason i ask is that i downloaded the app Path and noticed that their push notifications seem to be a lot faster and a lot more reliable than my app...
Btw, Im using GAE for the backend.
Thanks
The most obvious benefit to using a push notification provider is not having to write the code yourself. Writing an efficient and reliable provider of Apple Push Notifications is not simple. If you want a quick solution and are willing to pay for it, using an existing provider is probably the way to go.
In my opinion the APNS API is bad. The fact that you don't get an acknowledgement for a successfull notification makes it hard to code a reliable provider. If you want to make sure you're not missing error responses from Apple, you have to attempt reading often from the connection, and with large timeouts, which will make your provider slow. On the other hand, if you want to send your notifications as quickly as possible, you'll have to sacrifice the reliability (because you won't be able to rely on getting all the error responses that Apple send). Of course, if you make sure that your DB doesn't contain invalid device tokens, and that you always send valid payloads, you can assume that you won't get error responses from Apple, which would allow you to send notifications quickly.
That said, I'm not sure how reliable and/or fast are the existing APN providers.
The best way to be sure of the quality of the provider you use is to write it yourself (unless you are willing to spend the time on testing the reliabily and speed of existing providers).

real time messaging for multi player game on ios

Building a multi player iOS game where players compete one against the other. Nature of the game is synchronous. Basically, players either invite each other through facebook, email, etc and then start playing.
We debate what is the best strategy for facilitating the real time communication between players (sending events, etc). Coming from web development, we used comet and long polling which worked great. However, it's not clear what's the best way to achieve that on iOS.
Seems like APN (Apple Push Notifications) is not suitable in our case for two reasons: the delay can be pretty significant, up to few seconds, as far as we understand. Also, using APN requires the user to authorize notifications. If the user doesn't authorize this then it won't be possible to play the game.
Also, we understand Apple's Game Kit (Game Center) can be of value in our case however it's not clear how it interacts with invites through facebook etc. Also, not clear if we need to get into bed with Apple's Game Center and how it'll affect the user experience.
Any guidance on this matter as well as other options that you might think of would be greatly appreciated.
Thanks for your help.
Before you read the rest, a disclaimer: I work for Realtime.co but I do believe I can help here so I'm not trying to "pitch a sale".
If you need to have real time updates, you can check out Realtime (www.realtime.co). It's basically a set of tools for developers to use real time technologies on their projects. It uses websockets but does fallback to whatever the user's browser supports (such as long polling, for example) if you are using a browser (which is not your case, but it's always good to know).
Behind Realtime you have a one-to-one/one-to-many/many-to-many messaging system that will transport your messages to and from your users.
There's a iOS API too which you can use in your project. You can download it here: http://www.xrtml.org/downloads_62.html#ios and check the documentation here: http://docs.xrtml.org/getting_started/hello_message.html#ios.
There's also a plus which is the fact that the Realtime framework is actually cross-platform. This means that you can even have your iOS players to communicate with players using Android, Windows Phone, HTML5, Flash, etc. if you decide on expanding your game to other platforms.
I hope that helps!
I'll just provide some insights on the question.
APN should never be used for synchro communication as for iOS at least, you'll never have both way communication (basically the Apple APN servers are pushing an information to the device).
You should probably play with C sockets in order to open a tunnel (depends if your game is real time or not).
Using the Apple Framework GameKit is great! But might take some time to understand all the functionnalities.
Check out Gree
https://developer.gree.net/en/
Parse:
https://www.parse.com/
Sparrow:
http://gamua.com/sparrow/
There are a few things that your talking about, there is the joining/starting of a game, and then the communication between the players. They are not necessarily related.
You can use game-center and at the same time another framework for facebook, they are not mutually exclusive (but it would be more work.)

Resources