expo react native: match the current date to the list of deadline in the background and notify the user if matched - react-native

I need help on how to implement the local notification this way:
I have a list of dates/deadlines in array example(
Deadlines[January 2, 2022, January 3, 2022, January 5, 2022] ), that I wanted to compare if the current date(today) is matched to the deadline
Everyday it will check in the background(app is close) if it’s match then I wanted to notify the user 2 times at a specific hour which is 7am and 12pm,
I can’t find it in expo or any example on How to do that? I tried to use the DailyNotificationTrigger but I don’t think its what I need because it’s notifying the user even though there is no deadline on that particular day, please help thanks

my update on this is to use the built-in calendar of the device and using the expo calendar library I was able to fill those gaps.

Related

Trying to make an auto-generated day based mobile app

I'm new to React Native and, in fact, even to development, because I've never been a developer before. I've been learning for a few months and I have some app ideas.
So ... because this is my level and I really don't know how I could do that, please don't hate me, I just want to ask you about this.
I would like to build something similar to a list of activities, but “aware of the time”. For example.. I would like to have a new list of activities with the same tasks every day. If it is 23:59, the progress made that day will be saved in the database, and at 00:00 a new list will be generated for the new day. If the user does not use the application for one, two or three days, the "empty progress" will still be recorded.
So.. again, please don't hate me, I think that would be the backend part. What can I use with React Native to achieve this type of behaviour and how?

Vue.js component for picking hours

I'm creating an application where users can order Services on specific hours. Once a Service is picked for, say 2:00pm, Feb21, no other user can order a Service for this hour (but can for 1pm and 3pm).
I've googled for "vue date picker", "vue hour table", here's a very long list of Solutions: https://github.com/vuejs/awesome-vue/blob/master/README.md but all of them are to select dates, and there's no way to indicate that a specific hour is unavailable. Is there's any such component?
I imagine it as a table, where columns are days, and rows are continuous hours makred either available or unavailable
I think you can use https://www.npmjs.com/package/vue-bootstrap-datetimepicker or http://eonasdan.github.io/bootstrap-datetimepicker/ directly without vue.
ElementUI, a Vue component library, has this timepicker component.
I think the selectableRange may allow you to exclude hours from your timepickers dinamically, by passing custom available ranges. How to implement this depends a lot on your own code, though.

itunes connect sales reports won't go further than October 30th

I'm trying to view the Sales and Trends for my apps in iTunes Connect. I am only able to see sales up until 30th October, when I try to change the dates to include all days up to 5th November it does nothing.
It's quite possible that I had no sales in the time period 30th October - 4th November, but yesterday I had three new apps approved and released, I know that some of my friends have downloaded them so there should be some data to show.
Is there anything I can do to fix this? I've emailed Apple but their reply can take 3 days apparently, and I'm anxious to get up to date figures for my new app.
Update
It magically seems to work for me today. And it seems that I had some sales in the period 30th October - 5th November, so the issue can't be due to no sales.
I was having the same problem. I cleared out my browser history and cache and it is now working. If that doesn't work for you, try another browser. I usually use Chrome. Before clearing out Chrome's cache/history, I decided to try Safari. No luck. Then I tried Firefox and it worked there.
It appears like there is no sales data for the days after October 31; iTunes Connect does not allow me to display any date in November. I contacted support and will share the results later on.
Is there anything I can do to fix this?
I use iTunes Connect app from Apple https://itunes.apple.com/app/itunes-connect/id376771144?mt=8 - it works perfectly fine (while I see the same outdated results in browser)
This doesn't 'fix' the problem, but if you create a new user within your account, it appears to allow you to query to the current date. (Nov 5th). Time will tell if this reduces back to Oct 30th. HTH

How to limit daily-usage even if user sets his clock back?

I have an IOS app that needs to track duration of free usage per day. Once it crosses a threshold, the user would have to purchase the app or wait for the next day to unlock his free-usage minutes for that day.
Is there a native way to detect if the user has set his clock back? Assume there is no Internet connection to sync with a time server
UIApplicationDelegate can get the following method called on significant time changes:
- (void)applicationSignificantTimeChange:(UIApplication *)application
You can try that one. From my point of view, I'd recommend to check current date on every application launch or willBecomeActive and store those dates as list somewhere securely. If current date is different from the last date, add it to your list. If list has more than 30 items (or how many you need) disable trial functionality.

Example for when to use [NSCalendar autoupdatingCurrentCalendar]

I'm looking for an example where + autoupdatingCurrentCalendar would be used instead of + currentCalendar. More specifically where the values based on the calendar are automatically changed when the calendar changes. Do I need bindings for this or something like that?
The docs state:
Note that if you cache values based on
the calendar or related information
those caches will of course not be
automatically updated by the updating
of the calendar object.
Thanks in advance
currentCalendar returns cached version of current system calendar, while autoupdatingCurrentCalendar always returns most recent version of system calendar.
That is important, when you are presenting data based on the various parameters of a calendar like number of days in a month, number of a weeks in year or number of hours in a day.
To be honest, I don't know why Apple gives you an opportunity to get outdated value by using currentCalendar.
It looks like they have internal API that allows you to manipulate caches of NSCalendar, so you can achieve better performance. But since it is not public, there is no reason to use currentCalendar.
That is, always use autoupdatingCurrentCalendar.
Well, on OS X you can be running multiple processes simultaneous. One could be your process that uses the autoupdatingCurrentCalendar. The other could be System Preferences.
System Preferences allows you to customize your calendar settings. You can choose the first day of the week to be something other than the default (Sunday). Or you can choose a whole different calendar altogether. If you use the autoupdatingCurrentCalendar, these changes will be picked up automatically. If you don't use it, they won't.
I guess that it is only usefull if you store the calendar in memory for further use. Doing that way, if the calendar settings change, your stored calendar will take account of those changes if you used autoupdatingCurrentCalendar. If you only used currentCalendar, it wil stay at the state it was at your first call.