IOS building real time application - ios

Well i am new to IOS development and want to create a realtime application. In my app i want to update data of tableview cell with real time information like we do with Google Drive shared sheet.
I am not using google drive but its an example. In my app i have a tableview which cell should be updated by realtime data. I have thousands of user groups and any member of group with access to modify can edit that data. So i need to reflect real time change to all other users of particular group.
The data can be anything like image, any formula or anything.
Well for that i have googled and found two options but i am confused which one should i go with.
PubNub library
NSTimer
Well i am not sure which one will be best suited for me. I have tried to create a demo app with PubNub but with heard luck i can't do more.
So can so please suggest me which should i choose or is there any other alternative. I am using Xcode 7.3 with swift 2.3
Thanx in advance.

PubNub is not based on Node, however we have many SDKs for over 70+ different languages/platforms, like Node and Swift. The network is a hosted realtime, data stream network (DSN) that the SDKs connect to allowing your app to send and receive messages in realtime around the world in < 1/4 second to 1 or millions of clients.
For more on this, read How PubNub Works?
You can use PubNub for free for up to 100 daily active devices and up to 1 million messages per month (plenty for a demo app).
You would use the PubNub Swift SDK to subscribe to publish and subscribe to some channel to update your app.
Please check out our Swift SDK docs to get started.

Related

Real Time Collaboration API for iOS Apps

I need a way to share a JSON data between 2 users in iOS and Swift. Does anyone have any suggestions for a way to do this? Maybe an official Apple or Swift API?
Requirements:
Easy to integrate with swift
Not hosted on a personal server
Thanks.
Apple offer the GroupActivities framework for that. During a Facetime call you can send custom data over the same connection for whiteboard apps with realtime collaboration. This year at WWDC 2022 they added a UDP tunnel for faster (but not guaranteed) data transfers and they also increased the packet size to 256KB. Here are some resources:
Videos:
WWDC21 session 10187: Build custom experiences with
GroupActivities
WWDC22: What's new in SharePlay
Sample code:
Drawing Content in a Group Session
Invite your friends to draw on a shared canvas while on a FaceTime call.

Is there any way to get the number of downloads of my iOS app?

I have been doing R&d for some time and I am trying to make a single platform where I can see all the numbers of downloads of my iOS app. I have gone through the documentation but the way we can see the app statistics is through login and then download the report. I like to do it pro-grammatically without using any third party extensions or packages. Just like for android you can use google storage api here in the docs google cloud storage (API). But is there any way to do the same with iOS apps ? The only API which they have exposed is App store connect API but it gives you results of sales and trends. I am not sure if it tells you also the number of downloads of your app.
Please point me in the right direction. I might be following the wrong path but I have googled a lot and i could not find a direct way to do that without using third party extensions.
Per the documentation for the App Store Connect API, the endpoint GET https://api.appstoreconnect.apple.com/v1/salesReports gives you daily, weekly, monthly, and yearly app sales figures. That's not downloads exactly, since somebody might download your app multiple times in order to install it on multiple devices, reinstall it after deleting it, etc. But it's probably the closest you're going to get without either creating your own analytics system or using a 3rd party one.

Online Data Storage and Transfer with Swift

I am trying to make a series of applications which require the user to make an account and login, therefore they could use the application on multiple devices and have the same data (e.g.. amount of virtual money and player score is about it), however, I have no idea how to go about this, I have decided it would be best for my app not use the apple GameKit (game centre) as it has a lot of limitations (e.g not showing usernames). What methods could I use to do this? Do I need to learn another language
Thank you
You can try Firebase, which serves as a backend especially for mobile applications. Basically, send a kind of a POST request to Firebase when the values you want to store have been changed in your game and send a kind of a GET request to fetch the said values to your mobile app(s). By this way, you can store data on Firebase and fetch it via multiple devices when the same user logs in from different devices.
For more information and a quick start, check this link: https://www.firebase.com/docs/ios/quickstart.html

Real time syncing

I want to develop application same as UBER in which I need to show available taxis in the selected region and update as the taxis are hired, available, unavailable. Kind of auto refresh.
Calling the web service in the background after regular time interval is not a good option.
Can any one suggest me better and fast way to achieve this.
Thanks
Push
Use sockets when the app is running. This will give you immediate updates.
Use Push notifications when the app is not running (use notifications for critical changes), and ignore these notifications when the app is already running, in favor of sockets.
Pull
Use NSURLSession to refresh your local DB with some regularity. This is very resilient to network failure.
Use a combination of approaches, since speed and robustness are mutually exclusive. Ultimately, your objective is to keep your local DB in sync with your server's DB, and fire internal messages as data changes. No small task, hence the Firebase answer.
The Most Simple way is to work with Firebase . Its No sql database and you will have instant update as you change anything .
This Video will guide you how speedy you can get update without any loop for refreshing data in application .
Ask me any help you need regarding Firebase .
You can use silent push notifications to update your map with updated taxi locations.
I would suggest you take a look at CloudKit. There are several reasons.
If you decide to just build one app and somehow have driver
functionality that is different from users (maybe by having drivers
register and sign-in) then the app can post shared data to a public
online database accessible to all users. You could use information
in this scenario to post local notifications as the need arises.
As iOS updates you will not be dependent on third party libraries
If you decide to create a driver app and a separate user app,
CloudKit will allow you to share data across these apps.
Apple deals with the security and availability.
Overall the process is very easy to implement.
You can combine the local notifications with the public database to
schedule reminders, alert users etc.
CloudKit when done correctly will be essentially free. Just transfer
CKAssets rather than raw data and your transfer/storage limits
become negligible.
You can also access your CloudKit databases from external web
services/websites if you want to extend the data further.
You can use CloudKit subscriptions to sync up user information
automatically
NB - As pointed out in comments this is new technology. It is in the
second generation and I prefer it because if one uses it creatively
then you can simulate the external push notification behavior together
with background support. CloudKit removes the need for a third party web server from which to push the external notifications (as the real notifications take place by writing to the shared database).
Check out my detailed answer on SO for sharing the data between apps with CloudKit. Here is a link to some CloudKit videos that further describe how CloudKit works. Apple has lots of documentation and sample projects available. You can review the developer website for more info on CloudKit.
CloudKit Quick Start

real time analytics for ios

I wan to integrate analytics in one of my project. I know Flurry analytics and Google analytics are good options, but both of these server are not tracking realtime data. It shows update after few hours on dashboard.
Is There any real time Analytics tool/library available which I can easily integrate with ios App?
On google Analytics, there is a real time tab, where you can watch how many users are using your app, where they are from, which version of your app they are using,...
I really like Appsee for real-time app analytics - and it’s super easy to integrate with an iOS app. Session recordings is one of the coolest features they offer, and it allows you to see exactly what was going on in the user journey (trends, crashes, bugs, ANR, etc.). You see everything in real time, which is great for understanding any issues in the app and quickly fixing / improving.

Resources