Programmatically trigger CalendarStore sync with iCloud? - macos

I'm using the CalendarStore API to create tasks (CalTask items). My assumption is that by doing so these items would be automatically synced to iCloud (assuming the user has this setup in System Preferences). In fact, the CalendarStore docs say:
The Calendar Store database stores the local copies of records
belonging to the Calendars schema. If MobileMe system preferences are
configured to sync the Calendars schema, then your changes to these
records, using the Calendar Store programming interface, are also
synced.
But it seems that simply creating items in the CalendarStore doesn't trigger iCloud sync of them. I know my items are properly going into the CalendarStore, because I see the changes coming back (I observe CalTasksChangedNotification and CalTasksChangedExternallyNotification, and my changes are coming through there). But until I run iCal, no iCloud syncing occurs.
I don't think there's anything I'm doing wrong in my code. In fact, you can reproduce this with Apple's CalendarItems sample code. Creating tasks and events will not trigger CalendarStore sync until you run iCal.
Pre-iCloud, you used SyncServices to do this (nice article here on that), but I kinda thought this wasn't used with Lion and iCloud. In fact, I can't even find Apple's SyncServices docs.
I know it's possible to programmatically trigger CalendarStore syncing to iCloud, because other apps do this (I'm looking at you, Fantastical). Can anyone give me any pointers?
There are a couple similar questions, but they are pre-iCloud, and appear not to have been resolved.
Update: Though it appears to still work, I see Sync Services is officially deprecated in Lion. Is there really no replacement for it?

Related

Google Play Release With Force Update

We're releasing our app to google play store quite often and sometimes it's inevitable that users must update the app to the latest version. After we release it via google console we make sure we present a modal for older versions that force the user to go and update via the playstore, however, the google playstore shows to users an 'Open' button instead of 'Update' probably cause of some cache mechanism.
Is there a way to avoid this cache? If not, how is it possible to create force updates while users might not be able to download the latest version..?
Thanks.

Move app submission from a directory to another

I have an old Microsoft/Live account where I have submitted an app for Microsoft Teams. That account and directory is no longer in use, as we use our primary organization directory for app submissions now. So I would like to move the app submission from the old directory to another, and need tech support for that. I have tried all channels inside the Microsoft Partner Dashboard without luck.
This is called "reparenting" in the Microsoft store lingo, and it is a very very very (very) frustrating process (at least my experience was). They also seem to change whether they're allowing it or not, over time, so you might need to raise several service requests. I hope the process goes smoothly for you.

Microsoft Dynamics CRM 365: Millions of Contacts being generated for no apparent reason

