onesignal_flutter 패키지는 Flutter 애플리케이션에서 OneSignal과 통합할 수 있도록 해주는 무료 모바일 앱 푸시 알림 서비스입니다. Android 및 iOS 플랫폼에서 푸시 알림을 보내고 받는 과정을 단순화합니다. 개발자는 사용자 구독을 쉽게 관리하고, 알림 이벤트를 처리하며, 앱 내에서 알림 동작을 맞춤 설정할 수 있습니다. 이 플러그인은 OneSignal에서 유지보수되며 pub.dev를 통해 원활한 설정을 지원합니다. 실시간 참여를 위한 알림이 필요한 앱에 적합합니다.
사용 사례
타겟팅된 푸시 알림 보내기
사용자 참여도 추적
앱 내 메시지 전달
실시간 알림
크로스플랫폼 알림 지원
주요 기능
Flutter와의 간편한 통합
Android 및 iOS 지원
알림 이벤트 처리
사용자 구독 관리
사용자 정의 알림 표시
적합한 대상
푸시 알림이 필요한 모바일 앱
OneSignal 사용 개발자
사용자 참여에 초점을 맞춘 앱
무료 알림 서비스를 찾는 스타트업
크로스 플랫폼 프로젝트
고려 사항
OneSignal 계정 설정이 필요합니다
올바른 API 키 구성이 필요합니다
OneSignal의 백엔드에 제한됨
iOS는 추가 권한이 필요합니다
백그라운드 실행 권한 필요
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
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 support@onesignal.com
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.
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, CocoaPods, 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, CocoaPods, 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.
CocoaPods: app extension targets
CocoaPods only builds OneSignalXCFramework once when every target in your
Podfile resolves the same set of subspecs. If the sets differ, it creates one
pod variant per set, and each variant tries to write the same extracted
framework, which fails the build with:
error: Multiple commands produce '.../XCFrameworkIntermediates/OneSignalXCFramework/OneSignalCore/OneSignalCore.framework'
With location disabled the plugin resolves OneSignalXCFramework/OneSignal and
OneSignalXCFramework/OneSignalInAppMessages, so every Notification Service
Extension or Widget Extension target must declare those same two subspecs:
target 'OneSignalNotificationServiceExtension' do
use_frameworks!
pod 'OneSignalXCFramework/OneSignal', '>= 5.0.0', '< 6.0'
pod 'OneSignalXCFramework/OneSignalInAppMessages', '>= 5.0.0', '< 6.0'
end
Without the environment variable set, the plugin resolves the umbrella pod, so
extension targets should declare pod 'OneSignalXCFramework' instead. Either
way the rule is the same: the app target and every extension target must request
an identical subspec set.
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_LOCATION exported. An IDE launched from the Dock/Finder
does not inherit variables set only in your shell profile.
In Xcode, you can instead use File → Packages → Reset Package Caches (with
the variable exported), then build.
CocoaPods:
cd ios
pod deintegrate
rm -rf Pods Podfile.lock
ONESIGNAL_DISABLE_LOCATION=true pod install
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 / CocoaPods / 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 /example folder of this repository.
Supports:
Tested from iOS 8 to iOS 15
Tested from Android 4.0.3 (API level 15) to Android 12.0 (31)