Maintenance: bugs in AppExtensions, Auto signature/profile selection and bro-gen
16 May 2018 | fix app-extensions bro-genToday bug-fix/maintenance delivers following:
- Fixed automatic profile/signature selection as it was picking first random signature with
iPhone Developer|iOS Developmentprefix; - Improved app-extension support: apple was rejecting binaries due missing provisioning profile and entitlements.
- Small improvements to
bro-genthat can now pick string macro into constants
Details:
Issue with automatic profile/signature selection
Old code was broken due following: if signature was set to ‘Auto’ it was picking any iPhone Developer|iOS Development one without any respect to provisioning profile. This caused following use cases broken:
auto signatureandmanual profile: randomly picked signature will not match profile (in case you are not lucky and have lot of signatures/profiles);auto signatureandauto profilewill not work as well as signature is random;
Fix provides following:
auto signatureandmanual profile: picks only signatures that matches profile;auto signatureandauto profile: first set of profiles that match bundle id is fetched. This set is being intersected with list of identities to find a profile and signature pair that matches each other.
PR293, commit1, commit2
Issue with app-extensions
As reported by github user @sofroma there were issues while submiting application to appstore that contains extensions:
- Missing Code Signing Entitlements. No entitlements found in bundle ‘xxx.yyy.zzz.StickerPackExtension’
- Missing Provisioning Profile in bundle ‘xxx.yyy.zzz.StickerPackExtension’
RoboVM was extended to copy provisioning profile and generate entitlement for app-extension. Provisioning profile for app-extension is must have now. Requirement for profile is following:
- It shall contain same
signing identityas profile of main application; - It’s application id shall match id of application extension. RoboVM makes bundle id for it as
MainAppId + "." + ExtensionName. ForOneSignalNotificationServiceExtensionit results incom.sample.application.OneSignalNotificationServiceExtension, herecom.sample.applicationis bundle id of applications, so bundle id of provision profile shall be:- either exact match to bundle Id RoboVM generates for app extension (e.g.
com.sample.application.OneSignalNotificationServiceExtension) - wildcard id (e.g. * ) which is preferable way as it allows to have one profile for many extensions.
- either exact match to bundle Id RoboVM generates for app extension (e.g.
RoboVM will automatically search for profile that matches the signature and extension bundle id. Also there is an option to explicitly specify it in robovm.xml with profile parameter to extension entry:
<appExtensions>
<extension profile="3AED05A9-5F1F-4120-9276-11980B9C88EE">OneSignalNotificationServiceExtension</extension>
</appExtensions>
Value of profile is same iosProvisioningProfile used with gradle and can have following values:
- either
udidof profile; - either
profile name; - either
appIdPrefix; - either
appIdName.
Application extension tutorial was updated as well.
PR293, commit
Improvement of bro-gen
@irina88 asked question why bro-gen doesn’t handle string macro automatically (like #define AFEventLevelAchieved @"af_level_achieved"). bro-gen was converting only numbers in macro into constants, small tweak allows simple string macro to be converted into string constants, check this commit.
Now configure yaml for constant capture:
constants:
# Make sure we don't miss any constants if new ones are introduced in a later version
(.*):
class: __FixMe
name: 'Constant__#{g[0]}'
it will produce code as bellow:
/*<constants>*/
public static final String Constant__AFEventLevelAchieved = "af_level_achieved";
/*</constants>*/
Comments