Check if specific app was installed by the user

Hello,

When user opens app offered by me, I want to know if the user has installed another app that is also offered by me.

How is this possbile?

I need this because currenly I have 2 apps published one is free with ads and one is paid version without ads.

I am planning to unpublish paid version, and all users who had bought the paid version and after they install the free version for keeping up to day, I dont want them to pay extra for removing ads, I want to detect these users and disable ads for them automaticaly without their interaction.

So please let me know if there are better solutions for this situation.

Thank you very much.

Replies

The answer to your question is to have one app create a URL (under target/URL Types) that other apps can access and have the other app execute a "canOpenURL"

https://developer.apple.com/documentation/uikit/uiapplication/1622952-canopenurl?language=objc


And a better way is upgrade both apps so they write something to each other using shared space in the 1) file system, 2) NSUserDefaults, or, 3) best, the user's iCloud key-value file. The iCloud is best because it means the user can get a new device and won't need to download the old, never used app.