How to initialize a CKSubscription in iOS 10.3 - ios

I am building an app that needs to subscribe to record changes in the public database of iCloud. Now, after watching the apple video's and reading their documentation, I decided to get to work. However, I immediately got stuck here:
All initialization methods on a CKSubScription are deprecated. This can be seen here, but meanwhile apple still seems to use the very same methods in their documentation here.
This left me surprised. Looking around on the web and SO, there doesn't seem too be much information or any tutorials available (at least, none with up to date info on initializing subscriptions), probably because this technology is relatively new and these changes are recent. I have very superficial experience with CloudKit, so I'd rather ask for a decent way to do this than to improvise something myself. My question is:
How to initialize a CKSubscription?
Obviously, if the entire idea of subscriptions is outdated I am open to any answer that will result in my app receiving pushes when records of specific types appear in my public database.

Seems like CKSubscription is really more or less deprecated.
According to http://iosdevetips.blogspot.de/2016/06/deprecated-apis-in-ios-10.html you should use CKRecordZoneSubscription and CKQuerySubscription now.
Update:
Like Trevis pointed out, the docs are not really helpful here, but at least Xcode shows a somewhat helpful Warning:

If you are looking for a new class to substitute Apple's own documentation, use CKQuerySubscription in place of CKSubscription. They have almost identical initializers.

Related

Settings in iPhone errors

So silly question here but if someone would humor me and lend any advice I would appreciate it SO much. I’ve had some issues since I’ve created my apple account, but one thing I keep noticing specifically that confuses me (my Apple ID once said it can not be changed, now it allows me the option to change my Apple ID and phone/email everything)
I wouldn’t be so concerned with this, but I’ve had reasons for safety/security concerns and then I noticed this. I see many “null” type messages in my data when I view it directly from my device as well. I’m not tech savvy at all so this is all beyond me. Forgive me please if I’m not posting this correctly. I receive error messages from apple when trying to download my data even. I’ve updated and reset my phone before but it doesn’t help. I want to just know this is user error on my end but I’m not finding information to confirm that anywhere I try to look. Thank you so much for anyone who might be able to point me in the right direction.

What do top iOS apps use for live notifications server-side?

This seems like a simple question to me, but it's one I simply can't find a good answer for: what do the top iOS apps (I'm talking Twitter, Facebook) use for live pushed data? Instead of polling an API for changes - real-time data updates, which I assume they have to have a method for.
My understanding is that the main solution is APNs (Apple Push Notifications) but I can't find any notable mention of apps using it... and have found only sparse support for NodeJS.
I'm deciding between that, and MQTT messages that trigger an API call. But I'm posting this question mainly because, in the back of my head, I think there's something I'm missing completely.
Thanks much for any information at all, or even pointing me in the right direction!
Check this out:
Firebase its really got but only for iOS and Android
AirNotifier supports iOS, Android and Windows
And this is a useful stackoverflow post for you.
happy coding!

Implementing Google Play Games Services in Swift

Hello fellow developers :)
I have been trying to implement Google Play Games Services in my newest app project, but find myself being completely lost. I find GMS to be quite complicated and therefore need some sort of tutorial to stand a chance.
Unfortunately the official guide on Googles websites (https://developers.google.com/games/services/ios/quickstart) only describes the setup process for Objective-C.
My question is therefore, as ambiguous as is, if anyone knows anything that could help me implement GMS. This includes links to tutorials, code-snippets, personal tips, or anything else that could come in handy.
And yes, I am aware that questions like these are often frowned upon due to their ambiguous nature. What must be understood is that this question is a desperate last attempt before giving up and going with GameCenter instead. I simply have not found the information needed anywhere else.
Thank you! :)
You may need to use a bridging header for this. Check out the following link by gguuss in GitHub: http://github.com/gguuss/gplus-ios-swift.

What is an undocumented method and a private API?

Recently I have get a reject from Apple because a use of a private API. I don't know exactly what is a private API nor an undocumented method. Could someone explain me what is an undocumented method and a private API? I'm really confused with that...
Follow up:
What is exactly the "official documentation"? Can I use some frameworks and classes made by thirds such as the Amazon one?
A private API or undocumented method is any object or method that is not part of the official documentation. In Objective C, and some other languages, it is relatively easy to find the list of methods (messages) that an object supports as well as the objects underlying the framework. (For example, just go into the debugger and look at the view hierarchy. You will likely see several view objects that don't exist in the documentation.) Sometimes you will even see instructions on how to use these methods and objects on the web.
One example that leaps to mind is -UIWindow _autolayoutTrace, I use it all the time when debugging autolayout, but it isn't documented and the leading underscore is a hint that you shouldn't be using it. That's fine for debugging, but if I shipped code that used that method it would be certain to be rejected.
But Apple specifically scans for these undocumented methods as part of the App Store review process and rejects apps that use them. This is because Apple might change how these undocumented methods work at any time. If your app was dependent on one of these hidden classes or methods your app might break when Apple released a new version of the SDK that changed this behavior.
There's a set of functionalities that Apple uses internally but are not publicly available for developers.
Any usage of such APIs will result in a rejection of the application by Apple.

iOS Jailbroken devices development: How to dump method calls

I am pretty new to development for iOS devices with jailbreak. From what I am reading I understand that to be able to do all the cool things which you can't do on non-jailbroken phones you have to hook up to a given class and override some of its behaviour. Since there is no documentation how a developer tracks to which class exactly he should hook?
I imagine that for instance if I wanted to have my app respond to a given event such as phone boot, call hang up or user clicking on an icon I would manually generate the given event and see what invocations have been made. Is this the proper way to track where you should hook your code and if yes how is it done.
Note I am not interested in exactly those events mentioned above I am more interested the approach in general.
There are several approaches:
Disassemble binaries
You can disassemble a binary or just dump classes with something like class-dump.
So, you can see the whole hierarhy of classes.
Find dumped classes
Most of major iOS subsystems were dissasembled by somebody already. You can find quite a lot of useful stuff.
As example. Google search "Springboard headers" got this
Dump classes in a runtime.
Look at this question for explanation: List selectors for Objective-C object

Resources