store unique events with Firebase and Swift - ios

I am building an app for iOS with swift and Cloud Firestore (firebase) that allows the user to create home inspection reports. On the first page, the initial data is entered into text fields: name, address, photo of home etc. Once that data is entered and the "create new report" button is pressed. How do I make sure each report created is a totally unique event (or unique document?) that can be recalled later? So the next time one creates a new report, their data is separate and contained in its own container.

Whenever you call addDocument to add a new document, Firestore generates a random, unique ID for that new document. So that sounds perfect for your use-case: whenever the user clicks the create new report button, you add a document by calling addDocument and then use that document's ID as the identifier for that report.

Related

Referencing linked objects (emails, etc) created with Siri Smart reminders from EKReminder

I am building an application that allows to access/view user reminders in iOS, via the EventKit, and having issues figuring out how can I check if a reminder item has a linked item attached to it (such as an email)
Normally, these are created by using Siri - such as, "Hey Siri, remind me about this message".
Once a reminder is created this way, a little "mail" icon appears next to the reminder in Apple's Reminders app - I can click on that icon it it would transport me to the linked item (email in this case).
However, when I get a list of reminders (EKReminder objects, via EKStore's fetchReminders) in my app, I can't figure out how to access that information (such as, does a reminder item have a linked Siri object associated with it at all? And if so, how to access it in a way so that I could display a button in my app, clicking on which would open that linked object?)
It doesn't look like that information is even a part of the EKReminder/EKCalendarItem/EKObject structure… Where does it come from?
Thanks!

How to save current dashboard selections in Powerapps

I have created a standalone app in Powerapps. It is basically just a dashboard with a text input box, a number of toggle switches and radio buttons.
The dashboard will be used just to confirm a list of actions have been started or completed.
There is no requirement to save the data as such, but I need the option to keep the toggle selections and radio buttons etc as they were previously when a user opens the app.
At present the app works great however when closed and reopened the options revert to their default selections.
I have a button that resets the selections if required but I need them to remain unchanged unless reset manually.
Any help would be appreciated.
You need to persist the data somewhere, whether that is in locally on the device (more difficult, does not work for apps in-browser; mobile only) or in a data table somewhere (easy).
On-device example
Data table (Sharepoint) example:
When user clicks "Save", Patch() the data to a Sharepoint list
OnStart of the app, set a variable for the logged in user, then lookup in the Sharepoint list, all settings for varUser.
ClearCollect these into a local collection.
Use UpdateIf on each field to update the Collection
When user clicks "Save", Patch() the Sharepoint list, repeat.

Creating a realtime favorites collection in cloudfirestore using flutter

The thing that i want to do is that i have a bookmark button that creates a Favorites collection for every user, but the data inside it consists of data grabbed from profiles of other users, so I want if the data of the bookmarked profile is edited to appear edited in the favorites list. how to achieve so????

How to update an ios App with current information daily

I'm trying to design an app for my club at school. What I want to happen is when there is new information about meetings or events I want to be able to add this new content to the app and then have it visible by other app users.
So my question is how would I approach this idea?
Conceptually, you're going to need to have a centralized server which contains the data, an API to connect an application to this data, and finally the end user application.
On the server end, you could have a simple database which will house the event and meeting information.
On the API end, you could have a simple script which fetches the latest entries in the database and displays the data in a standard format such as JSON or XML.
On the app end, every time the user opens the application, fetch the latest data from your API and parse it into an array. Then, just populate a table or collection with the data in that array. You could also add a pull to refresh control to fetch the latest information at any time so the user doesn't have to launch the app again.

Quickblox: Share 1.Image and 2.Video along with text chat among users

I am able to establish 1-1 chat by creating a room. I have used room because I will get history of last 50 messages (I would prefer more in number with paged results and expecting this feature in the near future).
I am unable to figure out how I can implement image and video sharing in between the text chat.
I also want this in the history I get. I mean I need to get the order of the text/image/video along with their details to display to the user.
When I upload an image file using Content module, the files are saved in a separate table in contents section (which is fine for user's gallery kind of app). But for chat we need to know who sent to whom and what (image/video/text).
I would like to know whether this is possible with the current version of the Quickblox sdk. or else is there any way we can establish this using Custom objects module? If possible, will this work if there are more number of users in the room? Please give me a solution to this.
If you want create chat with content, you need to use a Custom Objects. (in current QB version).
Advantage - you can also get chat history and implement deleting of message history.
But this method doesn't very simply.
At first you need create Custom objects represented next things:
single chat message
group chat message
(may be need create extended user profile)
At first, you can use QBChat module for changing service information between users.
When you need send message, you create Custom Object (CO) - message with parameters and upload it. When it uploading, you send service message via QB chat to your opponent user. When opponent will receive it, he should perform request for updating CO (in this case - single message).
As example, single chat message can contain next parameters:
opponent qb user id;
owner qb user id;
message text;
link to content;
Sending of content message divide to next steps:
At first, you need upload content file using Content module, and after this create message CO, upload it on server and send service message to your opponent

Resources