I wonder if the community out there can help with this.
We are using Microsoft Dynamics 365 v8.2.2.112, on-premises (not cloud).
The problem is this: millions – yes, literally millions – of Contacts are being created for no apparent reason.
Our users access CRM via an intranet page, but also using the CRM Outlook Plugin.
Since upgrading to v8.2 in January, something in CRM is creating millions of CRM Contacts.
The same Contact is being repeatedly re-created hundreds and thousands of times for the same user. And this happens for multiple Contacts and for multiple users. The end result is that millions of Contacts are being generated. The contact gets created every 5 minutes (approx).
You can easily see the Contacts being created. If you run an “Advanced Search” on Contact order by “created_on” descending order, you can see the same new Contact being generated every five minutes or so, and whose details exactly match the one created 5 minutes ago.
We’ve got about 20 users who seem to be particularly prolific Contact creators. Possibly because of the nature of their role, they add lots (ie dozens) of Contacts to Outlook (but they definitely don’t add hundreds of thousands of the same person!)
I'm absolutely baffled as to why this should happen.
The prevailing view at my company is that CRM Outlook synchronisation is to blame. We use the Outlook plugin widely. We use version 8.2.3.8 of the Outlook CRM plugin. When users sync their Outlook Contacts, maybe it doesn't recognise that the Contact is already in CRM, so regenerates it? We think it's a bug of that nature.
We can’t turn off Outlook synchronisation, because users require it in order to do their jobs. They need to be able to sync Activities, Emails, Contacts and so on.
We've checked all our custom code (C# plugins) to ensure that no Contacts are being create anywhere. We've especially checked the "on create" of Contacts to ensure it’s not creating an additional Contact. No code generates Contacts.
I understand that I am able to turn off users' Outlook Synchronisation filters. But I don’t want to do so as they do need to be able to sync with Outlook. It’s one of the reasons we use Dynamics CRM.
Does anybody know what’s causing this? Has anybody come across this before? What’s the solution to stop this happening? I'm after a root-cause if possible!
Just wanted to keep this post up to date, for the benefit of any other poor souls who encounter this ghastly problem.
We were in touch with Microsoft who have been very helpful (although weren’t able to provide a “silver bullet” solution). The case is ongoing.
The first suggestion was that the problem was down to a customisation, integration or homemade plugin that had got itself into an endless loop, creating CRM Contacts ad infinitum. After searching absolutely every line of code and custom logic, I was able to confirm that the problem is not down to any of our customisations.
What we then did was to examine the Contacts being created on mass. We identified one Contact that was being generated over and over again. We checked its owner, let’s call this owner “John Smith”, and found that John Smith was the one creating this contact over and over. So we checked John Smith’s “Appointments, Contacts, and Tasks” syncing. We did this by “Settings -> Email Configuration -> Mailboxes”, then searched for John Smith’s mailbox. From John Smith’s mailbox, under the “Synchronization Method”, we set “Appointments, Contacts, and Tasks” from “Server-Side Synchronization” to “None”.
After doing this, the mass Contact generation immediately stopped. I’m not suggestion this is the solution to the problem (because we need to use syncing), but I am suggesting that this proves that the problem is down to a CRM bug in synchronisation (and not caused one of our customisations).
So if you’re getting this issue, and you want to rule out your customisations, I would follow these steps (above) to prove that it’s not your code that is responsible. If you turn off syncing for a user, and it stops generating millions of the same contacts owned by that user, I’d say you’ve got the same bug as me.
I think this bug is described in 2 possible places:
“Duplicate contacts are created if the rebuild of ID mapping fails after a test and enable.”: https://support.microsoft.com/en-in/help/4046463/service-update-9-for-microsoft-dynamics-365-8-2-1
OR
“Contact synchronization that uses server-side synchronization causes infinite updates.”: https://support.microsoft.com/en-us/help/3203310/update-0-1-for-microsoft-dynamics-crm-2016-service-pack-1
The suggestion is that we’re getting this problem because we’ve not installed cumulative updates before installing a major version. I can’t agree that we were meant to. We installed the latest version as directed on-line. Obviously we can’t now install the updates which allegedly fix this bug, because we’re on a later version. We went from CRM 8.1.1.1005 to 8.2.2.0112 by skipping 2 cumulative versions (i.e. 8.2.0.0749 and 8.2.1.0176). It is alleged that these skipped versions had a bug fix for this issue in it (see link above), and by not installing them, this issue happened. I can’t really agree that it says anywhere to do this (install cumulative updates before installing a major version). Anyway, that’s the suggested cause of the issue.
Anyway, we’re still busy with the Microsoft guys. I’ll get back to you when there’s a definite course of action we can take. So it’s still work in progress.
We’re planning on deleting the millions of instances of that Contact from the user’s Outlook, then deleting the millions of that Contact from CRM (which has taken a week in a bulk delete), then we’re going to turn on “platform traces” (requiring a registry change), then we’re going to reactivate syncing, and gather the logs, and send them to Microsoft.
I’ll be back when there’s a definite solution.
Updated with a definite solution:
For the sake of completeness and in order to help anybody else who experiences this...
This nightmare was resolved by installing CRM patch v8.2.13.21. [NB We had been on v8.2.2.112] As soon as the patch was installed, the system ceased generated all these Contacts. They stopped being generated to the second!
We're still cleaning up the mess of the unwanted 20 million Contacts which shouldn't be there. But at least the issue is fixed.
I think the lesson is to keep your CRM system up to date in terms of patching!
I faced similar issue in OnLine when we enabled outlook synchronization for Dynamics.
Even we had contacts been created randomly. If you look in advanced find for contacts Created randomly it should be created by System user.
There is user setting in CRM as below and I think in your case Automatically create records in Microsoft Dynamics 365 is set to YES
You will have to change this to No.
For other users you can use XRMToolBox plugin called User Setting Utility and there in you can see every user's personal setting as below
with the same XRM Tool Plugin you can bulk edit user personal setting as well

Performing enterprise wipe on devices using Work Profile?

I wish to perform Enterprise Wipe on devices with Work Profiles. Essentially, this would enable admins from my company to remove all corporate-related information from a device without disturbing the individual's personal data.
I am aware a topic exists on this already: Wiping data on Android: Device Admin versus Profile Owner
However, the topic talks about factory wipe and I certainly don't wish to do that. Any hints on how to accomplish this task?
Performed research on android forums + documentation and could not find the solution.
You can call enterprises.devices.delete on a work profile. It will wipe and remove the work profile without touching the personal data. Which seems to be what you're looking for.
It's actually the only wipe possible for a work profile, it's not possible for the admin to wipe the entire device when it's set up with a work profile.

Mac app - check App Store receipt

Many of the possible duplicates seem to address methods of updating apps both normally and via App Store.
This one mentions a few working solutions:
Mac App Store Receipt Validation Code?
for programmers like me who want to not reinvent the wheel from the Apple Docs:
https://developer.apple.com/library/mac/#releasenotes/General/ValidateAppStoreReceipt/_index.html
My problem is that I'm having a hard time finding finished "libraries" that work.
I would simply like to know if anyone has had success with any of these open-source projects and whether any of them are particularly easy to use.

Resources