18

I understand it's possible to Detecting programmatically whether an app is installed on iPhone . I'm wondering if it's possible to detect what version of the other app is installed?

My app has a dependency on the Facebook native client, but behaves pretty badly if the phone has an older version of the Facebook app installed. So I'd like to be able to detect that and warn users.

-- UPDATE --

It's being implied in the comments that I can prevent users from installing my app in the first place if the appropriate version of the dependent app is not present. That would be a great solution too. If you know how I can specify a dependency on another app's version number, please explain that.

Community
  • 1
  • 1
Leopd
  • 41,333
  • 31
  • 129
  • 167
  • Embed the version as a global variable... – Cole Tobin Jun 23 '12 at 22:18
  • 1
    If it performs badly, don't let them install your app. Set a good base version that works as it was intended to. If it doesn't do well your users will write 1 star reviews. – Allison Jun 23 '12 at 22:21
  • @TheDeveloper or just have it not require the latest Facebook version. – Cole Tobin Jun 23 '12 at 22:23
  • Didn't think of that, that could work too! Implement *booth* and get the version number and if it is too old use the *old* framework! – Allison Jun 23 '12 at 22:24
  • Great ideas. Please explain how to do this. – Leopd Jun 23 '12 at 22:26
  • @TheDeveloper thats exactly the question OP asked - how to detect which version of the Facebook app is installed... (and then do something in his own app about the fact) – poncha Jun 23 '12 at 22:31
  • @Leopd i am not sure about this, but have you checked the facebook ios sdk? maybe it provides some kind of version information... – poncha Jun 23 '12 at 22:34
  • @poncha I don't believe so. There's very little there. https://developers.facebook.com/docs/reference/iossdk/#methods – Leopd Jun 23 '12 at 23:22

1 Answers1

2

Unfortunately, you can not read your iOS device settings programmatically to get the native app Facebook version (i.e. via Settings, Facebook, Version).

Nevertheless, you might try to experiment with the custom URL schemes for Facebook as you noted in your own question.

It seems the different versions of the native Facebook application either support/does not support its own custom URL schemes.

As noted here from version 3.4, you can:

fb://places

From version 4.0, as noted here, you can:

fb://place/(fbid)

etc.

Community
  • 1
  • 1
StanislavK
  • 1,962
  • 15
  • 16