Creating private reminders using iOS API? - ios

Does EKEventStore allow the creation of "private" reminders, i.e. reminders that will be visible only to my app (the one that calls against the EventKit -- iOS events API) but not e.g. to Apple's default reminders app (for either iOS or OS X)?

The EKEventStore provides access to the calendar/reminder resources that are available to the OS that are configured by the user.
It is not possible to configure a separate event store for private developer use.
Reminders can be made local so they are not synced in the cloud.
However, if the device has reminder lists that are synced to the cloud, then it is no longer possible to access the local reminders either by your app or the Reminders app.
This same behavior seems to apply to local Calendars where I answered a question about their availability at Local EKCalendar saved with not errors, disappears.
The question at Unable to create local EKCalendar (Reminders) if iCloud is set to not sync Reminders seems to support my conclusions and suggests this behavior has been present for at least a couple of years.

Related

In iOS Tracking, does Firebase receive data about a first_open event if an iPhone users chose "Do Not Track"?

Non-technical here, just learning Google Analytics and recently dwelling with app analytics for a client, where their developers didn't seem very skilled in Firebase and can't help me understand this issue - can you help?
I'm trying to understand how many raw downloads in Play Console and App Store Connect are actually users that launch the app, by looking at the first_open event. However, I'm aware that iOS users get a pop-up asking if they allow tracking (or maybe another pop-up similar?).
---> Question: If they do not allow tracking on this pop-up, would our Firebase still get data about these users launching the app? What about other events that were set-up with Firebase, such as initiating a booking?
PS: Also, now that you're here: App Store Connect is displaying 23 Total downloads (counting re-installs) for a given month in Country A, but Firebase is displaying 49 first_open events for the same country in the exact same month! How's this even possible, if a first_open only fires at least once per install, or doesn't even fire if the user never opens?

Programmatically get application usage from Screen Time in iOS 12

I am working on one project and I want to get other application usage time. apple has launched iOS 12 and provides the new feature Screen Time. I want to know is there any way or API provided by Apple to get data from it.
No, on iOS each app runs in its own sandbox and cannot see data from other apps, even apps from the same publisher. An app can access special shared data, like photos from the album or contact data, but it is not possible for an app to directly access files written by other apps.
ScreenTime application is on another sandbox than your app. Unless apple provide API we can't access the same.
Update
Since apple have added screen time app into ios12 simulator. There could be a chance they provide the API's soon.
On iOS 15 Apple has added an API, see here:
https://developer.apple.com/documentation/FamilyControls
FamilyControls
Authorize your app to provide parental controls on a
child’s device. To authorize your parental controls app, use a shared
AuthorizationCenter instance. You can authorize parental controls only
on a device that is part of a Family Sharing group and signed into a
child’s iCloud account.
You must add the Family Controls capability to your app.
This seems to provide functionality to parental control apps only. In other words, it cannot be used by other time-tracking or productivity apps at the moment.

How to read Phone number in iOS 10.1.1 - Objective C/Swift

I have saw so many Questions regarding this on SO. All answers say that it is not possible. Apple doesn't allow to do so.
I am using iPhone 6s running on iOS 10.1.1
Yesterday I purchased new Sim Card.Just after inserting my new SIM when I opened WhatsApp. I get a Screen which says:
`Your number has been changed. Do you want to use new number`
How does whatsapp able to do so?
Secondly I installed Airtel App. When I opened the app. It automatically fetched my phone number And Displayed to me.
How these apps are able to read phone number.
Is apple added new methods in iOS 10 or they are using some other logic to do so.
There is an observer subscriberCellularProviderDidUpdateNotifier
as per the docs here
A block object that is dispatched on the default priority global
dispatch queue when the user’s cellular provider information changes.
This occurs, for example, if a user swaps the device’s SIM card with
one from another provider, while your application is running.
To handle changes in cellular service provider information, define a
block in your application and assign it to this property. The block
must be implemented to support being called from any context.
That just notifies you that your sim has been changed.
Regarding your second question you can get the number from contact app using Contacts.framework
There are some changes in privacy in ios 10. A new key you have to add into plist file if you want to access contacts database in your app.
<key>NSContactsUsageDescription</key>
<string>$(PRODUCT_NAME) want use you contacts</string>

Listen to iCal event changes from server

I am building the server side for a calendar application. The client side is iOS only. The original plan was the app will know of iCal event changes then tell the server. But that might be a problem with reminders (via Parse Push). For example, if the event pushed forward the reminder should come earlier.
Is it possible from the server side to be notified on iCal events? For example, when users create/update/delete an iCal event I want to know from a server to grab this information. Is this possible? Or does everything need to be done via a native app thats running?
My server is currently on parse.com. But I could use a separate server say NodeJS if needed.
As iCal is user/device dependent, unless user has synced his calendar events with iCloud. And in second case where user has activated syncing of calendar events, it is completly insecure for end-user to share his icloud details to other server.
How about creating 1 API at backend, which will update/delete requests from Apps for the calendar events, and that will update Parse notification events in background process. For this you can also write customized Parse apis either in NodeJS or any other technology stack.
And in the apps, you can sync the events with iCal using Event Kit:
https://developer.apple.com/library/mac/documentation/DataManagement/Conceptual/EventKitProgGuide/ReadingAndWritingEvents.html#//apple_ref/doc/uid/TP40004775-SW1
first, you need to able to let iOS wake up your app running in the background, that requires to classify your app to one of the mode stated in the Apple Background Execution, I think the "Background fetch" is appropriate in your case, then in your application:performFetchWithCompletionHandler: you could check the Calendar database for changed events and preform necessary updates to the server.
I think this is your best bet:
https://stackoverflow.com/a/23997912/1967872
In your implementation of the storeChanged: method mentioned in that answer, you should iterate through all the events, detect any changes and submit those to the server.
I don't know exactly that is possible or not but I am thinking it's hard because still I didn't find any library/any features that apple is provides like that.
But I am putting one link that might be helpful for you. Please check it.
http://kb.kerio.com/product/kerio-connect/os-x/support-for-apple-ical-calendar-using-the-caldav-standard-1494.html

Syncing of Calendar with iCloud lose the CalendarIdentifier

I am developing a Calendar App. In which calendars can be create by user and also need the iCloud Syncing feature so that user can get the same calendars on his/her other device. Now according to Apple Document:
A full sync with the calendar will lose this identifier. You should have a plan for dealing with a calendar whose identifier is no longer fetchable by caching its other properties.
CalendarIdentifier property of EKCalendar is not reliable. And using other properties we can not differentiate the calendar as well that it is made by iOS Native Calendar App or My Calendar App. So I am stuck here and trying to find any reliable solution. But not able to find till now so please help me for this to get the solution. I will be thankful to you.

Resources