AI-powered SDK integration prompts for OneSignal. This repository contains structured prompts that enable AI coding assistants (Cursor, GitHub Copilot, etc.) to automatically integrate the OneSignal SDK into mobile and web applications.
Visit the GitHub Pages site to get started:
https://onesignal.github.io/sdk-ai-prompts/
- Android (Kotlin & Java)
- iOS (Swift & Objective-C)
- Flutter (Dart)
- Unity (C#)
- React Native (JavaScript & TypeScript)
- Select your platform on the homepage
- Copy the AI prompt that appears
- Paste into your AI-enabled IDE (Cursor, GitHub Copilot Chat, etc.)
- Answer a few questions (App ID, language preference)
- Let the AI integrate the OneSignal SDK
- Review the PR with all changes ready to merge
Copy and paste this prompt into your AI editor:
Integrate the OneSignal SDK into this codebase.
Follow the instructions at:
https://raw.githubusercontent.com/OneSignal/sdk-ai-prompts/main/docs/android/ai-prompt.md
Replace android with your platform: ios, flutter, unity, react-native, or react-native-expo.
docs/
├── index.html # Landing page with platform selector
├── styles.css # Dark/light mode styles
├── shared/
│ └── guidelines.md # Shared guidelines (source)
├── android/
│ ├── integrate.md # Android-specific guidance (source)
│ └── ai-prompt.md # Combined prompt (auto-generated)
├── ios/
│ ├── integrate.md # iOS-specific guidance (source)
│ └── ai-prompt.md # Combined prompt (auto-generated)
├── flutter/
│ ├── integrate.md
│ └── ai-prompt.md
├── unity/
│ ├── integrate.md
│ └── ai-prompt.md
└── react-native/
├── integrate.md
└── ai-prompt.md
script/
└── generate-prompts.sh # Generates ai-prompt.md files
Note: The ai-prompt.md files are auto-generated by combining shared/guidelines.md with each platform's integrate.md. Edit the source files, not the generated ones.
When you use these prompts, the AI will:
- Create a new branch (
onesignal-integration) - Add the correct SDK version for your platform
- Follow your existing architecture (MVVM, MVC, etc.)
- Create a centralized OneSignal manager class
- Handle threading correctly (off main thread)
- Add unit tests for the integration
- Create a Pull Request with all changes
- Output a PR summary for you to copy
If you don't have a OneSignal App ID, you can use the demo mode:
- When asked for your App ID, say "use demo"
- The AI will create a Welcome View with:
- Email input field
- Submit button
- On submit, it triggers a welcome email journey
For AI agents, use the combined prompt file (single URL per platform):
https://raw.githubusercontent.com/OneSignal/sdk-ai-prompts/main/docs/{platform}/ai-prompt.md
Example:
- Android:
https://raw.githubusercontent.com/OneSignal/sdk-ai-prompts/main/docs/android/ai-prompt.md - iOS:
https://raw.githubusercontent.com/OneSignal/sdk-ai-prompts/main/docs/ios/ai-prompt.md
- Dark/Light Mode: Automatically respects system preference
- Copy to Clipboard: Easy prompt copying
- Platform Detection: URL parameter based platform selection
- Pre-flight Checklists: Platform-specific verification steps
- Code Examples: Production-ready code snippets
After editing shared/guidelines.md or any {platform}/integrate.md, regenerate the combined files:
./script/generate-prompts.shThis creates/updates ai-prompt.md in each platform folder.
# Using Python
cd docs
python -m http.server 8000
# Visit http://localhost:8000The site automatically deploys to GitHub Pages on push to main via GitHub Actions. The workflow runs generate-prompts.sh before deploying.
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a Pull Request
MIT License - See LICENSE for details.