ReviewOS

craft-native/craft

fix(ios): configure APNs production entitlement for release archives

#196
Closed glennmichael123 opened this 10 days ago ·
10 days ago

Problem

With pushNotifications: true, Craft 0.0.90 generates Craft.entitlements containing:

<key>aps-environment</key>
<string>development</string>

There is no documented or emitted mobile configuration field to select the APNs environment for an archive or release build. A distribution-signed app must carry the production entitlement; keeping development prevents production APNs delivery.

Reproduction

  1. Create an iOS app with capabilities.pushNotifications: true.
  2. Generate the Xcode project using Craft.
  3. Inspect Craft.entitlements.

Expected

Craft should derive aps-environment from build configuration or offer an explicit typed configuration such as pushEnvironment: 'development' | 'production', with release archives configured for production.

Actual

The generated entitlement is always development.

Context

This was observed in a Stacks app using Craft 0.0.90. The generated app otherwise includes the APNs entitlement correctly.

Sign in to comment on this issue.