iosobjective-cios8-today-widgetios-extensions

iOS today widget for two trargets in same project


I have a today widget, (that I've successfully localised for specific target), but it only shows for one build target I have, the main version of the app. How can I set it to be available to other (/all) target in the same project?


Solution

  • Your today target needs to start with the same bundle id as the containing target.

    assuming your apps are com.Mackstein.target1 and com.Mackstein.target2

    then you will need two today widgets with bundle ids something like:

    com.Mackstein.target1.today1 and com.Mackstein.target2.today2

    the easiest way to achieve this is just to duplicate the existing today1 widget target, tweak the bundle id, and then include the new today2 target in the target2

    it is annoying, but I haven't found a better solution.