Reputation: 7832
I can get the version of my app by doing this:
[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"]
But how do I get the version of another app on the device? I want to know if an app is up to date for valid document sharing.
Upvotes: 1
Views: 174
Reputation: 4963
You cannot get the version of another app. If you can control the other app add a new url scheme to the new version of the app.
Upvotes: 1
Reputation: 318944
This is not possible. An app has no access to the details about another installed app.
However, if you are writing both apps then there is a trick but it requires that the apps have been run at least once after any update. Your two apps can share a private named pasteboard. If the apps write their own current version to the private pasteboard, each app can read the value stored by the other app.
Upvotes: 1