0

Is anybody knows how can I get BundleID of an existing app on iOS 8.4.1?

For example the messages app

Thanks

shayyy7
  • 93
  • 7

2 Answers2

0

You cannot get the bundleId of an app other than your app. And there is no reason to do so. Apps are sandboxed on iOS. If you want to interact with another app you can use its urlscheme (if there is one), or its extensions (again if there are any). You can just get the bundleId of your own app programmatically using:

[[NSBundle mainBundle] bundleIdentifier]
Nikos M.
  • 13,685
  • 4
  • 47
  • 61
  • do you have any idea how can I switch from my app to the messages app for example using java code? in iOS device – shayyy7 Nov 29 '15 at 09:40
  • You have to use Objective-C or Swift for iOS development. Java is not supported. You can use the MFMessageViewController to open a new message view controller form your app. – Nikos M. Nov 29 '15 at 09:41
  • is it the same approach in appium testing? – shayyy7 Nov 29 '15 at 10:02
  • You can call native frameworks with appium, so the answer is probably yes. – Nikos M. Nov 29 '15 at 10:05
0

Using this you can get the bundle id

NSString *bundleId = [[NSBundle mainBundle] bundleIdentifier];

NSLog("%@",bundleId);

Vikash Rajput
  • 445
  • 5
  • 21