Push notifications not received on iOS devices after configuring FCM/APNs

After setting up Firebase Cloud Messaging (FCM) for push notifications in our Mendix 10.6 mobile app, Android devices receive notifications perfectly, but iOS devices get nothing. I’ve configured both the APNs authentication key and certificate in Firebase, and the iOS bundle ID matches exactly between Xcode, Mendix, and Firebase console.

The FCM to APNs bridge should handle the routing automatically, but something in the APNs key/certificate setup must be wrong. The app builds successfully, installs on iOS devices, and users can interact with it normally - just no push notifications arrive. No errors show in the Mendix logs either.

I’ve verified the bundle ID is correct in all three places (com.company.appname), the APNs key is uploaded to Firebase with the correct Key ID and Team ID, and the app has notification permissions enabled on the test devices. What am I missing in the iOS configuration?

I checked the database and iOS device tokens are being registered. They look different from Android tokens (longer, different format), but they’re there. Could the token format difference be causing issues with how Mendix sends to FCM?

Let me provide a comprehensive solution addressing all three critical areas:

APNs Key/Certificate Setup: You need to verify your APNs authentication key is properly configured in both Apple Developer and Firebase:

  1. In Apple Developer Portal:

    • Go to Certificates, Identifiers & Profiles → Keys
    • Verify your key has “Apple Push Notifications service (APNs)” enabled
    • Note the Key ID (10-character string) and Team ID (from top right of portal)
    • Download the .p8 key file if you haven’t already (can only download once)
  2. In Firebase Console:

    • Navigate to Project Settings → Cloud Messaging → Apple app configuration
    • Upload the .p8 file
    • Enter the exact Key ID and Team ID from Apple Developer
    • Save the configuration

Critical detail: If you previously uploaded an APNs certificate (.p12 file) instead of an authentication key, remove it. You should use either the key OR certificate, not both. The key method is recommended and works for both development and production.

FCM to APNs Bridge Configuration: The bridge routing depends on several factors:

  1. API Version: Ensure you’re using FCM HTTP v1 API in your Mendix push notification configuration. The legacy API has known issues with APNs bridging. In your Mendix app:

    • Open the Push Notifications module configuration
    • Set the FCM API to v1 (not legacy)
    • Update your service account JSON key if needed
  2. Message Format: FCM routes to APNs based on message structure. Verify your notification payload includes the apns configuration:

    
    // Payload structure in Mendix microflow:
    {
      "token": "<iOS_device_token>",
      "notification": {
        "title": "Title",
        "body": "Message"
      },
      "apns": {
        "payload": {
          "aps": {
            "sound": "default",
            "badge": 1
          }
        }
      }
    }
    
  3. Environment Routing: FCM automatically detects whether to use APNs sandbox or production based on your app’s provisioning profile. However, this only works if:

    • Your bundle ID matches exactly in Xcode, Firebase, and Mendix (including case)
    • Your app is signed with the correct provisioning profile
    • The APNs key in Firebase has access to that App ID

iOS Bundle ID Matching: This is the most common issue. Verify exact matching:

  1. Xcode Project:

    • Open your project in Xcode
    • Select your target → General tab
    • Check Bundle Identifier (e.g., com.company.appname)
    • Verify it matches your App ID in Apple Developer Portal
  2. Mendix Configuration:

    • In Studio Pro, check App Settings → Mobile
    • Verify iOS Bundle Identifier matches exactly
    • Check for trailing spaces or case differences
  3. Firebase Console:

    • Project Settings → General → Your apps → iOS app
    • Verify Bundle ID matches exactly
    • Re-download GoogleService-Info.plist if you made changes
    • Replace the file in your Mendix project
  4. Capabilities:

    • In Xcode, select target → Signing & Capabilities
    • Ensure “Push Notifications” capability is added
    • Verify “Background Modes” includes “Remote notifications”

Testing Steps:

  1. Clean build your iOS app after verifying all configurations
  2. Uninstall any previous version from test device
  3. Install fresh build and grant notification permissions
  4. Check device token is registered in Mendix database
  5. Send test notification from Mendix
  6. If still failing, check Xcode console for APNs registration errors
  7. Verify Firebase Cloud Messaging logs for delivery status

Common Gotchas:

  • Bundle ID is case-sensitive - com.Company.App ≠ com.company.app
  • If you regenerated your APNs key, the old Key ID in Firebase is invalid
  • Development builds won’t receive notifications sent via production APNs endpoint
  • Some corporate/school WiFi networks block APNs ports (5223, 443)

After making these corrections, rebuild your app completely (clean build folder in Xcode) and reinstall on test devices. The notifications should start arriving on iOS devices within minutes of sending.

First thing to check - are you using the production APNs key or the development/sandbox key? If your app is in development mode but you uploaded the production key to Firebase, notifications won’t route correctly. FCM needs the right environment key to match how your app was signed.

Token format difference is normal - iOS tokens are longer. But here’s something many people miss: when you test on a development build, you need to make sure your Mendix push notification module is configured to use the FCM v1 API, not the legacy API. The legacy API has issues with APNs bridging in some configurations.

The APNs authentication key (the .p8 file) actually works for both environments. The key itself doesn’t specify sandbox vs production - FCM determines which APNs server to use based on your app’s build configuration. However, you need to ensure the key has APNs enabled in your Apple Developer account and that you’re using the correct Key ID and Team ID in Firebase. Double-check those values match exactly what’s shown in your Apple Developer portal.

I’m using a development provisioning profile for testing, so I should be using the sandbox APNs key, right? But in Firebase console, I only see options to upload one APNs key - it doesn’t distinguish between sandbox and production. Does the key itself contain that information?