want to build an iOS app that can send text messages to groups - ios

I'm learning Swift and newbie all together. I want to build an app I need. I play a lot of tennis and have a network of men and women of around 50 or so at various skill levels. I want to create an app that lets my network know I'm looking for a specific player, skill, day, time and I also want to see who is free or not. At the moment everything is done through texts, either sending a blast or text to each individual player. Players range from 18-60+ so not everyone uses facebook, etc, but I think having a tennis specific app could work.
Can I build an app that, when signed up, you'll be able to see who is available, and also send out alerts to the app OR as a text, when someone is looking for a player(s), or someone has made themselves available at a certain day or time slot. Also, if a text is received for those that do not have the app installed, the text response will notify the app and update their status.

Probably the quickest/easiest way to get started with this is using Parse (parse.com) with push notifications. However, you should consider a simpler project for starting out, because this would still be a very complicated project.

Related

Extracting screen time usage of the user in an Ios app (maybe with the Screen Time API)

Dear StackOverFlow Friends,
We are having a hard time understanding a concept that relates to the app idea that we are planning to develop. Imagine that we have an app called A. that requires the user's screen time usage information for selected apps like Udemy, Duolingo, and such. Our concept does not require any kind of app tracking or anything else, the only information that we need to acquire is the screen time information of the user. Accordingly, we have found an API namely Screen Time API, however, within the documentations and open topics, we couldn’t exactly be sure that we would be allowed to have such information. In this sense, we will need your kind support directing us around the idea and API.
The app will provide a futuristic, ToDo, and agile-oriented device usage environment for users to track their daily objectives by directly using the screen time information (of the apps, not just the overall phone usage).
Are we able to extract Screen Time information of the user's various apps?
Are we able to use the Screen Time API, no questions asked?
Do we need to create a proposal for the AppStore team that elaborates our idea for the App publishment?
Regards.

How do social networking apps update their UI in real-time?

I was wondering how social networking apps, such as Twitter, Facebook and WhatsApp update their user interface in real-time when another user interacts with the user of the app. To use the best example I can think of: when you have a chat window open in WhatsApp, the UI updates automatically (without any user actions required) when the user you're chatting with interacts with you. Messages appear on your screen without refreshing and the "last seen" status at the top of the screen updates automatically when your chat partner either goes offline or comes back online. I can think of two ways to achieve this:
Remote push notifications: this approach strikes me as the 'cleanest' way to do this, but it's probably also the riskiest way. Using silent notifications (content-available) to pass data to another device at the moment a user does something, would probably save you a lot of HTTP requests and therefore would make your app consume a lot less data and CPU usage. The risk of this approach is that a user can easily disable ALL push notifications to save battery power (including silent notifications) and then your app wouldn't be able to get notified on events remotely.
Local UI refreshing: This approach is obviously the safest, but I think it's really 'nasty' and eventually everyone would feel the downside of it. Constantly refreshing the UI and re-retrieving data from the database to make sure the latest messages and statuses are displayed to the user would be safe in the way that your app doesn't have to rely on the device's battery and background mode settings, but the downside is that this will make your app consume a lot of data and battery power, which would be bad for the user's data plan and his device. I also don't think Apple would approve of an app that's consuming so much data and power.
I've just implemented a chat function into my own app, and I want to enable the same real-time UI updating that WhatsApp uses. What would be the best way to do this? Should I use one of the two methods above or can someone think of another way to do this? By the way, I'm a relatively new programmer who just recently learned how to develop iOS apps (Swift). I'm very far from being a pro, so please go easy on the explanations and work method capabilities. Thanks!
The chat apps make use of WebSockets to create a constant connection with the client and a backend server.
This article on Appcoda can help you start learning about Socket.io. It answers your questions and also helps you to create a demo app.

How do I deal with save game data when changing Apple ID on ios device

This comes close to an opinion question, but I hope that someone can give a definitive answer.
I have written a game app and I save game data locally. But I also will want it to be cloud capable and I am currently writing the code but I keep hitting a mental barrier. In several places in the iCloud and Game Center documentation it says if I change Apple ID, I need to delete the local save game data/file cache. This is contrary to how my app currently works, which is OK if I can figure out the right way to do it. In the ICloud documentation it says to either user the cloud or don't use the cloud and only ask once, but there is a button in the settings to turn the iCloud Drive on and off.
The core of my dilemma seems to be that an IOS device is not tightly linked to one Apple ID. I understand that multiple devices can be associated with one Apple ID, but not why it should be true the other way around.
This can be seen as either added capability or enough rope to hang oneself. As a user I can, using my Apple ID, get on to another device not associated with my Apple ID and:
download an App/Song
log into Game Center and play a game we both own.
etc.
I know Apple deals with this and now I have to do the same.
As App Developer I see a world of questions about what this might mean, like "Well I'll do this or that but what do I do the first time this other thing happens?", etc.
For example, initially I thought I could consider "local" store the same as a very long airplane mode, and when the cloud became available I could sync the delta to the cloud and across devices, but this does not address changing Apple ID. Do I blow away the local data, keep the new user from playing the game, only allow local or cloud but not both?
Now Apple is adding Multitasking, and a login to iPad's used in schools, the problems become even worse.
I keep trying to find some profundity that will steer me to the correct answer but I am at a loss on how to deal with Apple ID changes.

Is it possible to issue an alert when a GameKit opponent is ready?

I made a game using GameKit and I am using the framework to manage a real-time match between two opponents. If I invite a specific person to a match, or make sure they are "waiting for opponent" at the same time as me, the match and game goes smoothly and everything is great.
The problem I have now is that there aren't a lot of people on my app yet, and so people that are wanting to play against a random opponent who also wants to play, don't have any way of knowing when a match could be ready.
Is there a way to utilize GameKit, but enhance the experience so that a push notification or alert of some kind is sent when an opponent is found? It could be this is all built in, but I'm not seeing anything.
AFAIK, GameKit does not support push-notifications for matching real-time games while your App isn't running.
But, GameKit has a Player Activity API that tells you how many matches were requested in the last 60 seconds, and you could use that number to create an informative message or status to show the player.
EDIT: the methods in question are
- queryActivityWithCompletionHandler:
- queryPlayerGroupActivity:withCompletionHandler:

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