Dengage push notifications for Expo apps with automatic native configuration.
If you've tried using Dengage with Expo, you've probably run into this frustrating issue:
- You install Dengage's React Native package
- You run
expo prebuild - Push notifications don't work
- You realize you need to manually edit Android and iOS native files
- You spend hours figuring out the right configurations
- Every time you run
expo prebuild --clean, your changes disappear - You start wondering if there's a better way
- Dengage's package works perfectly for regular React Native projects
- But Expo generates Android/iOS folders automatically during prebuild
- Dengage's native configurations don't get included in this process
- You end up with broken push notifications and spend time debugging
This package handles all the native configuration automatically.
- Works seamlessly with Expo prebuild - no manual editing needed
- Handles all Android Java/Kotlin configurations
- Creates proper iOS Swift AppDelegate and extensions
- Adds all required permissions automatically
- Production tested - used in real apps serving thousands of users
Just install, configure, and it works.
// In your package.json
{
"dependencies": {
"rastmobile-expo-dengage": "file:./packages/rastmobile-expo-dengage"
}
}npm install// In app.config.ts
export default {
plugins: [
[
"rastmobile-expo-dengage",
{
// Your Dengage API keys
productionIntegrationKeys: {
ios: "YOUR_IOS_KEY",
android: "YOUR_ANDROID_KEY",
},
developmentIntegrationKeys: {
ios: "YOUR_DEV_IOS_KEY",
android: "YOUR_DEV_ANDROID_KEY",
},
mode: "production", // or "development"
// iOS settings
devTeam: "YOUR_APPLE_TEAM_ID", // Required for iOS
// Notification icons
smallIcons: ["./assets/images/icon.png"],
largeIcons: ["./assets/images/icon.png"],
// Optional settings
contentExtensionIosBundle: "DengageContentExtension",
notificationServiceIosBundle: "DengageNotificationServiceExtension",
iosGroupBundle: "",
disableDevelopmentClient: true,
},
],
],
};npx expo prebuild --cleanThat's it. Your app now has working Dengage push notifications.
To modify this package:
cd packages/rastmobile-expo-dengage
npm install --legacy-peer-deps
npm run buildWhen you run expo prebuild, this package automatically:
- Modifies your MainActivity to add Dengage setup code in the right place
- Updates MainApplication to register the Dengage package properly
- Configures AndroidManifest to add all required permissions and receivers
- Handles Android 13+ notification permissions
- Uses safe timing to avoid initialization issues
- Creates a complete Swift AppDelegate (compatible with Expo SDK 53+)
- Sets up notification extensions (Content and Service extensions) automatically
- Configures the Xcode project with proper frameworks and build settings
- Sets up push notification entitlements
- Integrates with your Apple Developer Team for proper code signing
- Won't break if you run prebuild multiple times
- Handles missing files gracefully
- Includes full TypeScript support
- Provides helpful logging for debugging
Instead of manually editing native code after each expo prebuild, this package automates everything.
This works as an Expo Config Plugin, which means:
- It runs during
expo prebuild - It modifies native Android and iOS code based on your configuration
- No manual editing required
- Compatible with EAS Build and development builds
- Supports both development and production environments
- Uses a "nuclear option" pattern - cleans up any existing Dengage code before adding new code to prevent duplicates
- Supports modern Kotlin syntax
- Compatible with Expo's splash screen system
- Automatically adds
POST_NOTIFICATIONSpermission for Android 13+ - Uses delays and safety checks to prevent crashes during initialization
- Designed to be run multiple times safely
- Built specifically for Expo SDK 53+ (where AppDelegate is now Swift)
- Generates the entire AppDelegate.swift file from a template
- Pure TypeScript implementation - no bash scripts required
- Compatible with react-native-wis if you're using it
- Handles Firebase integration alongside Dengage
- Supports deep linking and universal links
- Full TypeScript support with proper type definitions
- Clear error messages when something goes wrong
- Comprehensive logging through
RastmobileDengageLog - Smart fallbacks when packages can't be found automatically
- This package rewrites parts of your MainActivity using the "nuclear option" approach
- It automatically resolves duplicate import and code issues
- The
POST_NOTIFICATIONSpermission is added automatically - For Android 13+, it uses a 500ms delay to prevent permission-related crashes
- Everything has been tested in production environments
- Only compatible with Expo SDK 53+ (AppDelegate is now Swift)
- The entire AppDelegate.swift file is recreated from scratch
- You must provide your Apple Developer Team ID in the configuration
- Notification extensions are created automatically
- Compatible with other notification libraries like react-native-wis
- All services (Firebase, Dengage, etc.) are properly integrated
- No manual Xcode editing required
Push notifications not working after prebuild?
Check that you provided the correct Team ID in your configuration and verify your Dengage API keys.
iOS build failing?
Verify that your Apple Developer Team ID is correct in the plugin configuration.
Android permissions not working?
This package adds permissions automatically. If notifications still don't work, double-check your Dengage integration keys.
Getting duplicate code errors?
This package uses a "nuclear option" pattern to prevent duplicates. If you're still getting errors, try running expo prebuild --clean.
For additional help, check our GitHub Issues.
We're Rast Mobile, a mobile app development team based in Turkey.
We kept running into the same problem on different client projects: Dengage and Expo just didn't play nicely together. After manually fixing this integration for the fifth time, we decided to build a proper solution that handles everything automatically.
This package is now running in production apps that serve thousands of users daily.
We're a mobile development company that focuses on:
- React Native and Expo applications, especially complex integrations
- Push notification systems (we've integrated most of the major services)
- Native module development when you need to bridge JavaScript with native code
- App performance optimization
- CI/CD pipeline setup for mobile apps
- Website: rastmobile.com
- Mobile App Development: rastmobile.com/en/services/mobile-app
- LinkedIn: linkedin.com/company/rastmobile
- Email: contact@rastmobile.com
- Phone: +90 212 945 47 44
If you're dealing with a complex React Native or Expo integration challenge, we've probably tackled something similar. Feel free to reach out for a consultation.
We work on:
- Cross-platform app development (React Native, Flutter, Expo)
- Native iOS and Android development
- Third-party SDK integrations (like this Dengage solution)
- Backend development and API integration
- App store deployment and optimization
- Code reviews and architecture consulting
- GitHub: rastmob/rastmobile-expo-dengage
- NPM: rastmobile-expo-dengage
- Issues: GitHub Issues
- Changelog: CHANGELOG.md
MIT License - see LICENSE file for details.
Made with ❤️ by Rast Mobile
Solving mobile development challenges, one package at a time.