is there any method to follow the applications on ios devices?
For instance , can I ping to ios devices on server side? or can I send silent push to device to get if application runs or not?
Thank you.
Your best bet is to let the app sending 'online' and 'offline' (combined with some unique per device id to the server) every time it gets open and closed. Then your server can store the state in some kind of database and you can read it from there if an app is currently online or offline on the client device.
Related
Assuming I have permission from the user, is it possible for my server to trigger an action on my app on my user's phone? Does the phone have to be unlocked?
I want to make calls to the keychain API using both crons and manual requests.
If it is your app on the client, then you can do anything that is in the capabilities of the application. Are you asking for a hosted webview in your application?
If the phone is unlocked and the app is running, then yes you can have a two-way connection to a server, using either the TCP protocol or the WebSocket protocol. Otherwise, no.
I would like to connect it to a raspberry pi that will react via it's gpio ports everytime the iPhone receives a notification.
Is it possible to create an application that can forward all notifications arriving to an iPhone to a webserver in order to process that 'notification' data?
Thanks
https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html
Looking at this, it seems like you'd have to get the notificationn from the provider, since the APNs is a fairly closed system.
Hi,
In my application I have a small registration form. I want the functionality to work like following
If the device is connected to network, data should be stored directly
in server.
If device is not connected to network, then it should
store temporarily in device and when the device connects to network
it has to store the data in online server.
Please tell if this is possible and what is the right method to do it.
Thanks.
Yes, it's possible
You can store whatever state you want locally and use one of the Reachability classes to see if a network connection is available and then attempt to run your network code to upload this state to the server.
I'm just starting to get into app development and have just been learning the uses of Xcode and Objective-C language. Just wondering how an app like snapchat or any other app can send data from one user to another. General answers would suffice just to better my understanding.
How do they test this functionality?
How can they connect peer to peer and send data from one phone to another? Is it all accessed in one database that the app connects to everytime that it pulls down?
When you sign up for an app like this with a registered account is that information stored on the iphone?
Well there are two ways data can be sent to a device. One is the device polls the main server periodically. This can be seen in a pull to refresh scenario. The other is the server can send a push notification to the specific phone and app which causes the data to be received by the device and displayed however the programmer wants. So device to device is essentially one person sending something through a web service call to your server. Your server them packages that information into a Json payload and sends a push notification to the recipient. It seems like its device to device because its so quick, but it requires that you have a server in the middle and of course your server is really sending the push notification to Apple's push server, so there really are two servers involved.
How do they test this functionality?
I would try to do this with real devices, and/or using a network sniffer tool to inspect the send packets.
How can they connect peer to peer and send data from one phone to another? Is it all accessed in one database that the app connects to everytime that it pulls down?
Someones sends you a snap
your app will ask the database every ...min or when you reload if there's something new to load, and gets it from the database if there is something new
When you sign up for an app like this with a registered account is that information stored on the iphone?
Connect to snapchat
get a snap from someone and wait till you can view it
start airplane mode and see if it loads, if it does there are files (temporarily) stored on your iPhone.
I have a project where I need to be able to send messages from a server running a web service to a specific iDevice. I have no idea how to do this, so any help is very appreciated.
The scenario: I have a web service which receives some message from an iDevice (could also be a Mac or PC, even an Android device). Depending on the content of this message I need to be able to send a message from the web service to another iDevice (I know the IP-address of the specific iDevice). I know how to use URLRequests to send a message from an iDevice to a server and collect the response from the server. In principle I could every 10 seconds send a request to the server asking if the server has any new messages to the sender (the iDevice sending the request), but I am pretty sure this is not the correct way to do it. Is there a way to have an iDevice listen for server communication on a specific port, so that the iDevice only does something active when it receives a message from the server to do something, e.g. display a message in the app listening for the server communication?
I guess I need to use something similar to the technology used for iMessage, but how is this done?
I am using XCode 4.6.2, iOS 6.1.
EDIT: Just to clarify my needs a bit more: The APNS seems to be TOO unreliable (at least that is what I have read in other threads regarding APN) as the web service in some cases can have the need for sending 2 distinct message to an iDevice within 1 minute (in some cases seconds), and as far as I have read in other threads this will simply not be possible because of how Apple's server handles ASPNS.
The app i am developing only needs to receive messages from the server when the app is active - is there any way, not using APNs, to do this, e.g. making the app listen for communication on a specific port?
Your scenario seems pretty similar to APPLE PUSH NOTIFICATIONs (APNs).
Ideally your server side should write a code in such a way that if there is any change on server side & need to be informed to all associated devices.
Then your server should post notification Apple server which will then send a notification to all the associated devices.
Refer this link
You already have but can use this code to identify the iOS/Mac deivce
NSString *identifierString = [[NSUserDefaults standardUserDefaults] objectForKey:#"myID"];
if (!identifierString) {
CFUUIDRef identifier = CFUUIDCreate(NULL);
identifierString = (NSString*)CFUUIDCreateString(NULL, identifier);
[[NSUserDefaults standardUserDefaults] setObject:identifierString forKey:#"myID"];
}
NSLog(#"%#",identifierString);
this code works till the lifetime of the app only.
After some search I have decided not to use the APNS, because it seems like people are having all sort of experience with it. I cannot use APNS because my project needs 100 % reliability and instant communication with the server.
I have decided to use tcp communication since my project only will be used in a local network. This will obviously mean more power consumption on the iDevices, but reliability is more crucial to the project.