How to show latest data on your app from a web server - ios

I have a parse.com backend and a swift ios8 app.
What is the best way for the apps that use the backend to be notified of changes to a certain table so that a collection view can reload its data?
Data is added to the db from one of the apps not via the website.
Would I need to setup push notifications? Or would I do regular checks from the app To see if data has changed? Or is there another way?

Use push notifications is the better way to achieve your goal.
Here's the steps:
1.Data added from another app to the db in your backend
2.Your backend shoud post a push notification to all your app
3.when your app received the notification, it must pull the newest data from backend and refresh the view in app
Regular checking from app will has a bad influence on you app's performance, so do not use this way if possible.

Related

iOS Switch between Parse Server Connections with a button click

Is it possible to initialize Parse configuration more than once in the app through a button?
The scenario is, Add a button inside a ViewController. When clicking, the app switches from my current live parse server to the testing server and vice versa.
Taking into consideration that the app cannot be killed and forced to restart as stated in apple documentation.
You have 2 options:
With Parse IOS SDK - Parse client is a singleton means that you can create only one instance of it. If you don't mind that users will need to close and open your app what you can do is to use NSUserDefaults there you can save the mode of the client (Test or Prod). Again... Users will need to manually restart the app.
Without Parse IOS SDK - it can be done (without restarting the app) only if you will create a custom REST client that will work against Parse REST API. In this way you can create as many client as you want and each client will have it's own configurations.

parse.com sending transaction emails

I want to send an email whenever someone makes a purchase in my ios App. What is the code to be able to do so?
I tried following the instructions here:
https://www.parse.com/questions/sending-email-with-mandrill-on-ios
but the first part does not make sense. Where do we put the javascript code?
Another requirement - I want to be able to change the email text whenever without releasing an app upgrade.
You put the JavaScript in your back-end web server hosted using the CloudKit APIs at parse.com: Parse JavaScript API. From your question, I'm presuming the back-end will send the email.
If the Parse back-end sends the email, there's no need to push an App Store update to your iOS app to change the email. You may, however, need to push an update to your Parse CloudKit app, depending upon how you've designed the back end.

What's the best approach to storing User Notifications in Parse?

New to Parse backend and coding all together...
Developing my first iOS app and I'm contemplating how I should store the data in Parse.
So I want to get advice from you lovely, experienced developers. What's the best way to structure my Parse class(es) if I want to store comments, follow requests, favorites, etc. That would make it simple when querying in an Alert tab within my app.
You probably don't want to store all the alerts on parse but rather send one alert via a notification and it's payload and store it locally.

Parse: One app on parse.com will be accessed by multiple iOS apps. Does it work?

we are about to finish our first app with parse.com. This first app is for the enduser. PushNotifications and everything are working fine.
Now we want to create an app for our admins to manage everything. We want it to be a separate app. Therefore I was wondering: will this be possible? Two apps connecting to one data collection on parse.
Especially regarding the PushNotifications. Admins should also receive a push notification on the new admin app (e.g. new member joins and needs to be activated).
Has anyone ever done something like this?
Or do we need to build the admin part into the main app?
The thing is we will need a third app, which is for business owners to manage their listing on our main app. So the same problem/question will apply then.
Looking forward to your feedback.
Txs!
Yes same Parse app ID can be used by different platforms/apps, that is basic concept of Parse. You can even use it in web, iOS, Android, etc with same parse app. This should not be a problem.
You might need to modify you parse data structure tough to suit your admin app requirement.
Check https://parse.com/docs/ios/guide#roles

Web App Interfacing with iOS app for push notifications

I have a basic web app that is able to send push notifications (via UrbanAirship) to my iOS app.
My questions is, how can my webapp know that I have a new iOS app user? So I can then put the push DeviceID into a database (along with other data as required).
i.e. what is the interface for getting data into the Webapp, is it new code in the iOS app, or is there some other interface from UA?
Thanks..
I'm not an iOS developer, so it's hard for me to be too specific, but I'm assuming you need to store a device ID and (possibly) a token so that you can send messages to that device. I'm assuming (also) that you have access to this information on the device.
The correct way to do this would be to create datastore table of devices and the information associated with them (tokens, various IDs, I also like to have the last time I sent them a message, etc.) Then you send a request (should be a POST request, semantically) to your app when the user registers their device. Send the information you need in the POST request, then store it in your datastore through a handler.
Hope that helps? That's how things are done with Android Cloud to Device messages, and from my quick perusal of Urban Airship, that's how their service works, too.

Resources