Is there a way to dynamicaly obtain app group id through code?

Viewed 154

As stated above I need to know if there is any way to dynamically acesss the app group id which is in the form of group.com.somecom.someprod.

Something along the lines of ${PRODUCT_NAME} which will give you the product name.

I am asking because I need to use the id in two targets have different deployment target. I am mentioning different deployment target because i need to provide support for push notification custom extension which is supported from iOS 10 and my project deplyment target is iOS 9.

I see two ways right now:

  1. Put hard coded id in lower target (9.0) file and give it membership of the higher target (10.0)
  2. Put hard coded value in both the files (really don't like this).

Is there a better way?

0 Answers
Related