OneSignal/OneSignal-Flutter-SDK
حول
تجعل OneSignal إشراك العملاء أمرًا بسيطًا، وهي أسرع خدمة وأكثرها موثوقية لإرسال الإشعارات الفورية والرسائل داخل التطبيق والرسائل النصية القصيرة ورسائل البريد الإلكتروني. يسهّل هذا المكوّن دمج تطبيق Fluter الخاص بك مع OneSignal. https://onesignal.com
تطوير الويب والتطبيقاتالنمو المقاس للنجوم
- خلال 24 ساعة
- ٠
- خلال 7 أيام
- ٠
- خلال 15 يومًا
- ٠
- خلال شهر
- جارٍ جمع السجل
تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.
README.md
الأصل
OneSignal Flutter SDK 
⚠️ Migration Advisory for current OneSignal customers
Our new user-centric APIs and v5.x.x SDKs offer an improved user and data management experience. However, they may not be at 1:1 feature parity with our previous versions yet.
If you are migrating an existing app, we suggest using iOS and Android’s Phased Rollout capabilities to ensure that there are no unexpected issues or edge cases. Here is the documentation for each:
If you run into any challenges or have concerns, please contact our support team at [email protected]
OneSignal is a free email, sms, push notification, and in-app message service for mobile apps. This SDK makes it easy to integrate your Flutter iOS and/or Android apps with OneSignal.

Installation
See the Setup Guide for setup instructions.
iOS: Swift Package Manager only
The plugin supports iOS only through Swift Package Manager and requires Flutter 3.44 or newer, where Swift Package Manager is on by default. CocoaPods is no longer supported, because CocoaPods trunk became read-only on December 2, 2026 and new OneSignal iOS SDK versions are no longer published there.
To migrate an existing app:
- Upgrade to Flutter 3.44 or newer. If you turned Swift Package Manager off, turn it back on with
flutter config --enable-swift-package-managerand remove anyenable-swift-package-manager: falsesetting from yourpubspec.yaml. - Remove every
OneSignalXCFrameworkpod from yourPodfile, including any in a Notification Service Extension or Live Activity widget target.- If other plugins still need CocoaPods, run
pod installinios/. - If nothing else needs CocoaPods, run
pod deintegrateinios/and delete thePodfileandPodfile.lock.
- If other plugins still need CocoaPods, run
- If you have a Notification Service Extension or Live Activity widget, add the
https://github.com/OneSignal/OneSignal-XCFrameworkpackage in Xcode with the rule Up to Next Major Version from5.8.1. The plugin pins an exact version in itsPackage.swift, and this range lets Xcode resolve to that pin, so plugin updates don't require changing it. LinkOneSignalExtensionto the extension target andOneSignalFrameworkto the widget target. - Run
flutter build ios(orflutter run). Flutter adds the plugin's Swift package to your Xcode project.
Disabling OneSignal Location
If your app does not use OneSignal.Location, you can exclude the native OneSignal location module from iOS and Android builds.
For Swift Package Manager and Android Gradle builds, set
ONESIGNAL_DISABLE_LOCATION=true in the environment before resolving or
building. The value is case-insensitive, and 1 is also accepted.
In GitHub Actions, you can set it once at the job or step level so Swift Package Manager and Gradle builds inherit it:
env:
ONESIGNAL_DISABLE_LOCATION: true
With the location module disabled, calls to OneSignal.Location are ignored on Android and OneSignal.Location.isShared() returns false.
Applying the change (clearing cached packages)
The environment variable is only read when dependencies are resolved, and each platform caches the resolved set. If you change the variable on an existing project, you must clear the relevant cache and re-resolve in a shell where the variable is exported. Otherwise a stale build can keep (or drop) the location module regardless of the new value.
[!IMPORTANT] When using Xcode or Android Studio, launch the IDE from a terminal that has
ONESIGNAL_DISABLE_LOCATIONexported. An IDE launched from the Dock/Finder does not inherit variables set only in your shell profile.
Swift Package Manager:
flutter clean
rm -rf ios/.build
rm -rf ~/Library/Caches/org.swift.swiftpm ~/Library/Developer/Xcode/DerivedData/*
ONESIGNAL_DISABLE_LOCATION=true flutter build ios
In Xcode, you can instead use File → Packages → Reset Package Caches (with the variable exported), then build.
Android Gradle (Gradle re-reads the variable on each configuration, so a clean build is usually enough):
ONESIGNAL_DISABLE_LOCATION=true flutter build apk
On CI, key any DerivedData / SwiftPM / Gradle caches on the value of
ONESIGNAL_DISABLE_LOCATION (or skip restoring them for no-location builds) so a
restored cache does not resurrect the location module.
Change Log
See this repository's release tags for a complete change log of every released version.
Support
Please visit this repository's Github issue tracker for feature requests and bug reports related specificly to the SDK. For account issues and support please contact OneSignal support from the OneSignal.com dashboard.
Demo Project
To make things easier, we have published a demo project in the examples/demo folder of this repository.
Supports:
- iOS 15 and newer
- Tested from Android 4.0.3 (API level 15) to Android 12.0 (31)
استكشف مشاريع مشابهة ومرتبطة
جارٍ التحميل…