I know it's possible because of the existence of APIs and applications that do this.
As far as I can tell, however, the relevant APIs are undocumented.
How can I read previously sent and received SMS messages via iCloud?
InflatableDonkey is an open source project that downloads iCloud backups.
SMS messages are stored in target/backups/<icloud_username>/<hash>/<date_str>/HomeDomain/Library/SMS/sms.db, which is an SQLite3 database.
Related
I am creating a chat application with Node.JS's Socket.IO and there is a couple things I need clarification on.
I am implementing offline messaging in my app meaning that when a user opens the app he will receive all the messages he missed when they were online.
This is my approach:
1) Client opens the app and is subscribed/joins a room
2) The client sends a message to Socket.IO
3) Socket.IO inserts the message in some kind of database/datastore
4) When client tries to retrieve the messages it is pulled from the database/datastore and saved on the users phone then it is deleted from the database.
Is this a correct approach?
I was looking at online and some people suggested using task/message queues like Google App Engines Task Queue but I am not sure how this works.
Your approach sounds OK, but I wouldn't delete messages from a DB, at least not immediately after the client receives them.
From your question it seems that you're not currently saving the messages to a database.
This approach has some drawbacks; for example, the user can't view their chat history on a device that was not connected when some of the messages were sent.
There are 2 ways I can think of to do it in a more elegant manner:
Save all messages to DB. on websocket connection and reconnections, fetch all messages newer than your latest message (This approach assumes no edit functionality in your chat, as edits will not be fetched this way). The latter can be implemented using either HTTP or WebSockets.
If you don't want to store the messages in your server, then you should implement some sort of persistent cache in the device used to send the messages. This is very similar to your original solution, except that instead of storing the messages in a database, you're storing them on the user's device. this does require some logic to detect when messages are received, and when the recipient reconnects, in order to trigger sending the missing messages.
The first approach is much better for the general use case in my opinion, but it depends on your use case.
I'm sending messages to several iOS Apps via
FCM by using their HTTP protocol API,
and I need a list of message records including the payload, sent time, and platform like what I could monitor in the Firebase Notification Console.
It seems that messages sent via HTTP API wouldn't be recorded and shown in the console (only those sent manually in the console would).
I haven't found any API documents related to those messaging events/log fetching.
Is there a way to fetch this kind of message information from FCM?
As of August 2018, stats for messages sent using the FCM API are now visible from the console. From the Cloud Messaging section, click on the Reports tab. From there, you will be able to filter by message type (notification, data, and all)
It would seem that the Impressions and Opens are still only available for messages sent using the console. But Sends for sure now counts the messages sent using the FCM API.
Reference: https://firebase.googleblog.com/2018/08/in-app-messaging-crashlytics.html
Update: The FCM Diagnostics page has been disabled since last year.
If you have a Play Dev Console account and if your app is in at least Alpha Testing, you can make use of the Diagnostics and Statistics page. However, if you're looking for an API, there is currently no API available for it.
Otherwise, I think most of the details you need (like the payload and time sent) can be logged from your app server alone.
And just to support what you already mentioned in your post, as stated by #FrankvanPuffelen here:
The Firebase Notifications charts only show analytics for messages that were sent using the Firebase Notifications panel.
There is currently no public API to send Notifications to audiences. The web interface in the console is the only way to send them.
There is currently no API to feed your own FCM messages into the Firebase Notifications analytics panels.
If you want to fetch data on push notification client side you could use the BigQuery exports of Analytics data.
Here is a list of events, as you can see there are several events on notifications, including notification_open and notification_send.
Unfortunately notification_send seems to be available only for Android apps. I don't know why since the Firebase GUI console Message Delivery Report does contain iOS sends as well.
How to transfer file when receiver is offline in XMPPP Protocol? Which extension have to use? Any sample code available for iOS?
You need to store file somewhere and send link as described in Out Of Band Data extension. Message will be delivered when recipient will be online.
You can check that your receiver is offline. So If receiver is offline than you have to upload your message to your server using web service. And your receiver have to get all offline messages using web service after xmpp stream connect.
This is best way for offline message. Please do like this and let me know if any problem.
In my apps, I want to access to user's SMS messages from the system database. Is it possible to read user's messages inside my apps?
No. Apple doesn't allow apps to access messages. Sorry.
However, if you are developing an application for jailbroken phones, all the messages are stored in an sqlite file. You can find more information about that here.
It not possible.
This topic may useful: Could an iOS application read/access SMS text?
I'm writing an xmpp ios chat app which connects with an openfire server.
The app needs to be able to download all the messages that were missed by the user while the app was closed. So I will need a way to save the missed messages sent on the server, does anyone know a good way to do this? Is there a plugin for something like this, or would this require a custom plugin or something else?
Openfire, like most other XMPP servers, already stores the messages sent by users, when the receiving bare JID was offline, so that it can send those message to the client when it (re-)connects.
See also:
XEP-0160 - Best Practices for Handling Offline Messages
XEP-0013 - Flexible Offline Message Retrieval (supported by Openfire)