- Cập nhật lần cuối
This guide covers environment configuration, build settings, and SDK Config registration after adding the SDK.
Development Environment Setup
Environment Definition
The STOVE platform consists of two environments: Sandbox for development and testing, and Live for actual service. Since data, accounts, and consoles are completely separated between these two environments, the SDK must be configured accordingly for each.
| Category | Sandbox | Live |
|---|---|---|
| Purpose | Development · QA · Testing | Actual Service |
| Partners | partners.gate8.com | partners.onstove.com |
| API Host | api.gate8.com | api.onstove.com |
| PC Launcher | Launcher 3.0 Sandbox + Developer Mode available | Launcher 3.0 Live |
| Account / Data | Operated independently. No impact on actual service. | Operated independently. Switched after QA completion. |
Partners Access Guide by Environment
ㆍ Partners have different access URLs for each environment. Access to both environments is only possible via a VPN account.
ㆍ All registration tasks, such as SDK Config and app registration, must be performed separately in the Partners portal for each environment.
- Environment Switching
The environment that the SDK calls is determined by the environment setting value in the client build.
Generally, this is branched by build type (debug / release) or SDK initialization options.- Development/QA Build: Sandbox
- Store Distribution Build: Live
Caution on Environment Synchronization
ㆍ The client environment setting must match the environment where the SDK Config is registered in Partners.
ㆍ If a Sandbox client queries the Live SDK Config, SDK init will fail.
Adding SDK by Platform
This section explains how to add SDK modules and configure build environments for each platform. Please refer to the SDK Download and Installation guide first.
You only need to follow the section for your environment from top to bottom
ㆍ Follow the section corresponding to your environment (MobileSDK / PC SDK) in order to complete the environment setup. MobileSDK is subdivided into sub-sections based on the build environment (Android / iOS / Unity / Unreal).
ㆍ Example code is based on SDK. Please check the latest module version at .
ㆍ For 4.0.0, all modules must be replaced with 4.0.0 together; they cannot be mixed with 3.x modules.
ㆍ From 3.0.0 onwards, modules are integrated and cannot be used with 2.9.x modules. If you are upgrading from 2.9.x, please check the migration guide ( · ) first.
ㆍ Requirements: iOS 15.0 or higher · Xcode 27.1 or higher · Android minSdk 24 / targetSdk 35 / compileSdk 35 · Android Gradle Plugin 8.6.1 / Kotlin 1.9.25 / Java 17
ㆍ Keys for each authentication Provider ( , , etc.) are covered for each Provider at .
Please build STOVE SDK 4.0.0 with Xcode 27.1 or higher
ㆍ 4.0.0 is provided based on the Xcode 27.1 · iOS 27.1 SDK build environment. This applies to iOS · Unity · Unreal iOS builds.
ㆍ In Xcode 27.1 or higher, applying SceneDelegate (UIScene lifecycle) and setting the iOS Deployment Target to 15.0 or higher for all targets, including apps, extensions, and third-party pods, is mandatory. For more details, please check .
ㆍ If immediate application is difficult due to project structure or schedule, please contact the development team. We will assist you with a customized guide tailored to your project situation.
4.0.0 based on. Please check the latest module version at SDK 다운로드 및 설치.
ㆍ 4.0.0 requires all modules to be replaced with 4.0.0 together, and they cannot be mixed with 3.x modules.
ㆍ From 3.0.0, modules are integrated and cannot be used with 2.9.x modules. If you are upgrading from 2.9.x, please check the migration guide(3.0.0 업그레이드 안내 and the migration guide(Unity · Unreal) first.
ㆍ Requirements: iOS 15.0 or higher · Xcode 27.1 or higher · Android minSdk 24 / targetSdk 35 / compileSdk 35 · Android Gradle Plugin 8.6.1 / Kotlin 1.9.25 / Java 17
ㆍ Keys for each authentication Provider(facebook_app_id,google_web_client_id,naver_client_idetc.) are covered for each Provider at 로그인 가이드.
Please build STOVE SDK 4.0.0 with Xcode 27.1 or higher
ㆍ 4.0.0 is provided based on the Xcode 27.1 · iOS 27.1 SDK build environment. This applies to iOS · Unity · Unreal iOS builds.
ㆍ In Xcode 27.1 or higher, applying SceneDelegate (UIScene lifecycle) and setting the iOS Deployment Target to 15.0 or higher for all targets, including apps, extensions, and third-party pods, is mandatory. For more details, please check iOS — Xcode 27.1 이상 빌드 환경.
ㆍ If immediate application is difficult due to project structure or schedule, please contact the development team. We will assist you with a customized guide tailored to your project situation.
Mobile SDK
This SDK operates in mobile environments (Android · iOS). Please follow the sub-section that matches your build environment. Even within mobile, the configuration method differs by build tool (Native / Unity / Unreal), so it is divided into four parts.
Unity
.unitypackage After importing, proceed with Unity Stove environment configuration + Android Custom Gradle Template + UnityPlayerActivity additional settings + iOS Xcode post-processing. (Unity 2022.3.10f1 or higher)
1) Import Unity Package
- SDK 다운로드 및 설치Unzip the
.unitypackagereceived from - Unity → Assets → Import Package → Custom Package… to import - Import theStovepackage first, then import the packages for the required features. The imported package, the iOSPodfilepod, and the AndroidmainTemplate.gradlecoordinates must always be matched 1:1.
2) Stove Environment Configuration (Zone)
Aside from the iOS Info.plist StoveEnvironment, Unity configures the environment directly in the editor Inspector.
- Unity → Stove → Edit Settings click
- Configure the
Zoneitem in the Inspector window —live/sandbox
3) Android — Enable 5 Custom Gradle Templates
In Project Settings → Player → Android → Publishing Settings, check all 5 items below.
- Custom Main Gradle Template →
Assets/Plugins/Android/mainTemplate.gradle - Custom Launcher Gradle Template →
launcherTemplate.gradle - Custom Base Gradle Template →
baseProjectTemplate.gradle - Custom Gradle Properties Template →
gradleTemplate.properties - Custom Settings Gradle Template →
settingsTemplate.gradle
baseProjectTemplate.gradle — Specify Plugin version
plugins {
// Android Gradle Plugin 버전은 사용하는 Unity 버전에 내장된 Gradle 과 호환되는 값으로 맞춰요.
// https://docs.unity3d.com/Manual/android-gradle-overview.html
id 'com.android.application' version '8.6.1' apply false
id 'com.android.library' version '8.6.1' apply false
id 'org.jetbrains.kotlin.android' version '1.9.25' apply false
id 'com.google.gms.google-services' version '4.4.2' apply false
//**BUILD_SCRIPT_DEPS**
}
task clean(type: Delete) {
delete rootProject.buildDir
}
gradleTemplate.properties — Enable AndroidX / Jetifier
org.gradle.jvmargs=-Xmx**JVM_HEAP_SIZE**M
org.gradle.parallel=true
unityStreamingAssets=**STREAMING_ASSETS**
android.useAndroidX=true
android.enableJetifier=true
**ADDITIONAL_PROPERTIES**
settingsTemplate.gradle — Register STOVE / Huawei / OneStore Maven repositories
pluginManagement {
repositories {
**ARTIFACTORYREPOSITORY**
gradlePluginPortal()
google()
mavenCentral()
}
}
include ':launcher', ':unityLibrary'
**INCLUDES**
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
repositories {
**ARTIFACTORYREPOSITORY**
google()
mavenCentral()
flatDir { dirs "${project(':unityLibrary').projectDir}/libs" }
maven { url "https://externalnexus.iam0.com/repository/mvp"; allowInsecureProtocol = true } // STOVE
maven { url "https://jitpack.io"; allowInsecureProtocol = true }
maven { url "https://developer.huawei.com/repo/"; allowInsecureProtocol = true } // Huawei
maven { url "https://repo.onestore.net/repository/onestore-sdk-public"; allowInsecureProtocol = true } // OneStore
}
}
mainTemplate.gradle — Stove dependencies + Java 17 + dataBinding + multiDexEnabled
plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
id 'org.jetbrains.kotlin.kapt'
}
**APPLY_PLUGINS**
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.stove:stove:4.0.0'
implementation 'com.stove:stove-providers:4.0.0'
implementation 'com.stove:stove-push:4.0.0'
implementation 'com.stove:stove-push-firebase:4.0.0'
implementation 'com.stove:stove-iap:4.0.0'
implementation 'com.stove:stove-iap-google:4.0.0'
// implementation 'com.stove:stove-gamelog:4.0.0' // 게임 로그를 쓰는 경우만
// Google Play Games — GPG 로그인을 쓰는 경우
implementation "com.google.android.gms:play-services-games-v2:19.0.0"
implementation 'com.google.android.gms:play-services-tasks:18.0.2'
**DEPS**}
android {
namespace '**APPLICATIONID**'
ndkPath "**NDKPATH**"
compileSdkVersion **APIVERSION**
buildToolsVersion '**BUILDTOOLS**'
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '17'
}
defaultConfig {
minSdkVersion **MINSDKVERSION**
targetSdkVersion **TARGETSDKVERSION**
ndk {
abiFilters **ABIFILTERS**
}
versionCode **VERSIONCODE**
versionName '**VERSIONNAME**'
multiDexEnabled true
consumerProguardFiles 'proguard-unity.txt'**USER_PROGUARD**
}
buildFeatures {
dataBinding true
}
lint {
abortOnError false
}
androidResources {
noCompress = **BUILTIN_NOCOMPRESS** + unityStreamingAssets.tokenize(', ')
ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~"
}**PACKAGING_OPTIONS**
}
**IL_CPP_BUILD_SETUP**
**SOURCE_BUILD_SETUP**
**EXTERNAL_SOURCES**
Adjust Stove coordinates according to your project configuration
ㆍ The example above is based on Google Market · Firebase push. If building for Huawei · OneStore markets, add com.stove:stove-iap-huawei · com.stove:stove-iap-onestore · com.stove:stove-push-huawei together.
ㆍ Match all com.stove: coordinates to 4.0.0. 2.9.x · 3.x versions must not remain. They cannot be used with 4.0.0 modules.
ㆍ If using GPG (Google Play Games) login, do not delete the play-services-games-v2 · play-services-tasks lines. Deleting them will cause GPG login to fail.
launcherTemplate.gradle — Apply Google Services + Avoid Amazon Build conflicts + Support Android 7.x
plugins {
id 'com.android.application'
id 'com.google.gms.google-services'
}
dependencies {
implementation project(':unityLibrary')
}
configurations.all {
// Amazon Build에서 중복 의존성 제외
exclude(group: 'com.google.protobuf', module: 'protobuf-lite')
// Android 7.x 지원 (필수)
resolutionStrategy {
force 'com.google.android.gms:play-services-ads-identifier:18.0.1'
}
}
android {
namespace '**APPLICATIONID**'
ndkPath "**NDKPATH**"
compileSdkVersion **APIVERSION**
buildToolsVersion '**BUILDTOOLS**'
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
defaultConfig {
minSdkVersion **MINSDKVERSION**
targetSdkVersion **TARGETSDKVERSION**
applicationId '**APPLICATIONID**'
ndk {
abiFilters **ABIFILTERS**
}
versionCode **VERSIONCODE**
versionName '**VERSIONNAME**'
multiDexEnabled true
}
buildFeatures {
dataBinding true
}
lint {
abortOnError false
}
androidResources {
noCompress = **BUILTIN_NOCOMPRESS** + unityStreamingAssets.tokenize(', ')
ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~"
}**SIGN**
buildTypes {
debug {
minifyEnabled **MINIFY_DEBUG**
proguardFiles getDefaultProguardFile('proguard-android.txt')**SIGNCONFIG**
jniDebuggable true
}
release {
minifyEnabled **MINIFY_RELEASE**
proguardFiles getDefaultProguardFile('proguard-android.txt')**SIGNCONFIG**
}
}**PACKAGING_OPTIONS****PLAY_ASSET_PACKS****SPLITS**
**BUILT_APK_LOCATION**
bundle {
language {
enableSplit = false
}
density {
enableSplit = false
}
abi {
enableSplit = true
}
}
}**SPLITS_VERSION_CODE****LAUNCHER_SOURCE_BUILD_SETUP**
4) Additional settings when inheriting UnityPlayerActivity
UnityPlayerActivityIf you are using a custom Activity by inheriting from , you must add the code below and set it in the manifest to ensure STOVE Push / View UI Overlay work correctly. If you do not inherit from it, you can simply specify the hardwareAccelerated provided by the SDK as is. com.stove.unity.StoveUnityPlayerActivity
class CustomActivity : UnityPlayerActivity() {
override fun onCreate(bundle: Bundle?) {
super.onCreate(bundle)
Push.handleIntent(applicationContext, intent) // Push 동작 추가
}
override fun onNewIntent(newIntent: Intent?) {
super.onNewIntent(newIntent)
Push.handleIntent(applicationContext, newIntent)
}
// UI Overlay 동작 추가
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
if (requestCode == 7585) ViewUI.handleIntent(requestCode, resultCode, data)
}
}
The build will succeed even if you miss the entry pointAndroidManifestIf the activity android:name points to a non-existent class, the app will terminate immediately upon launch. If the above hook is missing, push and overlay file attachments will not function without errors. Please be sure to verify this on a physical device.
AndroidManifest Hardware Acceleration Settings (Required)
<activity
android:name="com.stove.unity.StoveUnityPlayerActivity"
android:hardwareAccelerated="true"
android:exported="true">
<!-- ... -->
</activity>
5) iOS — Podfile + Xcode Post-processing (PostProcessBuild recommended)
Please build Unity iOS with Xcode 27.1 or higher
ㆍ STOVE SDK 4.0.0 requires a build with Xcode 27.1 or higher. Podfile The post_install block and the Unity-iPhone · UnityFramework · NotificationServiceExtension target's Deployment Target 15.0 setting are also required.
ㆍ Please apply SceneDelegate according to iOS Unity UISceneDelegate 대응 업데이트.
ㆍ Please check iOS — Xcode 27.1 이상 빌드 환경 for the pod reinstallation procedure and build environment verification items.
Podfile — Add the STOVE pod to the UnityFramework target. Match it 1:1 with the imported package.
source 'http://stove-developers-gitlab.sginfra.net/stove-sdk/Specs.git'
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '15.0'
use_frameworks!
target 'UnityFramework' do
pod 'Stove', '4.0.0'
pod 'StoveProviders', '4.0.0'
pod 'StoveIAP2', '4.0.0'
pod 'StovePush', '4.0.0'
# pod 'StoveGameLog', '4.0.0' # 게임 로그를 쓰는 경우만
end
target 'Unity-iPhone' do
end
# Notification Service Extension 을 쓰는 경우
target 'NotificationServiceExtension' do
pod 'StovePushExtension', '4.0.0'
end
# Xcode 27+ requires IPHONEOS_DEPLOYMENT_TARGET >= 15.0.
# Third-party dependency pods (Facebook, Google, Naver, etc.) still declare lower targets in their podspecs.
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f < 15.0
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.0'
end
end
end
end
Ensure all STOVE pods are set to 4.0.0
ㆍ 4.0.0 pods and 3.x pods cannot be used together. Do not update only some pods to 4.0.0.
ㆍ SGS 2.9.x pods starting with (SGSBase etc.) must not remain.
ㆍ SGSGamingServices was removed in 3.0.0. The GPG User ID feature is included in StoveProviders.
ㆍ Please check post_install for the reason why the iOS — Xcode 27.1 이상 빌드 환경 block is required. If you are already using post_install, merge the loop within the existing block.
Unity generates an Xcode project during the build. It is recommended to place a PostProcessBuild script in Assets/Editor/ so you do not have to manually modify it every build. The items to be handled by automation are as follows (refer to the iOS section below for specific values).
pod installInfo.plistAdd keys (StoveEnvironment/LSApplicationQueriesSchemes=[mstove]/ URL Schemes / Permission messages)- Merge entitlements (Capabilities key)
- Add Library / Runpath Search Paths (Xcode 16.x / 26 branch)
- Set iOS Deployment Target 15.0 —
Unity-iPhone·UnityFramework·NotificationServiceExtensionall targets (Required when building with Xcode 27.1 or higher) AppDelegate.mmInsertSGSApplicationDelegate openURLdelegation code — The import path has changed to<Stove/Stove.h>·<StovePush/StovePush.h>since 3.0.0. If you use a customAppController, apply iOS Unity UISceneDelegate 대응 업데이트 as well.
Library / Runpath Search Paths — Xcode version branch actual code:
// Xcode 26부터 Metal toolchain이 cryptex로 분리되어 swift-5.0 경로 제거
pbxProject.AddBuildProperty(targetGuid, "LIBRARY_SEARCH_PATHS", "$(SDKROOT)/usr/lib/swift");
pbxProject.AddBuildProperty(targetGuid, "LIBRARY_SEARCH_PATHS", "$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)");
// ⚠️ Xcode 26.0.x 사용 시 $(TOOLCHAIN_DIR)가 Metal cryptex로 잘못 resolve되는 버그 대응 (26.2에서 수정)
// pbxProject.AddBuildProperty(targetGuid, "LIBRARY_SEARCH_PATHS",
// "$(DEVELOPER_DIR)/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/$(PLATFORM_NAME)");
pbxProject.AddBuildProperty(targetGuid, "LD_RUNPATH_SEARCH_PATHS", "/usr/lib/swift");
pbxProject.AddBuildProperty(targetGuid, "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES", "YES");
// UnityFramework target
pbxProject.AddBuildProperty(frameworkTargetGuid, "LIBRARY_SEARCH_PATHS", "$(SDKROOT)/usr/lib/swift");
pbxProject.AddBuildProperty(frameworkTargetGuid, "LIBRARY_SEARCH_PATHS", "$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)");
pbxProject.SetBuildProperty(frameworkTargetGuid, "LD_RUNPATH_SEARCH_PATHS", "/usr/lib/swift");
pbxProject.AddBuildProperty(frameworkTargetGuid, "LD_RUNPATH_SEARCH_PATHS", "$(inherited)");
pbxProject.AddBuildProperty(frameworkTargetGuid, "LD_RUNPATH_SEARCH_PATHS", "@executable_path/Frameworks");
pbxProject.AddBuildProperty(frameworkTargetGuid, "LD_RUNPATH_SEARCH_PATHS", "@loader_path/Frameworks");
pbxProject.AddBuildProperty(frameworkTargetGuid, "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES", "NO");
iOS Deployment Target — Required when building with Xcode 27.1 or higher:
// Unity-iPhone · UnityFramework · NotificationServiceExtension 타깃 모두 15.0
pbxProject.SetBuildProperty(targetGuid, "IPHONEOS_DEPLOYMENT_TARGET", "15.0");
pbxProject.SetBuildProperty(frameworkTargetGuid, "IPHONEOS_DEPLOYMENT_TARGET", "15.0");
pbxProject.SetBuildProperty(notificationServiceTarget, "IPHONEOS_DEPLOYMENT_TARGET", "15.0");
Manual processing is also possible
If you do not use an automation script, there is no issue with opening Xcode after each build and applying the above values manually. However, if builds are frequent, automation is recommended.
6) iOS — In-App Purchase (StoreKit 2)
Unity's StoveIAP The package uses the StoreKit 2-based StoveIAP2 pod on iOS. Podfile Simply add StoveIAP2 to your . You do not need to change the import of IAPNativeInterface.mm or manually add the prepareTransactionListener call, as in 2.9.x. The package's stove_iap_setListener calls it internally.
7) Notification Service Extension (when using extended push notifications)
To use images and actions in iOS push notifications, you must add a Notification Service Extension target and include the StovePushExtension Pod as a dependency.
- Add the Notification Service Extension target to the Podfile (refer to 5) iOS — Podfile above)
- Xcode → File → New → Target → Create a target with "Notification Service Extension"
Actual code for Xcode version branching in the Notification Service Extension target's Build Settings:
csharp
pbxProject.AddBuildProperty(notificationServiceTarget, "LIBRARY_SEARCH_PATHS", "$(SDKROOT)/usr/lib/swift");
pbxProject.AddBuildProperty(notificationServiceTarget, "LIBRARY_SEARCH_PATHS", "$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)");
// ⚠️ The Extension target has no Swift source, making it a primary point of impact for the Xcode 26.0.x bug (fixed in 26.2)
// pbxProject.AddBuildProperty(notificationServiceTarget, "LIBRARY_SEARCH_PATHS",
// "$(DEVELOPER_DIR)/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/$(PLATFORM_NAME)");
pbxProject.SetBuildProperty(notificationServiceTarget, "LD_RUNPATH_SEARCH_PATHS", "/usr/lib/swift");
pbxProject.AddBuildProperty(notificationServiceTarget, "LD_RUNPATH_SEARCH_PATHS", "$(inherited)");
pbxProject.AddBuildProperty(notificationServiceTarget, "LD_RUNPATH_SEARCH_PATHS", "@executable_path/Frameworks");
pbxProject.AddBuildProperty(notificationServiceTarget, "LD_RUNPATH_SEARCH_PATHS", "@executable_path/../../Frameworks");
pbxProject.AddBuildProperty(notificationServiceTarget, "LD_RUNPATH_SEARCH_PATHS", "@loader_path/Frameworks");
Unreal
Plugins folder placement + Project.build.cs dependency + UPL(GamePlugin.xml) for Android Gradle dependency injection + disabling Online Subsystem GooglePlay is the basic requirement. If you need iOS Capabilities (keychain/app group) or LSSupportsOpeningDocumentsInPlace (for Naver login), a custom engine build environment is additionally required. (Unreal 5.4.4 or higher)
1) Plugin Placement & Activation
- Copy the downloaded Stove plugin to the project
Pluginsfolder .uprojector activate it in the Edit → Plugins menu
"Plugins": [
{ "Name": "Stove", "Enabled": true },
{ "Name": "StoveProviders", "Enabled": true },
{ "Name": "StoveIAP", "Enabled": true },
{ "Name": "StovePush", "Enabled": true },
{ "Name": "StoveGameLog", "Enabled": true }
]
Stoveis always required as all other plugins depend on it.- You can remove
StoveIAPif you are not using payments,StovePushif you are not using push notifications, andStoveGameLogif you are not using game logs. - In 2.9.x,
SGS_IAP_Google·SGS_Push_Firebaseare absorbed intoStoveIAP·StovePushrespectively, so there are no separate plugins.
Delete the 2.9.x SGS_* plugin folder
If it remains, you will get duplicate symbol linker errors on iOS. Do not leave it in .uproject as "Enabled": false either.
2) Project.build.cs — Module Dependency
.uproject Enter the same names as the plugins activated in . If you only fix one side, the build will fail.
using System.IO;
public class Game : ModuleRules
{
public Game(ReadOnlyTargetRules Target) : base(Target)
{
PublicDependencyModuleNames.AddRange(new string[] {
"Core", "CoreUObject", "Engine", "InputCore",
"Stove", "StoveProviders", "StoveIAP", "StovePush", "StoveGameLog"
});
}
}
3) Android Settings
SDK Manager version pinning
- Install SDK Platform 34
- Install SDK Tools 34.0.0 (remove or uncheck higher versions)
Gradle 8.6 Settings — Engine/Build/Android/Java/gradle/gradle/wrapper/gradle-wrapper.properties
distributionUrl=https://services.gradle.org/distributions/gradle-8.6-all.zip
The sample below is based on Gradle 8.6
If you are using a different Gradle version, you may need to modify the sample code accordingly.
Disable Online Subsystem GooglePlay (Required) — Disable the Online Subsystem GooglePlay plugin provided by Unreal to prevent conflicts with the Stove plugin's GooglePlay library.
Extra Manifest — Edit → Project Settings → Android → Advanced APK Packaging
<meta-data android:name="com.stove.environment" android:value="live" /> <!-- live / sandbox -->
UPL GamePlugin.xml — The only channel for injecting Gradle dependencies in Unreal
<?xml version="1.0" encoding="utf-8"?>
<root xmlns:android="http://schemas.android.com/apk/res/android">
<init>
<log text="Android init"/>
</init>
<buildGradleAdditions>
<insert>
dependencies {
implementation 'com.stove:stove:4.0.0'
implementation 'com.stove:stove-providers:4.0.0'
implementation 'com.stove:stove-iap-google:4.0.0'
implementation 'com.stove:stove-push-firebase:4.0.0'
// Google Play Games — GPG 로그인을 쓰는 경우
implementation "com.google.android.gms:play-services-games-v2:19.0.0"
}
</insert>
</buildGradleAdditions>
</root>
stove-iap-google·stove-push-firebasebringsstove-iap·stove-pushtogether.- If building for Huawei · OneStore markets, add
com.stove:stove-iap-huawei·com.stove:stove-iap-onestore·com.stove:stove-push-huawei. - The
StoveGameLogplugin iscom.stove:stove-gamelogSince dependencies are added directly, you don't need to write them here. - If you use GPG (Google Play Games) login,
play-services-games-v2Do not delete the line. If you delete it, GPG login will fail.
Project.build.csUPL connection to
public class Game : ModuleRules
{
public Game(ReadOnlyTargetRules Target) : base(Target)
{
// ...
if (Target.Platform == UnrealTargetPlatform.Android)
{
PrivateDependencyModuleNames.AddRange(new string[] { "Launch" });
string PluginPath = Utils.MakePathRelativeTo(ModuleDirectory, Target.RelativeEnginePath);
AdditionalPropertiesForReceipt.Add(
"AndroidPlugin",
Path.Combine(PluginPath, "GamePlugin.xml"));
}
}
}
If you remove this UPL, the STOVE SDK will not be included in the APK.
In Unreal, build.gradle cannot be edited directly, and dependencies can only be injected via UPL.
4) iOS Settings — Basic
Please perform Unreal iOS builds using Xcode 27.1 or higher.
ㆍ STOVE SDK 4.0.0 requires a build with Xcode 27.1 or higher. The Minimum iOS Version (iOS 15) setting below is also required.
ㆍ Please apply SceneDelegate according to iOS Unreal UISceneDelegate 대응 업데이트.
Apply this to the Xcode project generated after the Unreal build. Since Xcode settings may be reset with every build, we recommend automation via IPP or Build.cs post-processing. Items to process:
Info.plist—StoveEnvironment/LSApplicationQueriesSchemes=[mstove]/ URL Schemes / Permission messages (refer to the iOS section below for specific values)- iOS frameworks are linked by the
Build.csof each STOVE plugin asPublicAdditionalFrameworks. There is nothing separate to specify in the game project. - Minimum iOS version — Set Edit → Project Settings → iOS → Minimum iOS Version to
iOS 15. This is required when building with Xcode 27.1 or higher. InConfig/DefaultEngine.ini, it is the value below.
[/Script/IOSRuntimeSettings.IOSRuntimeSettings]
MinimumiOSVersion=IOS_15
5) Unreal Plugin Configuration (3.0.0 or higher)
Plugins were integrated in 3.0.0. They cannot be used with 2.9.x plugins, so please replace them all. The plugin configuration is the same in 4.0.0, and since 4.0.0 plugins cannot be mixed with 3.x plugins, please replace all plugins with 4.0.0 together.
| 3.0.0 or higher | 2.9.x | iOS Framework |
|---|---|---|
Stove | SGS_Base SGS_Log SGS_Auth SGS_AuthUI SGS_View | Stove |
StoveProviders | SGS_Auth_Google SGS_Auth_Facebook SGS_Auth_UApple SGS_Auth_Naver SGS_Auth_Line SGS_Auth_Steam SGS_Auth_GooglePlayGames | StoveProviders + Third-party (GoogleSignIn · FBSDK · LineSDK · NidThirdPartyLogin, etc.) |
StoveIAP | SGS_IAP SGS_IAP_StoreKit2 SGS_IAP_Google | StoveIAP2 (StoreKit 2) |
StovePush | SGS_Push SGS_Push_Firebase | StovePush |
StoveGameLog (New) | (Included in SGS_Log) | StoveGameLog |
| Removed (No replacement plugin) | SGS_GamingServices | — |
6) iOS — In-App Purchase (StoreKit 2)
The StoveIAP plugin of 3.0.0 or higher links the StoreKit 2-based StoveIAP2 framework on iOS. Unlike 2.9.x, there is no need to replace it with the SGS_IAP_StoreKit2 plugin separately. prepareTransactionListener calling and other internal processing are included in the plugin, so no additional work is required in the game.
7) iOS — Capabilities Settings (Custom engine build required)
The default Unreal 5.4.4 engine only supports Push Notifications / Sign in with Apple / In-App Purchase as Capabilities. The Keychain Sharing / App GroupTo add , you need a custom engine built from the Unreal Engine full source on GitHub.
Only applicable in a custom engine build environment
ㆍ Link your Epic Games account with your GitHub account to Unreal Engine GitHubreceive the full source from
ㆍ Refer to Unreal Engine GitHub 다운로드 안내 for the build procedure
Add the STOVE keychain settings to the Engine/Source/Programs/UnrealBuildTool/Platform/IOS/IOSExports.cs of the custom engine's WriteEntitlements() function.
// IOSExports.cs > WriteEntitlements() 함수 내에 추가
Text.AppendLine("\t<key>keychain-access-groups</key>");
Text.AppendLine("\t<array><string>$(AppIdentifierPrefix)com.stove.globaldata</string></array>");
Games that do not require keychain/app groups can use the default engine
For simple integration cases that do not use token persistence or NSE (Notification Service Extension), you can build with the default engine. Please check with your publishing technical representative to see if this is applicable.
8) iOS — Using LSSupportsOpeningDocumentsInPlace (STOVE SDK 2.8.0 ~ 2.9.x, custom engine build required)
Only apply this for STOVE SDK versions below 3.0.0
ㆍ STOVE SDK 3.0.0 and higher uses Unreal Engine's default FIOSCoreDelegates::OnOpenURL to receive URL callbacks, so this patch is not needed.
ㆍ If this patch remains, OnOpenURL will not be called, so the login will not complete even after returning to the game from an external login. Please note that the build will still succeed.
ㆍ If upgrading from 2.9.x to 3.0.0, 마이그레이션 가이드(Unreal) please remove this patch according to Step 5 of .
Adding Naver login requires engine source modification because you must handle both the deprecated OpenURL method and the new method. This task is also only possible in a custom engine build environment.
Background: The Unreal engine uses the deprecated OpenURL function on iOS, but the Naver SDK uses the new function format. To support both formats, you must add a branch for the IOSAppDelegate to the application:openURL:options: method.
Modified file:
Please add the code from add - start to add - end in the example code below
Engine/Source/Runtime/ApplicationCore/Public/IOS/IOSAppDelegate.h
DECLARE_MULTICAST_DELEGATE_FourParams(FOnOpenURL, UIApplication*, NSURL*, NSString*, id);
static FOnOpenURL OnOpenURL;
// add - start
DECLARE_MULTICAST_DELEGATE_ThreeParams(FOnOpenURLwithOptions, UIApplication*, NSURL*, NSDictionary* );
static FOnOpenURLwithOptions OnOpenURLwithOptions;
// add - end
// -------------------------------------------//
// parameters passed from openURL
@property (nonatomic, retain) NSMutableArray* savedOpenUrlParameters;
// add - start
@property (nonatomic, retain) NSMutableArray* savedOpenUrlWithOptionsParameters;
// add - end
Engine/Source/Runtime/ApplicationCore/Private/IOS/IOSAppDelegate.cpp
FIOSCoreDelegates::FOnOpenURL FIOSCoreDelegates::OnOpenURL;
// add - start
FIOSCoreDelegates::FOnOpenURLwithOptions FIOSCoreDelegates::OnOpenURLwithOptions;
// add - end
FIOSCoreDelegates::FOnWillResignActive FIOSCoreDelegates::OnWillResignActive;
FIOSCoreDelegates::FOnDidBecomeActive FIOSCoreDelegates::OnDidBecomeActive;
TArray<FIOSCoreDelegates::FFilterDelegateAndHandle> FIOSCoreDelegates::PushNotificationFilters;
// ----------------------------------------- //
@synthesize AccessibilityCacheTimer;
#endif
@synthesize savedOpenUrlParameters;
// add - start
@synthesize savedOpenUrlWithOptionsParameters;
// add - end
@synthesize BackgroundSessionEventCompleteDelegate;
// ----------------------------------------- //
GShowSplashScreen = false;
}, TStatId(), NULL, ENamedThreads::ActualRenderingThread);
}
// add - start
for (NSDictionary* openUrlParameter in self.savedOpenUrlWithOptionsParameters)
{
UIApplication* application = [openUrlParameter valueForKey : @"application"];
NSURL* url = [openUrlParameter valueForKey : @"url"];
NSDictionary<NSString*, id> * options = [openUrlParameter valueForKey : @"options"];
FIOSCoreDelegates::OnOpenURLwithOptions.Broadcast(application, url, options);
}
self.savedOpenUrlWithOptionsParameters = nil; // clear after saved openurl delegate running
// add - end
for (NSDictionary* openUrlParameter in self.savedOpenUrlParameters)
{
UIApplication* application = [openUrlParameter valueForKey : @"application"];
// ----------------------------------------- //
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
{
// save launch options
self.launchOptions = launchOptions;
#if PLATFORM_TVOS
self.bDeviceInPortraitMode = false;
#else
// use the status bar orientation to properly determine landscape vs portrait
self.bDeviceInPortraitMode = UIInterfaceOrientationIsPortrait([[UIApplication sharedApplication] statusBarOrientation]);
printf("========= This app is in %s mode\n", self.bDeviceInPortraitMode ? "PORTRAIT" : "LANDSCAPE");
#endif
// check OS version to make sure we have the API
OSVersion = [[[UIDevice currentDevice] systemVersion] floatValue];
if (!FPlatformMisc::IsDebuggerPresent() || GAlwaysReportCrash)
{
// InstallSignalHandlers();
}
self.savedOpenUrlParameters = [[NSMutableArray alloc] init];
// add - start
self.savedOpenUrlWithOptionsParameters = [[NSMutableArray alloc] init];
// add - end
self.PeakMemoryTimer = [NSTimer scheduledTimerWithTimeInterval:0.1f target:self selector:@selector(RecordPeakMemory) userInfo:nil repeats:YES];
#if !BUILD_EMBEDDED_APP
// ----------------------------------------- //
return YES;
}
// add - start
//### use option
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString*, id> *)options
{
#if !NO_LOGGING
NSLog(@"%s", "IOSAppDelegate openURL options\n");
#endif
NSString* EncdodedURLString = [url absoluteString];
NSString* URLString = [EncdodedURLString stringByRemovingPercentEncoding];
FString CommandLineParameters(URLString);
// Strip the "URL" part of the URL before treating this like args. It comes in looking like so:
// "MyGame://arg1 arg2 arg3 ..."
// So, we're going to make it look like:
// "arg1 arg2 arg3 ..."
int32 URLTerminator = CommandLineParameters.Find( TEXT("://"), ESearchCase::CaseSensitive);
if ( URLTerminator > -1 )
{
CommandLineParameters.RightChopInline(URLTerminator + 3, false);
}
FIOSCommandLineHelper::InitCommandArgs(CommandLineParameters);
self.bCommandLineReady = true;
[self.CommandLineParseTimer invalidate];
self.CommandLineParseTimer = nil;
// Save openurl infomation before engine initialize.
// When engine is done ready, running like previous. ( if OnOpenUrl is bound on game source. )
if (bEngineInit)
{
FIOSCoreDelegates::OnOpenURLwithOptions.Broadcast(app, url, options);
}
else
{
#if !NO_LOGGING
NSLog(@"%s", "Before Engine Init receive IOSAppDelegate openURL\n");
#endif
NSDictionary* openUrlParameter = [NSDictionary dictionaryWithObjectsAndKeys :
app , @"application",
url, @"url",
options, @"options",
nil];
[savedOpenUrlWithOptionsParameters addObject : openUrlParameter];
}
return YES;
}
// add - end
FCriticalSection RenderSuspend;
- (void)applicationWillResignActive:(UIApplication *)application
{
If you need specific patch code
Since the modification locations vary by engine version, please request detailed patch snippets from your STOVE publishing technical representative.
Android
Set up Gradle dependencies + AndroidManifest.xml metadata + Android 7.x support enforcement options.
1) Gradle dependencies (app/build.gradle)
Register the STOVE Maven repository and add the necessary modules as dependencies.
buildscript {
ext.kotlin_version = "1.9.25"
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.6.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-kapt'
}
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = 17
}
buildFeatures {
buildConfig = true
viewBinding true
dataBinding true
}
}
repositories {
google()
maven {
url "https://externalnexus.iam0.com/repository/mvp"
allowInsecureProtocol = true // Required for Android Gradle Plugin 7.0+
}
mavenCentral()
}
dependencies {
// Core (Authentication · Auth UI · View · Log Integration)
implementation 'com.stove:stove:4.0.0'
// Auth Provider (Google · GPG · Facebook · Naver · Line · Steam · Apple Integration)
implementation 'com.stove:stove-providers:4.0.0'
// Push
implementation 'com.stove:stove-push:4.0.0'
implementation 'com.stove:stove-push-firebase:4.0.0'
// In-App Purchase
implementation 'com.stove:stove-iap:4.0.0'
implementation 'com.stove:stove-iap-google:4.0.0'
// Game Log — Only if writing game logs
// implementation 'com.stove:stove-gamelog:4.0.0'
}
마켓 · 기능 구성에 맞게 모듈을 조정해요
ㆍ 화웨이 마켓: com.stove:stove-iap-huawei · com.stove:stove-push-huawei / 원스토어: com.stove:stove-iap-onestore
ㆍ 2.9.x 의 com.stove:gamingservices는 3.0.0 에서 제거되었어요. GPG User ID 기능은 stove-providers에 들어 있어요.
ㆍ 모든 com.stove: 모듈을 4.0.0 으로 맞춰요. 3.x 모듈과 4.0.0 모듈은 함께 쓸 수 없어요.
ㆍ 2.9.x 모듈(com.stove:base 등)과 3.0.0 이상 모듈은 함께 쓸 수 없어요. 전체 매핑은 3.0.0 업그레이드 안내를 참고해 주세요.
2) AndroidManifest.xml — 스토브 환경 설정 (필수)
com.stove.environment 메타데이터가 없으면 SDK 초기화 시 AuthConfigurationError(30001)가 발생해요.
<application>
<!-- 환경: live(라이브) / sandbox(테스트) -->
<meta-data
android:name="com.stove.environment"
android:value="live" />
</application>
For MemberNo games, you must set com.stove.config.enable_guid to false. You do not need to set this for GUID games.
<application>
<!-- MemberNo 게임만 -->
<meta-data
android:name="com.stove.config.enable_guid"
android:value="false" />
</application>
3) (Optional) AuthUI Options
Add the following metadata if necessary. If not set, the default values in parentheses will be used.
<application>
<!-- 약관 화면 색상 테마: orange(default) / black / LostarkM -->
<meta-data android:name="com.stove.auth.ui.theme" android:value="orange" />
<!-- 라이트/다크 모드: 0=시스템(default) / 1=light / 2=dark -->
<meta-data android:name="com.stove.auth.ui.appearance_mode" android:value="1" />
<!-- 약관 화면 크기: full(default) / small -->
<meta-data android:name="com.stove.auth.ui.display_size" android:value="small" />
<!-- 푸시 헤드업 알림: false(default) / true -->
<meta-data android:name="com.stove.push.heads_up_notification_enable" android:value="true" />
</application>
com.stove.auth.ui.sanction_type is no longer used since 3.0.0
3.0.0 always delivers results via callback without terminating the app when closing screens for sanctions, maintenance, or forced updates. It has no effect on operations even if it remains. Please refer to "App Termination Handling (3.0.0 or higher)" in 점검/업데이트 가이드 for app termination handling.
4) Android 7.x Support (Required)
play-services-ads-identifier must be fixed to 18.0.1 to prevent runtime crashes on Android 7.x devices.
configurations.all {
resolutionStrategy {
force 'com.google.android.gms:play-services-ads-identifier:18.0.1'
}
}
5) Checking Debug Logs
During game development and debugging, you can view SDK operation logs in logcat using the stove-sdk tag.
adb shell setprop log.tag.stove-sdk VERBOSE
iOS
You must add the STOVE SDK via CocoaPods and configure Info.plist / entitlements / Xcode Build Settings / AppDelegate for it to function properly.
Please build for iOS using Xcode 27.1 or higher
ㆍ STOVE SDK 4.0.0 requires building with Xcode 27.1 or higher. Podfile of post_install block and setting the Deployment Target to 15.0 for all targets are required. Please check iOS — Xcode 27.1 이상 빌드 환경 for more details.
ㆍ Please apply SceneDelegate according to iOS Native UISceneDelegate 대응 업데이트.
1) Prerequisites — Register Specs Repository (One-time)
STOVE SDK Pods are hosted in an internal repo. After signing up for GitLab, add the repository to your local CocoaPods.
# 1) http://stove-developers-gitlab.sginfra.net 에 웹 회원가입 (별도 승인 절차 없음)
# 2) 터미널에서 repo 추가 (최초 1회 username/password 입력)
pod repo add Specs https://stove-developers-gitlab.sginfra.net/stove-sdk/Specs.git
Cannot access GitLab?
Please contact the technical publishing representative.
2) Podfile
Replace {ProjectTargetName} in the example below with the name of your Xcode project's main target.
source 'http://stove-developers-gitlab.sginfra.net/stove-sdk/Specs.git'
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '15.0'
target '{ProjectTargetName}' do
# 핵심 (인증 · 인증 UI · 뷰 · 로그 통합)
pod 'Stove', '4.0.0'
# 인증 Provider (Apple · Facebook · Google · Naver · Line · Steam 통합)
pod 'StoveProviders', '4.0.0'
# 인앱결제 (StoreKit 2)
pod 'StoveIAP2', '4.0.0'
# 푸시
pod 'StovePush', '4.0.0'
# 게임 로그 — 게임 로그를 쓰는 경우만
# pod 'StoveGameLog', '4.0.0'
end
# 푸시 확장 (Notification Service Extension) — 별도 target
target 'NotificationServiceExtension' do
pod 'StovePushExtension', '4.0.0'
end
# Xcode 27+ requires IPHONEOS_DEPLOYMENT_TARGET >= 15.0.
# Third-party dependency pods (Facebook, Google, Naver, etc.) still declare lower targets in their podspecs.
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f < 15.0
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.0'
end
end
end
end
All STOVE pods must be set to 4.0.0
ㆍ 4.0.0 pods and 3.x pods cannot be used together. Do not update only some pods to 4.0.0.
ㆍ There should be no 2.9.x pods starting with Podfile in SGS.
ㆍ SGSGamingServices was removed in 3.0.0. You just need to remove it from your dependencies. The GPG User ID feature is included in StoveProviders.
ㆍ Please refer to 3.0.0 업그레이드 안내 for the full mapping.
Build using the .xcworkspace generated after installation/update.
pod install
# 또는
pod update
iOS — Xcode 27.1+ Build Environment
Please build STOVE SDK 4.0.0 with Xcode 27.1 or higher
ㆍ 4.0.0 is provided based on the Xcode 27.1 · iOS 27.1 SDK build environment.
ㆍ In Xcode 27.1 or higher, applying SceneDelegate and setting the Deployment Target to 15.0 or higher is mandatory. For SceneDelegate, please check the updates for iOS Native · Unity · Unreal UISceneDelegate support.
Xcode 27.1 or higher treats targets with an iOS Deployment Target lower than 15.0 as build errors. Set all targets included in the project, not just the app target, such as NotificationServiceExtension, to [Target] → [Build Settings] → [iOS Deployment Target] to 15.0 or higher.
Even if all project targets are set to 15.0, build errors like the following may occur. This is because third-party pods installed with StoveProviders (e.g., Google · Facebook · Naver login libraries) declare a minimum iOS version lower than 15.0 in their podspec, and CocoaPods uses this value to create Pods targets.
The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 12.0, but the range of supported deployment target versions is 15.0 to 27.1.x.
The Podfile at the end of the example above, the post_install block raises the iOS Deployment Target of Pods created with a version lower than 15.0 to 15.0. Podfile after adding the block, please reinstall the pods using the procedure below.
If you are already using post_install
ㆍ Do not add a new block, but merge the loop above into the existing post_install block. post_install can only be declared once in a Podfile.
Reinstalling pods
If you are upgrading from 3.x to 4.0.0 or have added a post_install block, reinstall the pods. If you do not update the local Specs repository, you may not be able to find the 4.0.0 pod.
pod deintegrate
pod cache clean --all
pod repo update
# 명령어 실행 후 Podfile 이 있는 폴더(Unity 는 Xcode 빌드 폴더)의 Podfile.lock 파일을 제거해 주세요.
# 그 후에 pod install 명령어로 SDK 모듈을 다시 설치해 주세요.
pod install
Checking Build Environment
Please check all of the following items. For the application results of SceneDelegate, please also check the results of the platform-specific UISceneDelegate response update.
- Builds without errors in Xcode 27.1 or later.
- The iOS Deployment Target for all Targets is 15.0 or higher. (Unity:
Unity-iPhone·UnityFramework·NotificationServiceExtension) - In
Podfile.lock, all STOVE SDK pod versions are4.0.0. - The iOS Deployment Target for third-party pod Targets is 15.0 or higher.
3) (Optional) Manual Framework Download
In environments where CocoaPods cannot be used, select the item by tag name on the SDK Download and Installation page to download it directly, then add it to your Xcode project.
4) In-App Purchase (StoveIAP2)
The iOS payment module 3.0.0 or higher is a StoreKit 2-based StoveIAP2. You must call prepareTransactionListener immediately after registering the payment notification observer.
#import <StoveIAP2/StoveIAP2.h>
[[NSNotificationCenter defaultCenter] removeObserver:self
name:NSNotification.SGSPurchasesUpdatedNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(updatedPurchasesNotification:)
name:NSNotification.SGSPurchasesUpdatedNotification object:nil];
[SGSIAP prepareTransactionListener]; // ⚠️ 누락 시 결제 시도 즉시 errorListener 실패
Timing and Firebase Analytics
ㆍ Call it immediately after registering the payment notification observer. If not called, payment attempts will fail silently.
ㆍ In a StoreKit 2 environment, Firebase Analytics' automatic payment collection does not work. Please refer to iOS Firebase Analytics 결제 이벤트 연동 and send it directly from the listener.
5) Info.plist
<key>StoveEnvironment</key>
<string>live</string> <!-- live / sandbox -->
<!-- 필수 -->
<key>NSUserTrackingUsageDescription</key>
<string>로그 수집을 위해 필요합니다</string>
<!-- MemberNo 게임만: GUID 사용 안 함 -->
<key>StoveEnableGUID</key>
<false/>
<!-- 커뮤니티/고객센터 사용 시 권한 메시지 (문구는 게임에 맞게 조정) -->
<key>NSCameraUsageDescription</key>
<string>커뮤니티 게시글/문의 시 사진·동영상 촬영에 사용됩니다</string>
<key>NSMicrophoneUsageDescription</key>
<string>음성이 포함된 동영상 촬영에 사용됩니다</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>기존 사진·동영상 첨부에 사용됩니다</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>사진·동영상을 디바이스에 저장하기 위해 사용됩니다</string>
<!-- 스토브 앱간 인증 — 미설정 시 인증 실패 -->
<key>LSApplicationQueriesSchemes</key>
<array>
<string>mstove</string>
</array>
<!-- URL Schemes — 외부 앱(Google/Apple/Naver/Line 등) 복귀에 사용 -->
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
</array>
</dict>
</array>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
6) Xcode Capabilities (.entitlements)
.entitlements Editing the file directly or toggling it in the UI via Xcode → Signing & Capabilities → + Capability yields the same result.
<!-- APNS 푸시 사용 시 -->
<key>aps-environment</key>
<string>production</string>
<!-- StoveSDK 필수 — 미설정 시 토큰 저장 실패 -->
<key>keychain-access-groups</key>
<array>
<string>$(AppIdentifierPrefix)com.stove.globaldata</string>
</array>
<!-- 애플 로그인 사용 시 -->
<key>com.apple.developer.applesignin</key>
<array>
<string>Default</string>
</array>
<!-- 푸시 확장(Notification Service Extension) 사용 시 -->
<key>com.apple.security.application-groups</key>
<array>
<string>group.com.stove.sdk</string>
</array>
7) Build Settings — Search Paths
Configure by branching according to the Xcode version. If not set, a Swift runtime link or dylib not found error will occur.
Library Search Paths — Xcode → Build Settings → Search Paths
$(SDKROOT)/usr/lib/swift
$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)
$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)
Additional path when using Xcode 26.0.x$(TOOLCHAIN_DIR) There is a bug where it is incorrectly resolved to the Metal cryptex path (fixed in 26.2). In a 26.0.x environment, add the path below.$(DEVELOPER_DIR)/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/$(PLATFORM_NAME)
Runpath Search Paths — Xcode → Build Settings → Linking (Common to Xcode 16/26, be sure to follow the order below to add)
/usr/lib/swift
$(inherited)
@executable_path/Frameworks
@loader_path/Frameworks
8) AppDelegate — Delegate Provider Login (Required)
You must delegate openURL for Google/Apple/Facebook/Naver/Line OAuth callbacks to reach the SDK. If not configured, external login will fail entirely.
#import <Stove/Stove.h> // Swift: import Stove
- (BOOL)application:(UIApplication *)app
openURL:(NSURL *)url
options:(NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options
{
return [SGSApplicationDelegate application:app openURL:url options:options];
}
PC SDK
PC builds use a separate package from the Mobile SDK. Please follow the procedure that matches the engine used in your game among the three environments below.
PCSDK3 officially supports the Windows 64bit environment.
ㆍ If 32bit or Mono(Unity) support is required, please contact Stove technical support.
ㆍ Module dependency: All modules must have BaseSDK as a prerequisite. IAPSDK / ViewSDK when using , WebView2Loader.dll must be included together.
- Native C/C++ Build Settings (Visual Studio)
- Create a
StovePCSDK3directory in the solution directory and copy theInclude/Lib/Dllfolders from the downloaded package. - Specify the paths in the project properties as follows:
- Configuration Properties > C/C++ > General > Additional Include Directories:
$(SolutionDir)StovePCSDK3\Include - Configuration Properties > Linker > General > Additional Library Directories:
$(SolutionDir)StovePCSDK3\Lib - Configuration Properties > Linker > Input > Additional Dependencies:
*.libfor each module to be used (e.g.,BaseSDK.lib)
- Configuration Properties > C/C++ > General > Additional Include Directories:
- Copy the
*.dllof the modules to be used to the game build output folder. - Include the header in the source code with
#include "BaseSDK.h".
- Create a
- Unity Build Settings
- Create
Assets/Plugins/STOVEPCSDK3andManageddirectories underNative. - Copy the Managed plugins (
x86_64) and Native plugins (*_NET.dll) from the*.dllfolder of the downloaded package to the directories above, respectively.- Native and Managed plugins must be included together as a pair. (e.g., Use Base only →
BaseSDK.dll+BaseSDK_NET.dll) - When using IAP/View, also copy
WebView2Loader.dll.
- Native and Managed plugins must be included together as a pair. (e.g., Use Base only →
- Select
x86_64(orx64) in each dll Inspector → Platform settings and click Apply. - Player Settings → Configuration → Api Compatibility Level: .NET 4.x
- Set the Architecture to
x86_64according to the system during build. (Unity Editor only supports x64) - Add the namespace for each module in the code, such as
using static Stove.PCSDK.Base;.
!info
It will be provided in unitypackage format in the future.
ㆍ Currently, only the manual method of placing dlls is supported, but it will be provided easily via.unitypackageimport from the next version.
ㆍ We will inform you of the application timing in the SDK release notes. - Create
- Unreal Build Settings
- In the project root,
ThirdParty/StovePCSDKdirectory, place theInclude/Lib/Dllfolders from the downloaded package. - Also copy the module dll to
Binaries/Win64. (IncludeWebView2Loader.dllwhen using IAP/View) - Add PublicIncludePaths / PublicAdditionalLibraries / RuntimeDependencies to the module's
*.Build.csfile in the following format.
csstring ThirdPartyPath = Path.GetFullPath(Path.Combine(ModuleDirectory, "../../ThirdParty")); string StovePCSDKPath = Path.Combine(ThirdPartyPath, "StovePCSDK"); PublicIncludePaths.Add(Path.Combine(StovePCSDKPath, "Include")); string[] SDKNameList = { "BaseSDK", "IAPSDK", "ViewSDK" }; foreach(string SDKName in SDKNameList) { PublicAdditionalLibraries.Add(Path.Combine(StovePCSDKPath, "Lib", "x64", SDKName + ".lib")); RuntimeDependencies.Add( Path.Combine("$(BinaryOutputDir)", SDKName + ".dll"), Path.Combine(StovePCSDKPath, "Dll", "x64", SDKName + ".dll")); }- Include the header in the source code using
#include "BaseSDK.h".
- In the project root,
Please follow the SDK 기본 연동 guide for the PCSDK3 module initialization and cleanup flow.
ㆍ Initialize the Base SDK first, then initialize other modules. Perform cleanup in the reverse order.
ㆍ Logs are stored by module in the C:\Users\{유저명}\AppData\Local\STOVEPCSDK3{Env}\logs\{GameID} path.
SDK Config Settings
SDK Config is a system for registering and managing configuration values required for SDK operation. It is provided in SDK v2.x and managed through Partners.
SDK Config Features
- Manages SDK default settings, UI exposure options, and platform URL settings.
- Allows changing service configuration values without modifying the client or server.
- Supports settings by country and market (based on package name), allowing for flexible regional operations.
SDK init fails if SDK Config is not registered
ㆍ SDK Config must be registered for each package / client version. If not registered, SDK init will fail, making it impossible to connect to the game.
ㆍ Please also perform Config settings when updating versions.
Registration Location
Register and manage at [Partners > GM > SDK Config Settings]. Separate registration is required for each environment.
| Environment | Access Path |
|---|---|
| Sandbox | partners.gate8.com > GM > SDK Config Settings |
| Live | partners.onstove.com > GM > SDK Config Settings |
Key Registration Items
| Item | Required | Description |
|---|---|---|
| Package / Client Version | Required | Register Config by package name + client version |
| App ID / Client ID | Required | Key value used by the Stove platform to identify the game |
| Basic Policy Settings | Required | Access country GDS settings, terms of service policy, identity verification policy, etc. |
| Module Settings by Function | Optional | Options for each feature used, such as pop-ups, push, in-app purchases, characters, device registration, etc. |
| UI / Exposure Options | Optional | Login UI Provider exposure order, terms of service agreement UI options, etc. |
iOS Native UISceneDelegate Support Update
Native iOS SceneDelegate Integration
Please complete the SceneDelegate implementation before April 2027
ㆍ Apps submitted to the App Store starting April 2027 must be built with Xcode 27 and the iOS 27 SDK, which requires the implementation of the UIScene-based lifecycle (SceneDelegate).
ㆍ SDK 3.0.0 can be used immediately without implementing SceneDelegate. However, you must implement SceneDelegate according to the guide below before April 2027.
ㆍ If it is difficult to implement SceneDelegate immediately due to project structure or schedule, please contact the development team. We will assist you with a customized guide tailored to your project's situation.
Apps built with the iOS 27 SDK in Xcode 27 must implement the UIScene-based lifecycle. SceneDelegate integration is also required to handle the URL callback that returns to the game after cross-app authentication in the STOVE app.
STOVE SDK Version
ㆍ This guide is independent of the STOVE SDK version.
Issue Description
According to Apple's platform policy, support for SceneDelegate (UIScene lifecycle) is optional until iOS 26, but it will become mandatory starting from iOS 27.
Apps built with the iOS 27 SDK in Xcode 27 will not be able to run if they do not implement the UIScene-based lifecycle. For more details, please refer to Apple Market Policy.
Even if you have implemented UIScene according to the existing guide, the authentication callback may not work if you do not pass the cross-app authentication response to SceneDelegate.
Implementation Method
Pass the URL callback received in SceneDelegate to the existing URL processing path in AppDelegate.
SceneDelegate
→ AppDelegate
→ SGSApplicationDelegate.application:openURL:options:
SceneDelegate maintains the existing AppDelegate event processing path. This allows you to keep the following items together:
- Existing STOVE SDK integration code for the game
- Game engine lifecycle processing
- Processing for other SDKs besides STOVE
Do not call SGSApplicationDelegate directly from SceneDelegate. In this guide, all SDK versions pass the authentication callback through AppDelegate.
Common Implementation Requirements
1. Add SceneDelegate
Add a SceneDelegate that implements UIWindowSceneDelegate to your project.
If you already have an existing SceneDelegate, do not add a new class; instead, merge the necessary code into your existing implementation.
// SceneDelegate.h
#import <UIKit/UIKit.h>
@interface SceneDelegate : UIResponder <UIWindowSceneDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
2. Info.plist Settings
Info.plistAdd Scene Manifest to
<!-- Info.plist -->
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneConfigurationName</key>
<string>Default Configuration</string>
<key>UISceneDelegateClassName</key>
<string>SceneDelegate</string>
</dict>
</array>
</dict>
</dict>
.
SceneDelegate Modifications
In the Scene-based lifecycle, window connection and URL callback reception are handled in SceneDelegate. Please connect your existing AppDelegate implementation to SceneDelegate according to your project structure.
1. Scene Connection and Window Management
scene:willConnectToSession:options:is called when a Scene connects to the app. When applying SceneDelegate, handle window management—previously handled by AppDelegate—based on this method.- Depending on your engine environment, move or call your existing implementation so that the existing window, root view controller, and game engine initialization are executed in this method, and connect the window to the passed
UIWindowScene. - If the app is launched via a Custom URL Scheme while closed, the URL callback is delivered to
connectionOptions.URLContexts. After the window, game engine, and SDK initialization are complete, pass it to the existing AppDelegate URL processing path.
// SceneDelegate.m
- (void)scene:(UIScene *)scene
willConnectToSession:(UISceneSession *)session
options:(UISceneConnectionOptions *)connectionOptions
API_AVAILABLE(ios(13.0))
{
if (![scene isKindOfClass:UIWindowScene.class]) {
return;
}
UIWindowScene *windowScene = (UIWindowScene *)scene;
// 프로젝트별 구현
// 1. 기존 window를 windowScene에 연결해요.
// 2. 기존 root view controller와 게임 엔진을 초기화해요.
// 3. 실제 사용하는 window를 self.window에도 연결해요.
// window와 SDK 초기화가 완료된 후 URL callback을 전달해요.
[self scene:scene
openURLContexts:connectionOptions.URLContexts];
}
If you pass the URL before the game engine or STOVE SDK is initialized, the object required to process the authentication request may not be ready.
2. URL callback delivered while running
// SceneDelegate.m
- (void)scene:(UIScene *)scene
openURLContexts:(NSSet<UIOpenURLContext *> *)URLContexts
API_AVAILABLE(ios(13.0))
{
id<UIApplicationDelegate> appDelegate =
UIApplication.sharedApplication.delegate;
for (UIOpenURLContext *context in URLContexts) {
NSMutableDictionary<UIApplicationOpenURLOptionsKey, id> *options =
[NSMutableDictionary dictionary];
if (context.options.sourceApplication != nil) {
options[UIApplicationOpenURLOptionsSourceApplicationKey] =
context.options.sourceApplication;
}
if (context.options.annotation != nil) {
options[UIApplicationOpenURLOptionsAnnotationKey] =
context.options.annotation;
}
options[UIApplicationOpenURLOptionsOpenInPlaceKey] =
@(context.options.openInPlace);
if ([appDelegate respondsToSelector:
@selector(application:openURL:options:)]) {
[appDelegate application:UIApplication.sharedApplication
openURL:context.URL
options:options];
}
}
}
Maintain the STOVE integration currently in use in your existing AppDelegate.
// AppDelegate.m
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
options:(NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options
{
return [SGSApplicationDelegate application:application
openURL:url
options:options];
}
3. App lifecycle delivery
If your game engine uses existing AppDelegate lifecycle processing, pass the SceneDelegate lifecycle events to AppDelegate.
// SceneDelegate.m
@interface SceneDelegate ()
@property (nonatomic, assign) BOOL sceneHasEnteredBackground;
@end
@implementation SceneDelegate
- (void)sceneDidBecomeActive:(UIScene *)scene
{
id<UIApplicationDelegate> appDelegate =
UIApplication.sharedApplication.delegate;
if ([appDelegate respondsToSelector:
@selector(applicationDidBecomeActive:)]) {
[appDelegate applicationDidBecomeActive:
UIApplication.sharedApplication];
}
}
- (void)sceneWillResignActive:(UIScene *)scene
{
id<UIApplicationDelegate> appDelegate =
UIApplication.sharedApplication.delegate;
if ([appDelegate respondsToSelector:
@selector(applicationWillResignActive:)]) {
[appDelegate applicationWillResignActive:
UIApplication.sharedApplication];
}
}
- (void)sceneDidEnterBackground:(UIScene *)scene
{
self.sceneHasEnteredBackground = YES;
id<UIApplicationDelegate> appDelegate =
UIApplication.sharedApplication.delegate;
if ([appDelegate respondsToSelector:
@selector(applicationDidEnterBackground:)]) {
[appDelegate applicationDidEnterBackground:
UIApplication.sharedApplication];
}
}
- (void)sceneWillEnterForeground:(UIScene *)scene
{
// We do not redundantly deliver foreground returns that were not in the existing app lifecycle for the initial Scene connection.
if (!self.sceneHasEnteredBackground) {
return;
}
self.sceneHasEnteredBackground = NO;
id<UIApplicationDelegate> appDelegate =
UIApplication.sharedApplication.delegate;
if ([appDelegate respondsToSelector:
@selector(applicationWillEnterForeground:)]) {
[appDelegate applicationWillEnterForeground:
UIApplication.sharedApplication];
}
}
@end
적용 결과 확인
다음 항목을 모두 확인해 주세요.
- 최종 앱의 바이너리 내부
Info.plist에UIApplicationSceneManifest가 있어요.UISceneDelegateClassName에 실제 SceneDelegate 클래스가 설정되어 있어요.
- SceneDelegate 구현 파일이 앱 Target의 Compile Sources에 포함되어 있어요.
- 앱을 백그라운드로 전환한 후 다시 돌아왔을 때 게임이 정상 동작해요.
- 서드파티 앱 간 인증 후 게임으로 돌아오면 인증이 완료돼요.
- 앱 실행 중에 받은 URL callback이 정상 처리돼요.
- 앱 종료 상태의 URL callback을 지원하는 경우 기존 URL 처리 경로로 정상 전달돼요.
- STOVE 앱 간 인증 URL callback이 정상 처리돼요.
iOS Unity UISceneDelegate 대응 업데이트
2027년 4월 이전까지 SceneDelegate 적용을 완료해 주세요
ㆍ 2027년 4월부터 App Store에 제출하는 앱은 Xcode 27 · iOS 27 SDK로 빌드해야 하고, 이 환경에서는 UIScene 기반 라이프사이클(SceneDelegate) 적용이 필수예요.
ㆍ SDK 3.0.0은 SceneDelegate를 적용하지 않아도 지금 바로 사용할 수 있어요. 다만 2027년 4월 이전까지는 아래 가이드에 따라 SceneDelegate를 적용해야 해요.
ㆍ 프로젝트 구조나 일정으로 인해 당장 SceneDelegate를 적용하기 어렵다면 개발팀에 문의해 주세요. 프로젝트 상황에 맞는 개별 가이드로 도와드릴게요.
Xcode 27에서 iOS 27 SDK를 사용해 빌드한 앱은 UIScene 기반 라이프사이클을 적용해야 해요. STOVE 앱 간 인증 후 게임으로 돌아오는 URL callback을 처리하려면 Unity 버전과 STOVE SDK 버전에 맞는 SceneDelegate 연동도 필요해요.
STOVE SDK 버전
ㆍ STOVE SDK 3.0.0 이상은 SceneDelegate에서 전달된 Unity URL 이벤트를 자동으로 처리해요.
ㆍ STOVE SDK 3.0.0 미만을 유지해야 한다면 이 가이드의 SDK 버전별 추가 적용에서 AppController 연동 코드를 추가해 주세요.
ㆍ 가능하면 SceneDelegate 연동이 포함된 STOVE SDK 3.0.0 이상으로 업데이트하는 것을 권장해요.
문제 현상
Apple 플랫폼 정책상 SceneDelegate(UIScene 라이프사이클) 지원은 iOS 26까지는 선택 사항이지만, iOS 27부터는 필수로 전환될 예정이에요.
Xcode 27에서 iOS 27 SDK를 사용해 빌드한 앱이 UIScene 기반 라이프사이클을 적용하지 않으면 앱을 실행할 수 없어요. 자세한 내용은 Apple 마켓 정책을 참고해 주세요.
기존 가이드에 따라 UIScene을 적용했더라도 앱 간 인증 응답값을 SceneDelegate에서 STOVE SDK의 기존 URL 처리 경로로 전달하지 않으면 인증 callback이 동작하지 않을 수 있어요.
참고
- Unity Discussions — Apple: Update your Editor to receive UIScene lifecycle support
- Apple Developer — TN3187: Migrating to the UIKit scene-based life cycle
영향 범위
| 영역 | 관련 AppDelegate 콜백 | 증상 |
|---|---|---|
| 소셜 로그인(Auth) | application(_:open:options:) | Google · Facebook · Naver · LINE 등 3rd party 로그인 후 앱으로 돌아오는 리다이렉트 URL을 SDK가 수신하지 못해 로그인이 완료되지 않아요. |
Unity 엔진 버전별 적용 방법
| Unity 버전 | 적용 방법 |
|---|---|
| Unity 2022.3.72f1 이상 | Unity가 생성한 UnityScene과 Scene Manifest를 사용해요. |
| Unity 2022.3.72f1 미만 | StoveUnitySceneDelegate 파일과 Scene Manifest를 추가해요. |
Unity 2022.3.72f1 이상
권장 Unity 버전
ㆍ Unity 2022.3.76f1 이상 사용을 권장해요.
ㆍ Unity 2022.3.72f1부터 SceneDelegate를 지원하지만, 2022.3.76f1 미만 버전에는 URL 처리(딥링크)와 관련된 Unity 이슈가 있어요.
Unity가 생성한 UnityScene과 Scene Manifest를 그대로 사용해요. SceneDelegate 구성을 완료한 후 아래의 STOVE SDK 버전별 추가 적용을 확인해 주세요.
Unity가 생성한 설정을 수정하지 마세요
ㆍ 게임에서 별도의 SceneDelegate를 추가하지 마세요.
ㆍ 빌드 후 생성된 UnityScene.mm 또는 Info.plist를 수정하지 마세요.
ㆍ 이전에 **iOS Unity UISceneDelegate 임시 조치**를 적용한 적이 있다면 적용을 되돌려야 해요.
Unity 2022.3.72f1 미만
Unity 공식 UIScene 지원 대상이 아니에요
ㆍ STOVE는 Unity가 생성한 기존 window를 UIWindowScene에 연결하고 UIScene 기반 라이프사이클을 UnityAppController로 전달하는 호환 구현을 제공해요.
ㆍ 이 구현은 Unity 공식 가이드가 아니라 STOVE 검증을 기반으로 작성된 가이드예요.
Unity가 SceneDelegate를 생성하지 않으므로 Xcode 프로젝트를 생성한 후 아래 항목을 적용해 주세요.
1. SceneDelegate 파일 추가
StoveUnitySceneDelegate.h와 StoveUnitySceneDelegate.mm 파일을 Unity 프로젝트에 추가해요.
StoveUnitySceneDelegate.h
#import <UIKit/UIKit.h>
@interface StoveUnitySceneDelegate
: UIResponder <UIWindowSceneDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
StoveUnitySceneDelegate.mm
#import "StoveUnitySceneDelegate.h"
#import "UnityAppController.h"
#import "AppDelegateListener.h"
#include "Unity/UnityInterface.h"
@implementation StoveUnitySceneDelegate
{
UIOpenURLContext *_pendingURLContext;
}
- (void)scene:(UIScene *)scene
willConnectToSession:(UISceneSession *)session
options:(UISceneConnectionOptions *)connectionOptions
{
if ([scene isKindOfClass:UIWindowScene.class])
{
self.window = GetAppController().window;
if (self.window != nil)
{
self.window.windowScene = (UIWindowScene *)scene;
[self.window makeKeyAndVisible];
}
}
_pendingURLContext =
[self firstValidContextFromContexts:connectionOptions.URLContexts];
if (_pendingURLContext != nil)
{
UnitySetAbsoluteURL(
_pendingURLContext.URL.absoluteString.UTF8String);
}
}
- (void)sceneWillEnterForeground:(UIScene *)scene
{
if (_pendingURLContext != nil)
{
[self
applyURL:_pendingURLContext.URL
sourceApplication:
_pendingURLContext.options.sourceApplication
annotation:_pendingURLContext.options.annotation];
_pendingURLContext = nil;
}
[GetAppController()
applicationWillEnterForeground:
UIApplication.sharedApplication];
}
- (void)sceneDidBecomeActive:(UIScene *)scene
{
[GetAppController()
applicationDidBecomeActive:
UIApplication.sharedApplication];
}
- (void)sceneWillResignActive:(UIScene *)scene
{
[GetAppController()
applicationWillResignActive:
UIApplication.sharedApplication];
}
- (void)sceneDidEnterBackground:(UIScene *)scene
{
[GetAppController()
applicationDidEnterBackground:
UIApplication.sharedApplication];
}
- (void)scene:(UIScene *)scene
openURLContexts:(NSSet<UIOpenURLContext *> *)URLContexts
{
UIOpenURLContext *context =
[self firstValidContextFromContexts:URLContexts];
if (context != nil)
{
[self
applyURL:context.URL
sourceApplication:context.options.sourceApplication
annotation:context.options.annotation];
}
}
- (void)scene:(UIScene *)scene
continueUserActivity:(NSUserActivity *)userActivity
{
// Add logic according to project policy if Universal Link handling is required.
}
- (UIOpenURLContext *)firstValidContextFromContexts:
(NSSet<UIOpenURLContext *> *)contexts
{
for (UIOpenURLContext *context in contexts)
{
if (context.URL != nil &&
context.URL.absoluteString != nil)
{
return context;
}
}
return nil;
}
- (void)applyURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation
{
if (url == nil || url.absoluteString == nil)
{
return;
}
UnitySetAbsoluteURL(url.absoluteString.UTF8String);
NSMutableDictionary<NSString *, id> *notificationData =
[NSMutableDictionary dictionaryWithCapacity:3];
notificationData[@"url"] = url;
if (sourceApplication != nil)
{
notificationData[@"sourceApplication"] = sourceApplication;
}
if (annotation != nil)
{
notificationData[@"annotation"] = annotation;
}
AppController_SendNotificationWithArg(
kUnityOnOpenURL,
notificationData);
}
@end
SceneDelegate 구현 시 주의 사항
ㆍ SceneDelegate에서 SGSApplicationDelegate를 직접 호출하거나 별도의 StoveUnityAppDelegateListener를 추가하지 마세요. 동일한 URL이 중복 처리될 수 있어요.
ㆍ SceneDelegate에서 Unity를 다시 초기화하거나 새로운 UIWindow를 생성하지 마세요.
ㆍ Scene configuration 선택은 아래의 STOVE SDK 버전별 추가 적용에 따라 AppController에서 처리해요.
2. Info.plist 설정
Info.plist에 아래 Scene Manifest를 추가해요.
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneConfigurationName</key>
<string>Default Configuration</string>
<key>UISceneDelegateClassName</key>
<string>StoveUnitySceneDelegate</string>
</dict>
</array>
</dict>
</dict>
Please merge with existing settings
ㆍ UISceneConfigurationName 's Default Configuration must match the configuration name selected by the AppController.
ㆍ If an existing SceneDelegate or UIApplicationSceneManifest exists, please merge the content above into your existing implementation instead of adding new ones or replacing the entire value.
Additional Application by STOVE SDK Version
After completing the SceneDelegate configuration suitable for your Unity version, apply the content corresponding to the STOVE SDK version you are using.
No additional work is required. The URL callback passed by Unity is automatically handled by the STOVE SDK's StoveSDKAppController.
Verifying the Application Results
Check the following items in the generated Xcode project and on an actual device.
- Inside the final app binary,
Info.plistcontainsUIApplicationSceneManifest.UISceneDelegateClassNamehas the actual SceneDelegate class set.
- In Unity 2022.3.72f1 or higher, the SceneDelegate settings generated by Unity are maintained.
- In versions below Unity 2022.3.72f1,
StoveUnitySceneDelegate.mmis included in the Compile Sources of the UnityFramework Target. - The Unity screen and input operate normally when the app is launched.
- The app operates normally after being switched from the background to the foreground.
- Authentication is completed when returning to the game after STOVE app-to-app authentication during app execution.
- The callback is delivered only once when launched via an authentication URL while the app is closed.
- The existing AppDelegate URL callback operates normally even in environments that do not use the Scene lifecycle.
Check if the following settings are applied to the project. - Open the
Info.plistfile in Xcode. - Check if
Application Scene Manifest(raw key:UIApplicationSceneManifest) and its childScene Configuration(raw key:UISceneConfigurations) exist. - To check via source code, right-click
Info.plistand select Open As > Source Code.```xmlUIApplicationSceneManifest
Action Method
UIApplicationSceneManifest key and its sub-settings from Info.plist. Deleting them will cause iOS to revert to using the AppDelegate lifecycle.
!warning
It may be automatically re-inserted during build
ㆍ Unity projects may automatically insert these settings when regenerating the Xcode project.
ㆍ We recommend checking theInfo.plistafter every build or using a post-build script (PostProcessBuild) to remove the key.
iOS Unity AppController Conflict Resolution
ㆍ The STOVE SDK's Unity iOS plugin uses the IMPL_APP_CONTROLLER_SUBCLASS macro to register StoveSDKAppController as Unity's AppController. Therefore, you can handle STOVE SDK features such as login URL callbacks and Push notifications without directly modifying the AppDelegate in your game.
ㆍ If the same macro is used in an external plugin, multiple AppControllers will be registered redundantly.
Since only one AppController can be active in Unity, the functionality of either the STOVE SDK or the external plugin may fail to operate.
!warning
Please merge the AppControllers of the external plugin and the STOVE SDK.
ㆍIMPL_APP_CONTROLLER_SUBCLASSmodifies Unity's AppController class information when the class is loaded.
ㆍ Since the loading order of multiple classes is not guaranteed, adjusting file order or build order will not provide a stable solution.
ㆍ You must integrate and manage the delegate methods of multiple plugins into a single AppController.
Application Targets
| Project Status | Application Method |
|---|---|
| Only STOVE SDK has declared the macro | No additional work is required. |
| External plugin also declared the macro | Create an integrated AppController and merge the delegate methods of each plugin. |
| Using an integrated AppController in STOVE SDK 2.9.x | Add the UIScene lifecycle handling code from STOVE SDK 3.0.0 to the integrated AppController. |
Checking for Conflicts
Unity project's Assets Search to see if the following macros are used in the folder.
IMPL_APP_CONTROLLER_SUBCLASS(
- If the enabled macro declaration is only in
StoveSDKAppController.mm, no additional work is required. - If it is declared in two or more different AppController classes, apply the integration procedure below.
- If an external plugin is provided in the form of a compiled library, the macro may not appear in the source search results. Please check the plugin development guide to see if a separate UnityAppController is used.
Integration Method (New application for STOVE SDK 3.0.0)
1. Add GameAppController.mm file
In your Unity project, add the GameAppController.mm file under Assets.
You can freely specify the subfolder location, but the path must include Plugins/iOS so that Unity can recognize it as an iOS native plugin.
Assets/Game/Plugins/iOS/GameAppController.mm
Assets/Plugins/iOS/GameAppController.mm
!info
This is an example based on STOVE SDK 3.0.0 or higher
ㆍ The code below includes STOVE SDK's login URL callback, Push, foreground notification, and UIScene configuration processing.
ㆍ Please merge the initialization and delegate methods implemented in AppController from external plugins at the locations marked with comments.
!info
The merging method is different for STOVE SDK versions below 3.0.0
ㆍ Please merge the methods based on theStoveSDKAppController.mmfile of the STOVE plugin you are using.
ㆍ Do not add the UIScene-related methods included in the 3.0.0 example; only integrate the methods implemented in the current SDK with the external plugin code.
# import "UnityAppController.h"
# import "AppDelegateListener.h"
# import <StovePush/StovePush.h>
# import <Stove/Stove.h>
// 사용하는 외부 플러그인의 헤더를 추가해요.
@interface GameAppController :
UnityAppController <SGSPushNotificationCenterDelegate, AppDelegateListener>
@end
@implementation GameAppController
- (instancetype)init
{
self = [super init];
if (self != nil)
{
UnityRegisterAppDelegateListener(self);
}
return self;
}
- (void)onOpenURL:(NSNotification *)notification
{
NSDictionary *userInfo = notification.userInfo;
id urlValue = userInfo[@"url"];
if (![urlValue isKindOfClass:NSURL.class])
{
return;
}
NSURL *url = (NSURL *)urlValue;
void (^handleURL)(void) = ^{
NSMutableDictionary<UIApplicationOpenURLOptionsKey, id> *options =
[NSMutableDictionary dictionary];
id sourceApplication = userInfo[@"sourceApplication"];
if (sourceApplication != nil &&
sourceApplication != NSNull.null)
{
options[UIApplicationOpenURLOptionsSourceApplicationKey] =
sourceApplication;
}
id annotation = userInfo[@"annotation"];
if (annotation != nil &&
annotation != NSNull.null)
{
options[UIApplicationOpenURLOptionsAnnotationKey] =
annotation;
}
options[UIApplicationOpenURLOptionsOpenInPlaceKey] = @NO;
[SGSApplicationDelegate
application:UIApplication.sharedApplication
openURL:url
options:options];
};
if (NSThread.isMainThread)
{
handleURL();
}
else
{
dispatch_async(
dispatch_get_main_queue(),
handleURL);
}
}
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Merge app launch initialization code for external plugins.
[[SGSPushNotificationCenter currentPushNotificationCenter]
setDelegate:self];
return [super application:application
didFinishLaunchingWithOptions:launchOptions];
}
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
options:
(NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options
{
// If there is URL handling code for external plugins, call it as well.
return [SGSApplicationDelegate
application:application
openURL:url
options:options];
}
- (void)application:(UIApplication *)application
didRegisterForRemoteNotificationsWithDeviceToken:
(NSData *)deviceToken
{
[[SGSPushNotificationCenter currentPushNotificationCenter]
application:application
didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
// Merge device token handling code for external plugins.
}
- (void)application:(UIApplication *)application
didReceiveRemoteNotification:(NSDictionary *)userInfo
fetchCompletionHandler:
(void (^)(UIBackgroundFetchResult result))completionHandler
{
[[SGSPushNotificationCenter currentPushNotificationCenter]
application:application
didReceiveRemoteNotification:userInfo
fetchCompletionHandler:completionHandler];
// Be careful not to call the same completionHandler multiple times.
}
- (UISceneConfiguration *)application:(UIApplication *)application
configurationForConnectingSceneSession:(UISceneSession *)session
options:
(UISceneConnectionOptions *)options
{
return [UISceneConfiguration
configurationWithName:@"Default Configuration"
sessionRole:session.role];
}
- (void)willPresentNotification:(UNNotification *)notification
withCompletionHandler:
(void (^)(UNNotificationPresentationOptions options))
completionHandler
{
UNNotificationPresentationOptions options = 0;
NSNumber *foregroundPushSettings =
[[NSBundle mainBundle]
objectForInfoDictionaryKey:@"ForegroundPushEnabled"];
BOOL foregroundPushEnabled =
(foregroundPushSettings == nil)
? YES
: foregroundPushSettings.boolValue;
NSNumber *pushListOptionEnabled =
[[NSBundle mainBundle]
objectForInfoDictionaryKey:@"EnablePushListOptions"];
BOOL enablePushListOptions =
(pushListOptionEnabled == nil)
? YES
: pushListOptionEnabled.boolValue;
if (foregroundPushEnabled)
{
options |= UNNotificationPresentationOptionSound;
if (@available(iOS 14.0, *))
{
options |= UNNotificationPresentationOptionBanner;
if (enablePushListOptions)
{
options |= UNNotificationPresentationOptionList;
}
}
else
{
options |= UNNotificationPresentationOptionAlert;
}
}
completionHandler(options);
}
// **If external plugins declare other delegate methods, merge them here.**
@end
IMPL_APP_CONTROLLER_SUBCLASS(GameAppController)
!warning
외부 플러그인의 반환값과 completionHandler를 확인해 주세요
ㆍ 동일한 delegate 메서드를 여러 플러그인이 구현하면 각 처리 결과를 하나의 반환값으로 병합해야 해요.
2. 기존 AppController의 매크로 비활성화
통합 AppController를 추가한 후 기존 AppController 파일에서 아래 매크로 선언을 주석 처리하거나 제거해요.
- STOVE SDK:
Assets/Stove/Plugins/iOS/StoveSDKAppController.mm - 외부 플러그인: 해당 플러그인이 UnityAppController를 구현한
.m또는.mm파일
// Disabled in STOVE SDK AppController
// IMPL_APP_CONTROLLER_SUBCLASS(StoveSDKAppController)
// Also disabled in external plugin AppController
// IMPL_APP_CONTROLLER_SUBCLASS(ExternalSDKAppController)
!warning
활성화된 매크로는 하나만 남겨 주세요
ㆍ 병합 시 최종 프로젝트에서는IMPL_APP_CONTROLLER_SUBCLASS(GameAppController)만 활성화되어 있어야 해요.
ㆍ 기존 클래스와 메서드 구현은 삭제하지 않아도 되지만, 해당 클래스의 매크로는 반드시 비활성화해야 해요.
ㆍ STOVE SDK 또는 외부 플러그인을 업데이트하면 수정한 매크로가 다시 활성화될 수 있으므로 업데이트 후마다 확인해 주세요.
기존 통합 AppController 업데이트 (2.x.x → 3.0.0)
변경 내용 요약
| Changes | STOVE SDK 3.0.0 Application Details |
|---|---|
| Module import | SGSPush/SGSPush.h, SGSAuth/SGSAuth.h instead of StovePush/StovePush.h, Stove/Stove.h are used. |
| AppDelegateListener | AppDelegateListener.hImport and adopt the protocol, then call init in UnityRegisterAppDelegateListener(self). |
| Scene URL callback | onOpenURL:Implement this to pass the URL delivered from the Scene to SGSApplicationDelegate. |
| Scene configuration | configurationForConnectingSceneSessionAdd a method that returns Default Configuration in . |
| Existing external plugin code | Keep the existing initialization, deep link, and delegate processing code, and merge the 3.0.0 code above. |
!warning
Do not use the 2.x.x integration file without modifications
ㆍAppDelegateListenerandonOpenURL:are missing, the STOVE SDK may not be able to receive the cross-app authentication URL delivered to UIScene.
ㆍ If the Scene configuration method is missing, theDefault Configurationused by the game may not be selected when connecting to UIScene.
Only apply this to games that are currently using an integration file like GameAppController.mm to resolve AppController conflicts in STOVE SDK 2.x.x.
In STOVE SDK 3.0.0, do not delete the existing integration file or replace it with the full example above; instead, apply only the following four items to the existing file.
!warning
Please keep the game and external plugin code as is
ㆍ Do not delete the import, initialization, deep link, and delegate processing code for external plugins such as Singular.
ㆍ If the same delegate method already exists, do not create another one; merge the STOVE code into the existing method.
ㆍ In the final project, the activatedIMPL_APP_CONTROLLER_SUBCLASSmust only have one declaration of the integrated AppController.
1. Replace STOVE module imports
Delete the two existing STOVE imports and replace them with the STOVE SDK 3.0.0 module. Keep the imports for external plugins.
// 삭제
# import <SGSPush/SGSPush.h>
# import <SGSAuth/SGSAuth.h>
// 추가
# import "AppDelegateListener.h"
# import <StovePush/StovePush.h>
# import <Stove/Stove.h>
2. Register AppDelegateListener
Add the AppDelegateListener protocol to the integrated AppController.
@interface GameAppController :
UnityAppController <SGSPushNotificationCenterDelegate, AppDelegateListener>
@end
@implementation GameAppController Add the init method right below it.
If you have already implemented init, keep the existing initialization code and only merge the UnityRegisterAppDelegateListener(self) call.
- (instancetype)init
{
self = [super init];
if (self != nil)
{
UnityRegisterAppDelegateListener(self);
}
return self;
}
3. Add Scene URL callback
@implementation GameAppController Add the onOpenURL: method inside. This code passes the login URL received from UIScene to the STOVE SDK.
- (void)onOpenURL:(NSNotification *)notification
{
NSDictionary *userInfo = notification.userInfo;
id urlValue = userInfo[@"url"];
if (![urlValue isKindOfClass:NSURL.class])
{
return;
}
NSURL *url = (NSURL *)urlValue;
void (^handleURL)(void) = ^{
NSMutableDictionary<UIApplicationOpenURLOptionsKey, id> *options =
[NSMutableDictionary dictionary];
id sourceApplication = userInfo[@"sourceApplication"];
if (sourceApplication != nil &&
sourceApplication != NSNull.null)
{
options[UIApplicationOpenURLOptionsSourceApplicationKey] =
sourceApplication;
}
id annotation = userInfo[@"annotation"];
if (annotation != nil &&
annotation != NSNull.null)
{
options[UIApplicationOpenURLOptionsAnnotationKey] =
annotation;
}
options[UIApplicationOpenURLOptionsOpenInPlaceKey] = @NO;
[SGSApplicationDelegate
application:UIApplication.sharedApplication
openURL:url
options:options];
};
if (NSThread.isMainThread)
{
handleURL();
}
else
{
dispatch_async(
dispatch_get_main_queue(),
handleURL);
}
}
Do not delete the existing application:openURL:options: method. Keep it to ensure that URLs passed to the AppDelegate lifecycle can still be processed.
4. Add Scene configuration method
@implementation GameAppController Add the following method inside. If the same method already exists, do not add it again, but ensure it returns Default Configuration.
- (UISceneConfiguration *)application:(UIApplication *)application
configurationForConnectingSceneSession:(UISceneSession *)session
options:
(UISceneConnectionOptions *)options
{
return [UISceneConfiguration
configurationWithName:@"Default Configuration"
sessionRole:session.role];
}
!info
Do not change the remaining STOVE code
ㆍ Keep the existing implementation for Push device token, remote notification, and foreground notification handling code.
ㆍdidFinishLaunchingWithOptionsAlso keep the STOVE Push delegate registration and external plugin initialization code in.
ㆍ If you want to compare the entire code structure, please refer to the example in 통합 적용 방법 (STOVE SDK 3.0.0 신규 적용).
5. Verify the application results
- Check if the
AppDelegateListenerandStovePush,Stovemodules are imported without build errors - Check that there is only one active
IMPL_APP_CONTROLLER_SUBCLASSin the integrated AppController - Check if the Push callback is delivered normally during normal execution and notification click execution
- Check if the login callback is delivered only once when returning to the game after STOVE or social login
- Check if the external plugin's initialization, deep link, and delegate functions work the same as before the update
iOS Unreal UISceneDelegate Response Update
!danger
Please complete the SceneDelegate application by April 2027
ㆍ Starting April 2027, apps submitted to the App Store must be built with Xcode 27 and the iOS 27 SDK, and in this environment, applying the UIScene-based lifecycle (SceneDelegate) is mandatory.
ㆍ SDK 3.0.0 can be used immediately without applying SceneDelegate. However, you must apply SceneDelegate according to the guide below by April 2027.
ㆍ Note: If you are upgrading from 2.9.x to 3.0.0, if any 8) iOS — LSSupportsOpeningDocumentsInPlace 사용 patches remain, the external login callback will not be delivered to the SDK. This guide includes reverting those patches, so it is recommended to apply it along with the migration.
ㆍ If it is difficult to apply SceneDelegate immediately due to project structure or schedule, please contact the development team. We will assist you with an individual guide tailored to your project situation.
Apps built using the iOS 27 SDK in Xcode 27 must apply the UIScene-based lifecycle. To handle the URL callback that returns to the game after authentication between STOVE apps, you also need to link the SceneDelegate according to your Unreal Engine version.
Issue
Due to Apple platform policy, support for SceneDelegate (UIScene lifecycle) is optional until iOS 26, but it will become mandatory starting from iOS 27.
Apps built using the iOS 27 SDK in Xcode 27 cannot be executed if they do not apply the UIScene-based lifecycle. For more details, please refer to the Apple Market Policy.
Even if you have applied UIScene according to the existing guide, the authentication callback may not work if you do not deliver the inter-app authentication response value to the SceneDelegate.
Reference
- Unity Discussions — Apple: Update your Editor to receive UIScene lifecycle support
- Apple Developer — TN3187: Migrating to the UIKit scene-based life cycle
!info
URL callback handling by STOVE SDK version
ㆍ STOVE SDK 3.0.0 or higher uses the defaultFIOSCoreDelegates::OnOpenURLof Unreal Engine.
ㆍ STOVE SDK below 3.0.0 uses theFIOSCoreDelegates::OnOpenURLwithOptionsadded in the existing guide.
ㆍ Please apply only the method corresponding to the STOVE SDK version applied to your project.
Check application path
Unreal Engine 5.8 or higher
- STOVE SDK 3.0.0 or higher
- Enable Unreal Engine's SceneDelegate support and rebuild the project.
- STOVE SDK below 3.0.0
- It is recommended to update to STOVE SDK 3.0.0 or higher.
- The combination of Unreal Engine 5.8 or higher and STOVE SDK below 3.0.0 is not supported in this guide.
Unreal Engine below 5.8
- STOVE SDK 3.0.0 or higher
- Add the SceneDelegate and
OnOpenURLdelivery path to the custom engine.
- Add the SceneDelegate and
- STOVE SDK below 3.0.0
- Add the SceneDelegate and
OnOpenURLwithOptionsdelivery path to the custom engine.
- Add the SceneDelegate and
URL callback delivery path
=== "STOVE SDK 3.0.0 or higher"
IOSSceneDelegate.scene:openURLContexts:
→ IOSAppDelegate.handleOpenURL:sourceApplication:annotation:
→ FIOSCoreDelegates::OnOpenURL
→ STOVE Unreal Plugin
→ SGSApplicationDelegate.application:openURL:options:
=== "STOVE SDK below 3.0.0"
IOSSceneDelegate.scene:openURLContexts:
→ IOSAppDelegate.handleOpenURL:options:
→ FIOSCoreDelegates::OnOpenURLwithOptions
→ STOVE Unreal Plugin
→ SGSApplicationDelegate.application:openURL:options:
Unreal Engine 5.8 or higher
1. Enable Scene lifecycle
Add the following settings to your game project's Config/DefaultEngine.ini.
[/Script/IOSRuntimeSettings.IOSRuntimeSettings]
bUseSceneBasedLifecycle=True
2. Check STOVE SDK version
=== "STOVE SDK 3.0.0 or higher"
Uses Unreal Engine's default FIOSCoreDelegates::OnOpenURL path without additional engine modifications.
=== "STOVE SDK below 3.0.0"
Since STOVE SDK below 3.0.0 subscribes to OnOpenURLwithOptions, you cannot deliver the URL callback with just the Scene lifecycle settings.
!warning
The combination of Unreal Engine 5.8 or higher and STOVE SDK below 3.0.0 is not supported in this guide. Please update to STOVE SDK 3.0.0 or higher.
3. Rebuild iOS target
After changing the settings, rebuild and package the iOS target.
4. Check Info.plist
Check if the following key-value has been generated in the final .app of Info.plist. The content below is an example to verify the build result, and you should not modify Info.plist directly.
<!-- 최종 .app/Info.plist 빌드 결과 확인용 -->
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneConfigurationName</key>
<string>Default Configuration</string>
<key>UISceneDelegateClassName</key>
<string>IOSSceneDelegate</string>
</dict>
</array>
</dict>
</dict>
Unreal Engine below 5.8
Versions below Unreal Engine 5.8 are not officially supported by Unreal for UIScene. In Unreal Engine 5.4.4, you modify the engine source directly to always use the Scene lifecycle.
!warning
The implementation below is a compatibility guide written based on STOVE verification, not an official Unreal guide. Using Unreal Engine 5.8 or higher is recommended.
!warning
8) iOS — LSSupportsOpeningDocumentsInPlace 사용 If you have applied this, please revert it first
ㆍ Remove allIOSAppDelegate,OnOpenURLwithOptions,savedOpenUrlWithOptionsParameters, andapplication:openURL:options:code added toOnOpenURLfor STOVE SDK 2.8.0 ~ 2.9.x integration, then apply the guide below.
ㆍ STOVE SDK below 3.0.0 will add the same code again in the guide below. If you do not revert, the build will fail due to duplicate declarations.
ㆍ STOVE SDK 3.0.0 or higher only usesOnOpenURL, so that code is not needed. If it remains, the URL callback may not be delivered toIOSSceneDelegate.
1. Common Scene lifecycle implementation
Regardless of the SDK version, apply the following items to the custom engine.
UIWindowSceneCreate a window connected to - Connect the same window toIOSAppDelegate.Windowconnected to -FAppEntry::PreInit, initialize splash screen and game thread - Pass Scene lifecycle to existingIOSAppDelegatehandler - Create Scene Manifest in the finalInfo.plist
// Engine/Source/Runtime/ApplicationCore/Public/IOS/IOSSceneDelegate.h
// 신규 파일로 생성해요.
# pragma once
# import <UIKit/UIKit.h>
# if PLATFORM_IOS && !PLATFORM_TVOS && !PLATFORM_VISIONOS
# ifndef SWIFT_IMPORT
APPLICATIONCORE_API
# endif
@interface IOSSceneDelegate : UIResponder <UIWindowSceneDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
# endif
// Engine/Source/Runtime/ApplicationCore/Public/IOS/IOSAppDelegate.h
- (void)ForceExit;
// ============ [STOVE SceneDelegate 코드 추가 시작] ============
- (void)handleWillResignActive;
- (void)handleDidEnterBackground;
- (void)handleWillEnterForeground;
- (void)handleDidBecomeActive;
// ============ [STOVE SceneDelegate 코드 추가 끝] ============
@property (nonatomic, copy)
void(^BackgroundSessionEventCompleteDelegate)();
// Engine/Source/Runtime/ApplicationCore/Private/IOS/IOSAppDelegate.cpp
FCriticalSection RenderSuspend;
// 기존 applicationWillResignActive: 메서드 이름을 변경하고
// 기존 본문을 그대로 유지해요.
- (void)handleWillResignActive
{
// 기존 applicationWillResignActive: 본문
}
// ============ [Start adding STOVE SceneDelegate code] ============
- (void)applicationWillResignActive:(UIApplication *)application
{
[self handleWillResignActive];
}
// ============ [End adding STOVE SceneDelegate code] ============
// Rename the existing applicationDidEnterBackground: method
// and keep the existing body as is.
- (void)handleDidEnterBackground
{
// Existing applicationDidEnterBackground: body
}
// ============ [Start adding STOVE SceneDelegate code] ============
- (void)applicationDidEnterBackground:(UIApplication *)application
{
[self handleDidEnterBackground];
}
// ============ [End adding STOVE SceneDelegate code] ============
// Rename the existing applicationWillEnterForeground: method
// and keep the existing body as is.
- (void)handleWillEnterForeground
{
// Existing applicationWillEnterForeground: body
}
// ============ [Start adding STOVE SceneDelegate code] ============
- (void)applicationWillEnterForeground:(UIApplication *)application
{
[self handleWillEnterForeground];
}
// ============ [End adding STOVE SceneDelegate code] ============
extern double GCStartTime;
// Rename the existing applicationDidBecomeActive: method
// and keep the existing body as is.
- (void)handleDidBecomeActive
{
// Existing applicationDidBecomeActive: body
}
// ============ [Start adding STOVE SceneDelegate code] ============
- (void)applicationDidBecomeActive:(UIApplication *)application
{
[self handleDidBecomeActive];
}
// ============ [End adding STOVE SceneDelegate code] ============
- (void)applicationWillTerminate:(UIApplication *)application
{
// Existing applicationWillTerminate: body
}
// Engine/Source/Runtime/ApplicationCore/Private/IOS/IOSAppDelegate.cpp
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
{
self.launchOptions = launchOptions;
# if PLATFORM_TVOS
self.bDeviceInPortraitMode = false;
// ============ [STOVE SceneDelegate 코드 추가 시작] ============
# elif PLATFORM_IOS && !PLATFORM_VISIONOS
self.InterfaceOrientation = UIInterfaceOrientationUnknown;
self.bDeviceInPortraitMode = false;
// ============ [STOVE SceneDelegate 코드 추가 끝] ============
# else
self.InterfaceOrientation =
[self.Window.windowScene interfaceOrientation];
self.bDeviceInPortraitMode =
UIInterfaceOrientationIsPortrait(self.InterfaceOrientation);
printf(
"========= This app is in %s mode\n",
self.bDeviceInPortraitMode ? "PORTRAIT" : "LANDSCAPE"
);
# endif
// 기존 코드
// ...
// Engine/Source/Runtime/ApplicationCore/Private/IOS/IOSAppDelegate.cpp
# if !BUILD_EMBEDDED_APP
// ============ [STOVE SceneDelegate 코드 추가 시작] ============
# if !(PLATFORM_IOS && !PLATFORM_TVOS && !PLATFORM_VISIONOS)
// ============ [STOVE SceneDelegate 코드 추가 끝] ============
# if PLATFORM_VISIONOS
CGRect MainFrame = CGRectMake(0, 0, 1000, 1000);
# else
CGRect MainFrame = [[UIScreen mainScreen] bounds];
# endif
self.Window = [[UIWindow alloc] initWithFrame:MainFrame];
[self.Window makeKeyAndVisible];
FAppEntry::PreInit(self, application);
# if !PLATFORM_VISIONOS
UIStoryboard* storyboard =
[UIStoryboard storyboardWithName:@"LaunchScreen" bundle:nil];
if (storyboard != nil)
{
self.viewController =
[storyboard instantiateViewControllerWithIdentifier:
@"LaunchScreen"];
self.viewController.view.tag = 200;
[self.Window addSubview:self.viewController.view];
GShowSplashScreen = true;
}
# endif
timer = [NSTimer
scheduledTimerWithTimeInterval:0.05f
target:self
selector:@selector(timerForSplashScreen)
userInfo:nil
repeats:YES];
[self StartGameThread];
self.CommandLineParseTimer = [NSTimer
scheduledTimerWithTimeInterval:0.01f
target:self
selector:@selector(NoUrlCommandLine)
userInfo:nil
repeats:NO];
// ============ [STOVE SceneDelegate 코드 추가 시작] ============
# endif // !(PLATFORM_IOS && !PLATFORM_TVOS && !PLATFORM_VISIONOS)
// ============ [STOVE SceneDelegate 코드 추가 끝] ============
# endif
// Engine/Source/Programs/UnrealBuildTool/Platform/IOS/UEDeployIOS.cs
return MinVersionToReturn;
}
// ============ [STOVE SceneDelegate 코드 추가 시작] ============
private static void AppendSceneManifest(StringBuilder Text)
{
Text.AppendLine("\t<key>UIApplicationSceneManifest</key>");
Text.AppendLine("\t<dict>");
Text.AppendLine(
"\t\t<key>UIApplicationSupportsMultipleScenes</key>"
);
Text.AppendLine("\t\t<false/>");
Text.AppendLine("\t\t<key>UISceneConfigurations</key>");
Text.AppendLine("\t\t<dict>");
Text.AppendLine(
"\t\t\t<key>UIWindowSceneSessionRoleApplication</key>"
);
Text.AppendLine("\t\t\t<array>");
Text.AppendLine("\t\t\t\t<dict>");
Text.AppendLine(
"\t\t\t\t\t<key>UISceneConfigurationName</key>"
);
Text.AppendLine(
"\t\t\t\t\t<string>Default Configuration</string>"
);
Text.AppendLine(
"\t\t\t\t\t<key>UISceneDelegateClassName</key>"
);
Text.AppendLine(
"\t\t\t\t\t<string>IOSSceneDelegate</string>"
);
Text.AppendLine("\t\t\t\t</dict>");
Text.AppendLine("\t\t\t</array>");
Text.AppendLine("\t\t</dict>");
Text.AppendLine("\t</dict>");
}
// ============ [STOVE SceneDelegate 코드 추가 끝] ============
public static void WritePlistFile(
FileReference PlistFile,
DirectoryReference? ProjectLocation,
UnrealPluginLanguage? UPL,
string GameName,
bool bIsUnrealGame,
string ProjectName,
ILogger Logger
)
{
// 기존 plist 생성 코드
// ...
Text.AppendLine("\t<key>UIRequiresFullScreen</key>");
Text.AppendLine("\t<true/>");
// ============ [STOVE SceneDelegate 코드 추가 시작] ============
AppendSceneManifest(Text);
// ============ [STOVE SceneDelegate 코드 추가 끝] ============
Text.AppendLine("\t<key>UIViewControllerBasedStatusBarAppearance</key>");
}
public static bool GenerateLegacyIOSPList(...)
{
// 기존 plist 생성 코드
// ...
Text.AppendLine("\t<key>UIRequiresFullScreen</key>");
Text.AppendLine("\t<true/>");
// ============ [STOVE SceneDelegate 코드 추가 시작] ============
AppendSceneManifest(Text);
// ============ [STOVE SceneDelegate 코드 추가 끝] ============
Text.AppendLine(
"\t<key>UIViewControllerBasedStatusBarAppearance</key>"
);
// 기존 코드
// ...
}
// Engine/Source/Runtime/Launch/Private/IOS/LaunchIOS.cpp
# include "IMessagingModule.h"
# include "IOS/IOSAppDelegate.h"
// ============ [STOVE SceneDelegate 코드 추가 시작] ============
# include "IOS/IOSApplication.h"
// ============ [STOVE SceneDelegate 코드 추가 끝] ============
# include "IOS/IOSView.h"
# include "IOS/IOSCommandLineHelper.h"
// Engine/Source/Runtime/Launch/Private/IOS/LaunchIOS.cpp
static void MainThreadInit()
{
# if !UE_USE_SWIFT_UI_MAIN
IOSAppDelegate* AppDelegate = [IOSAppDelegate GetDelegate];
# if PLATFORM_VISIONOS
CGRect MainFrame = CGRectMake(0, 0, 1000, 1000);
# else
// Size the view appropriately for any potentially dynamically attached displays,
// prior to creating any framebuffers
CGRect MainFrame = [[UIScreen mainScreen] bounds];
// ============ [STOVE SceneDelegate 코드 추가 시작] ============
# if PLATFORM_IOS && !PLATFORM_TVOS
if (UIWindowScene* WindowScene =
AppDelegate.Window.windowScene)
{
AppDelegate.InterfaceOrientation =
[WindowScene interfaceOrientation];
AppDelegate.bDeviceInPortraitMode =
UIInterfaceOrientationIsPortrait(
AppDelegate.InterfaceOrientation
);
const CGRect SceneBounds =
WindowScene.coordinateSpace.bounds;
if (SceneBounds.size.width > 0 &&
SceneBounds.size.height > 0)
{
MainFrame = SceneBounds;
}
}
if (AppDelegate.InterfaceOrientation !=
UIInterfaceOrientationUnknown)
{
FIOSApplication::CachedOrientation =
AppDelegate.InterfaceOrientation;
}
# endif
// ============ [STOVE SceneDelegate 코드 추가 끝] ============
# endif
// 기존 MainThreadInit 코드
// ...
# endif
}
2. Delegate declaration by SDK version
=== "STOVE SDK 3.0.0 or higher"
Since it uses Unreal Engine's existing FIOSCoreDelegates::OnOpenURL, there is no need to declare a separate delegate.
=== "Below STOVE SDK 3.0.0"
IOSAppDelegate.h's FIOSCoreDelegates class, add a delegate that passes the options dictionary right after the existing OnOpenURL declaration.
// Engine/Source/Runtime/ApplicationCore/Public/IOS/IOSAppDelegate.h
// FIOSCoreDelegates 클래스 내부
DECLARE_MULTICAST_DELEGATE_FourParams(
FOnOpenURL,
UIApplication*,
NSURL*,
NSString*,
id
);
static FOnOpenURL OnOpenURL;
// ============ [STOVE SceneDelegate 코드 추가 시작] ============
DECLARE_MULTICAST_DELEGATE_ThreeParams(
FOnOpenURLwithOptions,
UIApplication*,
NSURL*,
NSDictionary*
);
static FOnOpenURLwithOptions OnOpenURLwithOptions;
// ============ [STOVE SceneDelegate 코드 추가 끝] ============
/** Add a filter to decide whether each push notification should be processed */
static FDelegateHandle AddPushNotificationFilter(
const FPushNotificationFilter& FilterDel
);
IOSAppDelegate interface, add an array to store URLs before initialization right after the existing savedOpenUrlParameters property.
// Engine/Source/Runtime/ApplicationCore/Public/IOS/IOSAppDelegate.h
// IOSAppDelegate @interface 내부
// parameters passed from openURL
@property (nonatomic, retain)
NSMutableArray* savedOpenUrlParameters;
// ============ [STOVE SceneDelegate 코드 추가 시작] ============
@property (nonatomic, retain)
NSMutableArray* savedOpenUrlWithOptionsParameters;
// ============ [STOVE SceneDelegate 코드 추가 끝] ============
#if !UE_BUILD_SHIPPING && !PLATFORM_TVOS
IOSAppDelegate.cpp, add the implementation for the delegate and the storage array.
// Engine/Source/Runtime/ApplicationCore/Private/IOS/IOSAppDelegate.cpp
FIOSCoreDelegates::FOnOpenURL FIOSCoreDelegates::OnOpenURL;
// ============ [STOVE SceneDelegate 코드 추가 시작] ============
FIOSCoreDelegates::FOnOpenURLwithOptions
FIOSCoreDelegates::OnOpenURLwithOptions;
// ============ [STOVE SceneDelegate 코드 추가 끝] ============
FIOSCoreDelegates::FOnWillResignActive
FIOSCoreDelegates::OnWillResignActive;
#if WITH_ACCESSIBILITY
@synthesize AccessibilityCacheTimer;
#endif
@synthesize savedOpenUrlParameters;
// ============ [STOVE SceneDelegate 코드 추가 시작] ============
@synthesize savedOpenUrlWithOptionsParameters;
// ============ [STOVE SceneDelegate 코드 추가 끝] ============
@synthesize BackgroundSessionEventCompleteDelegate;
application:didFinishLaunchingWithOptions:, initialize the storage array.
// Engine/Source/Runtime/ApplicationCore/Private/IOS/IOSAppDelegate.cpp
self.savedOpenUrlParameters =
[[NSMutableArray alloc] init];
// ============ [STOVE SceneDelegate 코드 추가 시작] ============
self.savedOpenUrlWithOptionsParameters =
[[NSMutableArray alloc] init];
// ============ [STOVE SceneDelegate 코드 추가 끝] ============
self.PeakMemoryTimer = [NSTimer
scheduledTimerWithTimeInterval:0.1f
target:self
selector:@selector(RecordPeakMemory)
userInfo:nil
repeats:YES];
3. Adding AppDelegate URL handler by SDK version
=== "STOVE SDK 3.0.0 or higher"
IOSAppDelegate.h, declare the following handler.
// Engine/Source/Runtime/ApplicationCore/Public/IOS/IOSAppDelegate.h
- (void)ForceExit;
// ============ STOVE SceneDelegate 코드 추가 시작 ============
- (BOOL)handleOpenURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation;
// ============ STOVE SceneDelegate 코드 추가 끝 ============
@property (nonatomic, copy)
void(^BackgroundSessionEventCompleteDelegate)();
<p style="color:#314158;font-family:'Spoqa Han Sans Neo';font-size:16px;font-weight:400;line-height:26px;letter-spacing:-0.48px;"><code>IOSAppDelegate.cpp</code>, depending on the engine initialization status, either pass the URL directly or store it in the existing storage path.</p>
```objc
// Engine/Source/Runtime/ApplicationCore/Private/IOS/IOSAppDelegate.cpp
// 기존 메서드의 본문을 다음 공통 handler로 이동해요.
// ============ [STOVE SceneDelegate 코드 추가 시작] ============
- (BOOL)handleOpenURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation
{
#if !NO_LOGGING
NSLog(@"%s", "IOSAppDelegate openURL\n");
#endif
if (FString(url.scheme) == FApp::GetName())
{
NSString* EncodedURLString = url absoluteString;
NSString* URLString =
EncodedURLString stringByRemovingPercentEncoding;
FString CommandLineParameters(URLString);
int32 URLTerminator = CommandLineParameters.Find(
TEXT("://"),
ESearchCase::CaseSensitive
);
if (URLTerminator > -1)
{
CommandLineParameters.RightChopInline(
URLTerminator + 3,
false
);
}
FIOSCommandLineHelper::InitCommandArgs(
CommandLineParameters
);
self.bCommandLineReady = true;
self.CommandLineParseTimer invalidate;
self.CommandLineParseTimer = nil;
}
UIApplication* Application =
UIApplication sharedApplication;
if (bEngineInit)
{
FIOSCoreDelegates::OnOpenURL.Broadcast(
Application,
url,
sourceApplication,
annotation
);
}
else
{
NSMutableDictionary* Parameter = @{
@"application": Application,
@"url": url
} mutableCopy;
if (sourceApplication != nil)
{
Parameter@"sourceApplication" = sourceApplication;
}
if (annotation != nil)
{
Parameter@"annotation" = annotation;
}
savedOpenUrlParameters addObject:Parameter;
Parameter release;
}
return YES;
} - (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation
{
return self handleOpenURL:url
sourceApplication:sourceApplication
annotation:annotation;
}
// ============ STOVE SceneDelegate 코드 추가 끝 ============
FCriticalSection RenderSuspend;
=== "Below STOVE SDK 3.0.0"
<p style="color:#314158;font-family:'Spoqa Han Sans Neo';font-size:16px;font-weight:400;line-height:26px;letter-spacing:-0.48px;"><code>IOSAppDelegate.h</code>, declare a handler that receives the options dictionary.</p>
objc
// Engine/Source/Runtime/ApplicationCore/Public/IOS/IOSAppDelegate.h
- (void)ForceExit;
// ============ STOVE SceneDelegate code addition start ============
- (BOOL)handleOpenURL:(NSURL *)url
options:(NSDictionary<
UIApplicationOpenURLOptionsKey,
id> *)options;
// ============ STOVE SceneDelegate code addition end ============
@property (nonatomic, copy)
void(^BackgroundSessionEventCompleteDelegate)();
<p style="color:#314158;font-family:'Spoqa Han Sans Neo';font-size:16px;font-weight:400;line-height:26px;letter-spacing:-0.48px;"><code>IOSAppDelegate.cpp</code>에서 엔진 초기화 상태에 따라 <code>OnOpenURLwithOptions</code>으로 전달하거나 저장해요.</p>
```objc
// Engine/Source/Runtime/ApplicationCore/Private/IOS/IOSAppDelegate.cpp
// ============ [STOVE SceneDelegate code addition start] ============
- (BOOL)handleOpenURL:(NSURL *)url
options:(NSDictionary<
UIApplicationOpenURLOptionsKey,
id> *)options
{
#if !NO_LOGGING
NSLog(@"%s", "IOSAppDelegate openURL options\n");
#endif
if (FString(url.scheme) == FApp::GetName())
{
NSString* EncodedURLString = url absoluteString;
NSString* URLString =
EncodedURLString stringByRemovingPercentEncoding;
FString CommandLineParameters(URLString);
int32 URLTerminator = CommandLineParameters.Find(
TEXT("://"),
ESearchCase::CaseSensitive
);
if (URLTerminator > -1)
{
CommandLineParameters.RightChopInline(
URLTerminator + 3,
false
);
}
FIOSCommandLineHelper::InitCommandArgs(
CommandLineParameters
);
self.bCommandLineReady = true;
self.CommandLineParseTimer invalidate;
self.CommandLineParseTimer = nil;
}
UIApplication* Application =
UIApplication sharedApplication;
NSDictionary* NormalizedOptions =
options != nil ? options : @{};
if (bEngineInit)
{
FIOSCoreDelegates::OnOpenURLwithOptions.Broadcast(
Application,
url,
NormalizedOptions
);
}
else
{
NSDictionary* Parameter = @{
@"application": Application,
@"url": url,
@"options": NormalizedOptions
};
savedOpenUrlWithOptionsParameters addObject:Parameter;
}
return YES;
}
// ============ STOVE SceneDelegate code addition end ============
FCriticalSection RenderSuspend;
<br />
**4. 엔진 초기화 후 저장된 URL 전달**
=== "STOVE SDK 3.0.0 이상"
<p style="color:#314158;font-family:'Spoqa Han Sans Neo';font-size:16px;font-weight:400;line-height:26px;letter-spacing:-0.48px;">Unreal Engine의 기존 <code>savedOpenUrlParameters</code> 처리 경로를 유지해요.</p>
```objc
// Engine/Source/Runtime/ApplicationCore/Private/IOS/IOSAppDelegate.cpp
for (NSDictionary* Parameter in self.savedOpenUrlParameters)
{
UIApplication* Application = Parameter[@"application"];
NSURL* URL = Parameter[@"url"];
NSString* SourceApplication = Parameter[@"sourceApplication"];
id Annotation = Parameter[@"annotation"];
FIOSCoreDelegates::OnOpenURL.Broadcast(
Application,
URL,
SourceApplication,
Annotation
);
}
self.savedOpenUrlParameters = nil;
=== "STOVE SDK 3.0.0 미만"
IOSAppDelegate.cpp의 MainAppThread에서 bEngineInit = true;가 실행된 후, 기존 savedOpenUrlParameters 반복문 바로 앞에 추가해요. splash screen의 if 블록 내부에는 추가하지 않아요.
// Engine/Source/Runtime/ApplicationCore/Private/IOS/IOSAppDelegate.cpp
bEngineInit = true;
// Existing splash screen termination handling
if (GShowSplashScreen)
{
// ...
}
// ============ [STOVE SceneDelegate code addition start] ============
for (NSDictionary* Parameter
in self.savedOpenUrlWithOptionsParameters)
{
UIApplication* Application =
Parameter[@"application"];
NSURL* URL = Parameter[@"url"];
NSDictionary* Options = Parameter[@"options"];
FIOSCoreDelegates::OnOpenURLwithOptions.Broadcast(
Application,
URL,
Options
);
}
self.savedOpenUrlWithOptionsParameters = nil;
// ============ [STOVE SceneDelegate code addition end] ============
// Existing savedOpenUrlParameters handling
for (NSDictionary* Parameter in self.savedOpenUrlParameters)
{
UIApplication* Application = Parameter[@"application"];
NSURL* URL = Parameter[@"url"];
NSString* SourceApplication =
Parameter[@"sourceApplication"];
id Annotation = Parameter[@"annotation"];
FIOSCoreDelegates::OnOpenURL.Broadcast(
Application,
URL,
SourceApplication,
Annotation
);
}
self.savedOpenUrlParameters = nil;
<br />
**5. SceneDelegate URL delivery by SDK version**
```objc
// Engine/Source/Runtime/ApplicationCore/Private/IOS/IOSSceneDelegate.cpp
// 신규 파일로 생성해요.
// Copyright Epic Games, Inc. All Rights Reserved.
# include "IOS/IOSSceneDelegate.h"
# if PLATFORM_IOS && !PLATFORM_TVOS && !PLATFORM_VISIONOS
# include "IOS/IOSAppDelegate.h"
extern bool GShowSplashScreen;
@implementation IOSSceneDelegate
@synthesize window = _window;
- (void)scene:(UIScene *)scene
willConnectToSession:(UISceneSession *)session
options:(UISceneConnectionOptions *)connectionOptions
{
if (![scene isKindOfClass:UIWindowScene class])
{
return;
}
UIWindowScene* WindowScene = (UIWindowScene*)scene;
IOSAppDelegate* AppDelegate = IOSAppDelegate GetDelegate;
self.window =
[[UIWindow alloc] initWithWindowScene:WindowScene];
self.window makeKeyAndVisible;
AppDelegate.Window = self.window;
AppDelegate.InterfaceOrientation =
WindowScene interfaceOrientation;
AppDelegate.bDeviceInPortraitMode =
UIInterfaceOrientationIsPortrait(
AppDelegate.InterfaceOrientation
);
if !BUILD_EMBEDDED_APP
FAppEntry::PreInit(
AppDelegate,
UIApplication sharedApplication
);
UIStoryboard* Storyboard =
UIStoryboard storyboardWithName:@"LaunchScreen"
bundle:nil;
if (Storyboard != nil)
{
AppDelegate.viewController =
Storyboard instantiateViewControllerWithIdentifier:
@"LaunchScreen";
AppDelegate.viewController.view.tag = 200;
self.window addSubview:
AppDelegate.viewController.view;
GShowSplashScreen = true;
}
AppDelegate.timer = NSTimer
scheduledTimerWithTimeInterval:0.05f
target:AppDelegate
selector:@selector(timerForSplashScreen)
userInfo:nil
repeats:YES;
AppDelegate StartGameThread;
AppDelegate.CommandLineParseTimer = NSTimer
scheduledTimerWithTimeInterval:0.01f
target:AppDelegate
selector:@selector(NoUrlCommandLine)
userInfo:nil
repeats:NO;
endif
if (connectionOptions.URLContexts.count > 0)
{
self scene:scene
openURLContexts:connectionOptions.URLContexts;
}
}
- (void)sceneDidDisconnect:(UIScene *)scene
{
[[IOSAppDelegate GetDelegate] handleDidEnterBackground];
} - (void)sceneDidBecomeActive:(UIScene *)scene
{
[[IOSAppDelegate GetDelegate] handleDidBecomeActive];
} - (void)sceneWillResignActive:(UIScene *)scene
{
[[IOSAppDelegate GetDelegate] handleWillResignActive];
} - (void)sceneWillEnterForeground:(UIScene *)scene
{
[[IOSAppDelegate GetDelegate] handleWillEnterForeground];
} - (void)sceneDidEnterBackground:(UIScene *)scene
{
[[IOSAppDelegate GetDelegate] handleDidEnterBackground];
}
// Add one implementation of scene:openURLContexts:
// corresponding to the STOVE SDK version used below in this location.
@end
endif
=== "STOVE SDK 3.0.0 이상"
```objc
// Engine/Source/Runtime/ApplicationCore/Private/IOS/IOSSceneDelegate.cpp
- (void)scene:(UIScene *)scene
openURLContexts:(NSSet<UIOpenURLContext *> *)URLContexts
{
IOSAppDelegate* AppDelegate =
[IOSAppDelegate GetDelegate];
for (UIOpenURLContext* Context in URLContexts)
{
[AppDelegate handleOpenURL:Context.URL
sourceApplication:
Context.options.sourceApplication
annotation:
Context.options.annotation];
}
}
=== "STOVE SDK 3.0.0 미만"
// Engine/Source/Runtime/ApplicationCore/Private/IOS/IOSSceneDelegate.cpp
- (void)scene:(UIScene *)scene
openURLContexts:(NSSet<UIOpenURLContext *> )URLContexts
{
IOSAppDelegate AppDelegate =
IOSAppDelegate GetDelegate;
for (UIOpenURLContext* Context in URLContexts)
{
NSMutableDictionary* Options =
NSMutableDictionary dictionary;
if (Context.options.sourceApplication != nil)
{
Options
UIApplicationOpenURLOptionsSourceApplicationKey
= Context.options.sourceApplication;
}
if (Context.options.annotation != nil)
{
Options
UIApplicationOpenURLOptionsAnnotationKey
= Context.options.annotation;
}
Options
UIApplicationOpenURLOptionsOpenInPlaceKey
= @(Context.options.openInPlace);
AppDelegate handleOpenURL:Context.URL
options:Options;
}
}
<br />
**6. 종료 상태 URL callback 전달**
5단계에서 작성한 `scene:willConnectToSession:options:`의 마지막 부분이 다음과 같은지 확인해요. 아래 메서드를 새로 추가하지 않아요.
```objc
// Engine/Source/Runtime/ApplicationCore/Private/IOS/IOSSceneDelegate.cpp
- (void)scene:(UIScene *)scene
willConnectToSession:(UISceneSession *)session
options:(UISceneConnectionOptions *)connectionOptions
{
// window, FAppEntry::PreInit, splash screen과
// game thread 초기화
// ...
AppDelegate.CommandLineParseTimer = NSTimer
scheduledTimerWithTimeInterval:0.01f
target:AppDelegate
selector:@selector(NoUrlCommandLine)
userInfo:nil
repeats:NO;
endif
// 종료 상태로 전달된 URL callback 처리
if (connectionOptions.URLContexts.count > 0)
{
self scene:scene
openURLContexts:connectionOptions.URLContexts;
}
}
> [!warning]
> If you pass the URL before configuring the window and STOVE SDK initialization path, the object to handle the callback may not be ready.
**7. Rebuild Engine and iOS target**
After modifying the engine source, rebuild the engine so that changes to ApplicationCore, Launch, and UnrealBuildTool are reflected.
**8. Verify application results**
- In the final app, `Info.plist` is created in `UIApplicationSceneManifest`.
- `UISceneDelegateClassName` matches the actual `IOSSceneDelegate`.
- The URL callback received while the app is running is processed only once.
- The URL callback received while the app is closed is processed after engine initialization.
- Authentication is completed upon returning to the game after STOVE app-to-app authentication.
- Only the URL delegate matching the SDK version in use is called.
<br />
## iOS Firebase Analytics Payment Event Integration
---
<p style="color:#314158;font-family:'Spoqa Han Sans Neo';font-size:16px;font-weight:400;line-height:26px;letter-spacing:-0.48px;">This is how to manually integrate payment events into Firebase Analytics for games using StoveIAP2. <strong>iOS 15 or higher + StoreKit 2</strong> environment is the target.</p>
<br />
**Overview**
- In the iOS StoreKit 2 environment, Firebase Analytics' **automatic payment collection**(`event_origin = auto`) no longer works.
- Therefore, you must call `SGSPurchasesUpdatedNotification` directly inside the StoveIAP2 payment listener(`Analytics.logEvent("in_app_purchase", ...)`) callback.
- The transmission parameter set is compatible with the BigQuery columns that were automatically loaded by the existing StoreKit 1.
> [!warning]
> **iOS only — Wrap Android with platform guards**
> ㆍ Android currently supports automatic payment event collection. If a Firebase Android SDK that supports manual collection is distributed and applied in the future, it may be counted redundantly with the automatic collection.
> ㆍ In cross-platform engines (Unity/Unreal), please wrap it with iOS platform guards as shown in the example code below.
> [!info]
> **Note — Firebase Guidance**
> Starting from Google Analytics for Firebase **iOS SDK version 12.5.0**, `in_app_purchase` events will no longer be reserved. Manually logged `in_app_purchase` events (via SDK or Measurement Protocol) will be counted in addition to those automatically collected by the SDK.
> **Android will follow in the coming months.**
<br />
**Minimum Firebase SDK Version**
<p style="color:#314158;font-family:'Spoqa Han Sans Neo';font-size:16px;font-weight:400;line-height:26px;letter-spacing:-0.48px;">This is the version that supports manual transmission of the reserved event <code>in_app_purchase</code> in Firebase Analytics.</p>
<table style="width:100%;table-layout:fixed;border-collapse:collapse;border-top:1px solid rgba(0,0,0,0.08);border-bottom:1px solid rgba(0,0,0,0.08);">
<thead>
<tr>
<th style="padding:12px;width: 50%;text-align: left;font-weight: normal;color:#314158;border-bottom:1px solid rgba(0,0,0,0.08);background-color:#F8FAFC;">Platform</th>
<th style="padding:12px;width: 50%;text-align: left;font-weight: normal;color:#314158;border-bottom:1px solid rgba(0,0,0,0.08);background-color:#F8FAFC;">Minimum Version</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-size:14px;font-weight:400;line-height:26px;letter-spacing:-0.48px;">iOS Native (CocoaPods)</td>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-size:14px;font-weight:400;line-height:26px;letter-spacing:-0.48px;">12.5.0 or higher</td>
</tr>
<tr>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-size:14px;font-weight:400;line-height:26px;letter-spacing:-0.48px;">Unity</td>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-size:14px;font-weight:400;line-height:26px;letter-spacing:-0.48px;">13.6.0 or higher</td>
</tr>
<tr>
<td style="padding:12px;vertical-align:top;color:#314158;font-size:14px;font-weight:400;line-height:26px;letter-spacing:-0.48px;">C++ (Cocos2d-x, etc.)</td>
<td style="padding:12px;vertical-align:top;color:#314158;font-size:14px;font-weight:400;line-height:26px;letter-spacing:-0.48px;">13.3.0 or higher</td>
</tr>
</tbody>
</table>
> [!info]
> **Firebase Official Documentation (Must Read)**
> ㆍ Please also check the Firebase iOS In-App Purchase Measurement documentation. [Firebase iOS 인앱 구매 측정](https://firebase.google.com/docs/analytics/ios/measure-in-app-purchases)
<br />
**Transmission Parameters — Required**
<p style="color:#314158;font-family:'Spoqa Han Sans Neo';font-size:16px;font-weight:400;line-height:26px;letter-spacing:-0.48px;">These are the parameters to fill in when calling <code>logEvent("in_app_purchase", ...)</code> in the payment listener callback. Transmit them using the keys, types, and units in the table below exactly as they are. They are in the same format as the columns that were automatically collected in the existing StoreKit 1.</p>
<table style="width:100%;table-layout:fixed;border-collapse:collapse;border-top:1px solid rgba(0,0,0,0.08);border-bottom:1px solid rgba(0,0,0,0.08);">
<thead>
<tr>
<th style="padding:12px;width: 16%;text-align: left;font-weight: normal;color:#314158;border-bottom:1px solid rgba(0,0,0,0.08);background-color:#F8FAFC;">Firebase Key</th>
<th style="padding:12px;width: 12%;text-align: left;font-weight: normal;color:#314158;border-bottom:1px solid rgba(0,0,0,0.08);background-color:#F8FAFC;">Data Type</th>
<th style="padding:12px;width: 14%;text-align: left;font-weight: normal;color:#314158;border-bottom:1px solid rgba(0,0,0,0.08);background-color:#F8FAFC;">Example Value</th>
<th style="padding:12px;width: 34%;text-align: left;font-weight: normal;color:#314158;border-bottom:1px solid rgba(0,0,0,0.08);background-color:#F8FAFC;">product Object Field</th>
<th style="padding:12px;width: 24%;text-align: left;font-weight: normal;color:#314158;border-bottom:1px solid rgba(0,0,0,0.08);background-color:#F8FAFC;">BigQuery Stored Value</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-weight:400;line-height:26px;letter-spacing:-0.48px;font-family: monospace;font-size: 0.9em;">product_id</td>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-size:14px;font-weight:400;line-height:26px;letter-spacing:-0.48px;">string</td>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-weight:400;line-height:26px;letter-spacing:-0.48px;font-family: monospace;font-size: 0.9em;">"item_001"</td>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-weight:400;line-height:26px;letter-spacing:-0.48px;font-family: monospace;font-size: 0.9em;">product.productIdentifier</td>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-size:14px;font-weight:400;line-height:26px;letter-spacing:-0.48px;">Same</td>
</tr>
<tr>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-weight:400;line-height:26px;letter-spacing:-0.48px;font-family: monospace;font-size: 0.9em;">product_name</td>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-size:14px;font-weight:400;line-height:26px;letter-spacing:-0.48px;">string</td>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-size:14px;font-weight:400;line-height:26px;letter-spacing:-0.48px;">"1000 Yen Item"</td>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-weight:400;line-height:26px;letter-spacing:-0.48px;font-family: monospace;font-size: 0.9em;">product.localizedTitle</td>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-size:14px;font-weight:400;line-height:26px;letter-spacing:-0.48px;">Same</td>
</tr>
<tr>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-weight:400;line-height:26px;letter-spacing:-0.48px;font-family: monospace;font-size: 0.9em;">currency</td>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-size:14px;font-weight:400;line-height:26px;letter-spacing:-0.48px;">string</td>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-weight:400;line-height:26px;letter-spacing:-0.48px;font-family: monospace;font-size: 0.9em;">"USD"</td>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-weight:400;line-height:26px;letter-spacing:-0.48px;font-family: monospace;font-size: 0.9em;">product.priceCurrencyCode</td>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-size:14px;font-weight:400;line-height:26px;letter-spacing:-0.48px;">Same</td>
</tr>
<tr>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-weight:400;line-height:26px;letter-spacing:-0.48px;font-family: monospace;font-size: 0.9em;">price</td>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-size:14px;font-weight:700;line-height:26px;letter-spacing:-0.48px;">double</td>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-weight:400;line-height:26px;letter-spacing:-0.48px;font-family: monospace;font-size: 0.9em;">0.99</td>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-weight:400;line-height:26px;letter-spacing:-0.48px;font-family: monospace;font-size: 0.9em;">product.priceAmountMicros / 1_000_000.0</td>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-size:14px;font-weight:400;line-height:26px;letter-spacing:-0.48px;"><code>990000</code> (Firebase backend converts by ×1,000,000)</td>
</tr>
<tr>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-weight:400;line-height:26px;letter-spacing:-0.48px;font-family: monospace;font-size: 0.9em;">value</td>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-size:14px;font-weight:700;line-height:26px;letter-spacing:-0.48px;">double</td>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-weight:400;line-height:26px;letter-spacing:-0.48px;font-family: monospace;font-size: 0.9em;">0.99</td>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-weight:400;line-height:26px;letter-spacing:-0.48px;font-family: monospace;font-size: 0.9em;">product.priceAmountMicros / 1_000_000.0</td>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-size:14px;font-weight:400;line-height:26px;letter-spacing:-0.48px;"><code>990000</code> (Firebase backend converts by ×1,000,000)</td>
</tr>
<tr>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-weight:400;line-height:26px;letter-spacing:-0.48px;font-family: monospace;font-size: 0.9em;">quantity</td>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-size:14px;font-weight:400;line-height:26px;letter-spacing:-0.48px;">long</td>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-weight:400;line-height:26px;letter-spacing:-0.48px;font-family: monospace;font-size: 0.9em;">1</td>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-size:14px;font-weight:400;line-height:26px;letter-spacing:-0.48px;">Fixed (StoveIAP2 is single-item payment)</td>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-weight:400;line-height:26px;letter-spacing:-0.48px;font-family: monospace;font-size: 0.9em;">1</td>
</tr>
<tr>
<td style="padding:12px;vertical-align:top;color:#314158;font-weight:400;line-height:26px;letter-spacing:-0.48px;font-family: monospace;font-size: 0.9em;">validated</td>
<td style="padding:12px;vertical-align:top;color:#314158;font-size:14px;font-weight:400;line-height:26px;letter-spacing:-0.48px;">long</td>
<td style="padding:12px;vertical-align:top;color:#314158;font-weight:400;line-height:26px;letter-spacing:-0.48px;font-family: monospace;font-size: 0.9em;">1</td>
<td style="padding:12px;vertical-align:top;color:#314158;font-size:14px;font-weight:400;line-height:26px;letter-spacing:-0.48px;">Fixed (listener is called only upon successful validation)</td>
<td style="padding:12px;vertical-align:top;color:#314158;font-weight:400;line-height:26px;letter-spacing:-0.48px;font-family: monospace;font-size: 0.9em;">1</td>
</tr>
</tbody>
</table>
> [!warning]
> **Unit Caution (Important)**
> ㆍ Reserved event `in_app_purchase`'s `value`·`price` is automatically multiplied by 1,000,000 by the Firebase backend and stored in BigQuery (micros integer). Therefore, you must send it as a Double currency unit (e.g., $0.99 → `0.99`) to match the `990000` value of the existing automatic transmission format.
> ㆍ If you send an integer (`priceAmountMicros`) as is, it will be multiplied by 1,000,000 again, resulting in an `990000` overload. `990000000000` It may look like it "went in" without `firebase_error`, but the revenue amount will be distorted by 1 million times, so you must send it in Double units.
<br />
**No Transmission Required — Automatically Assigned by Firebase**
- System parameters such as session/screen information are automatically assigned by the Firebase SDK, so do not include them in the transmission code.
- Event names must maintain `in_app_purchase`.
- It is recommended not to add custom parameters (`content_id`, `order_id`, `customer_user_id`, etc.) to the `in_app_purchase` event. If you need your own game company analysis data, please separate and send it with a different event name (e.g., `stove_purchase_detail`).
<br />
**StoveIAP2 Listener Payload Reference (`Product`)
<p style="color:#314158;font-family:'Spoqa Han Sans Neo';font-size:16px;font-weight:400;line-height:26px;letter-spacing:-0.48px;">Call <code>logEvent</code> only when the <code>result</code> of the listener callback is in a success state. Use only the <code>product</code> field for Firebase transmission.</p>
<table style="width:100%;table-layout:fixed;border-collapse:collapse;border-top:1px solid rgba(0,0,0,0.08);border-bottom:1px solid rgba(0,0,0,0.08);">
<thead>
<tr>
<th style="padding:12px;width: 26%;text-align: left;font-weight: normal;color:#314158;border-bottom:1px solid rgba(0,0,0,0.08);background-color:#F8FAFC;">Field</th>
<th style="padding:12px;width: 12%;text-align: left;font-weight: normal;color:#314158;border-bottom:1px solid rgba(0,0,0,0.08);background-color:#F8FAFC;">Type</th>
<th style="padding:12px;width: 30%;text-align: left;font-weight: normal;color:#314158;border-bottom:1px solid rgba(0,0,0,0.08);background-color:#F8FAFC;">Usage</th>
<th style="padding:12px;width: 32%;text-align: left;font-weight: normal;color:#314158;border-bottom:1px solid rgba(0,0,0,0.08);background-color:#F8FAFC;">Note</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-weight:400;line-height:26px;letter-spacing:-0.48px;font-family: monospace;font-size: 0.9em;">productIdentifier</td>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-size:14px;font-weight:400;line-height:26px;letter-spacing:-0.48px;">String</td>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-size:14px;font-weight:400;line-height:26px;letter-spacing:-0.48px;">Firebase <code>product_id</code></td>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-size:14px;font-weight:400;line-height:26px;letter-spacing:-0.48px;">—</td>
</tr>
<tr>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-weight:400;line-height:26px;letter-spacing:-0.48px;font-family: monospace;font-size: 0.9em;">localizedTitle</td>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-size:14px;font-weight:400;line-height:26px;letter-spacing:-0.48px;">String</td>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-size:14px;font-weight:400;line-height:26px;letter-spacing:-0.48px;">Firebase <code>product_name</code></td>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-size:14px;font-weight:400;line-height:26px;letter-spacing:-0.48px;">—</td>
</tr>
<tr>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-weight:400;line-height:26px;letter-spacing:-0.48px;font-family: monospace;font-size: 0.9em;">priceAmountMicros</td>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-size:14px;font-weight:400;line-height:26px;letter-spacing:-0.48px;">Double</td>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-size:14px;font-weight:400;line-height:26px;letter-spacing:-0.48px;">Firebase <code>price</code> and <code>value</code></td>
<td style="padding:12px;vertical-align:top;border-bottom:1px solid rgba(0,0,0,0.08);color:#314158;font-size:14px;font-weight:400;line-height:26px;letter-spacing:-0.48px;">⚠️ Note the unit (÷1,000,000 required)</td>
</tr>
<tr>
<td style="padding:12px;vertical-align:top;color:#314158;font-weight:400;line-height:26px;letter-spacing:-0.48px;font-family: monospace;font-size: 0.9em;">priceCurrencyCode</td>
<td style="padding:12px;vertical-align:top;color:#314158;font-size:14px;font-weight:400;line-height:26px;letter-spacing:-0.48px;">String</td>
<td style="padding:12px;vertical-align:top;color:#314158;font-size:14px;font-weight:400;line-height:26px;letter-spacing:-0.48px;">Firebase <code>currency</code></td>
<td style="padding:12px;vertical-align:top;color:#314158;font-size:14px;font-weight:400;line-height:26px;letter-spacing:-0.48px;">—</td>
</tr>
</tbody>
</table>
<br />
**Integration Code by Engine**
<p style="color:#314158;font-family:'Spoqa Han Sans Neo';font-size:16px;font-weight:400;line-height:26px;letter-spacing:-0.48px;">You simply add the Firebase transmission block within the payment success branch of the StoveIAP2 payment listener that is already registered and running. There is no need to rewrite the listener registration itself or the logic for handling payment success/failure branches. The additional flow is the same for all 3 engines — enter payment success branch → <code>product</code> extract value from field → configure Firebase parameters → <code>Analytics.logEvent("in_app_purchase", params)</code> call.</p>
> [!info]
> **Scope of Work**
> ㆍ Only copy and add the block between `// --------------- START ---------------` ~ `// --------------- END ---------------` in the code below to your existing listener success branch.
> ㆍ The outer listener/conditional branches are provided to show the location of existing code and do not need to be rewritten or modified.
=== "iOS Native (Obj-C)"
Swift projects can also subscribe using the same `NotificationCenter` API. Add the block below within the payment success branch of your existing `SGSPurchasesUpdatedNotification` observer callback.
objc
#import <FirebaseAnalytics/FirebaseAnalytics.h>
#import <StoveIAP2/StoveIAP2.h>
- (void)onSGSPurchasesUpdated:(NSNotification *)notification
{
SGSResult *result = [notification.userInfo objectForKey:@"result"];
if ([result isSuccessful]) {
// Game's own payment success processing (item delivery, UI update, etc.)
// ...
// --------------- START: Firebase Payment Event Transmission ---------------
SGSIAPProduct *product = [notification.userInfo objectForKey:@"product"];
// Unit: Since Firebase's reserved event expects value/price to be converted by ×1,000,000,
// send as a Double in the actual currency unit
double priceAmount = product.priceAmountMicros / 1000000.0;
NSDictionary *params = @{
@"product_id": product.productIdentifier ?: @"",
@"product_name": product.localizedTitle ?: @"",
@"currency": product.priceCurrencyCode ?: @"",
@"price": @(priceAmount),
@"value": @(priceAmount),
@"quantity": @1,
@"validated": @1
};
[FIRAnalytics logEventWithName:@"in_app_purchase" parameters:params];
// --------------- END ---------------
}
}
📖 Firebase iOS 이벤트 로깅 공식 문서: Log events
=== "Unity (C#)"
Stove SDK Unity 플러그인의 진입점은 Stove.StoveSDK.IAP 클래스이고, 리스너 시그니처는 IAP.SetListener(Action<Result, IAPProduct, IAPPurchaseDetail>) 예요. 기존 IAP.SetListener 콜백의 결제 성공 분기 안에 아래 블록을 추가해요.
using Firebase.Analytics;
using Stove.StoveSDK;
IAP.SetListener((result, product, purchaseDetail) =>
{
if (result.IsSuccessful)
{
// Handle in-game purchase success (grant items, update UI, etc.)
// ...
// --------------- START: Send Firebase purchase event ---------------
#if UNITY_IOS
// Unit: Firebase converts the value/price of reserved events by ×1,000,000,
// so send as a Double in the actual currency unit.
double priceAmount = product.PriceAmountMicros / 1_000_000.0;
var fbParams = new Parameter[] {
new Parameter("product_id", product.ProductIdentifier),
new Parameter("product_name", product.LocalizedTitle),
new Parameter("currency", product.PriceCurrencyCode),
new Parameter("price", priceAmount),
new Parameter("value", priceAmount),
new Parameter("quantity", 1L),
new Parameter("validated", 1L),
};
FirebaseAnalytics.LogEvent("in_app_purchase", fbParams);
#endif
// --------------- END ---------------
}
});
📖 Firebase Unity 이벤트 로깅 공식 문서: Log events
=== "Unreal (C++)"
Stove SDK Unreal 플러그인(StoveIAP)은 stove::IAP::SetListener(TFunction<void(Result, IAPProduct, IAPPurchaseDetail)>)로 리스너를 등록해요. Firebase C++ SDK는 파라미터 문자열로 const char*를 받으므로 FString → UTF-8 변환이 필요하고(TCHAR_TO_UTF8(*fstr)), 변환된 버퍼는 LogEvent 호출이 끝날 때까지 유효해야 하므로 로컬 std::string에 보관해요.
#include "IAP.h"
#include "IAPProduct.h"
#include "IAPPurchaseDetail.h"
#include "Result.h"
#include "firebase/analytics.h"
#include <vector>
#include <string>
stove::IAP::SetListener(
[](stove::Result result,
stove::IAPProduct product,
stove::IAPPurchaseDetail /*purchaseDetail*/)
{
if (result.IsSuccessful())
{
// Handle in-game purchase success (grant items, update UI, etc.)
// ...
// --------------- START: Send Firebase purchase event ---------------
#if PLATFORM_IOS
using namespace firebase::analytics;
// Unit: Firebase converts the value/price of reserved events by ×1,000,000,
// so send as a Double in the actual currency unit.
const double priceAmount = product.priceAmountMicros / 1'000'000.0;
// FString → const char* conversion buffer must remain valid for the duration of the parameter's lifetime
const std::string productId = TCHAR_TO_UTF8(*product.productIdentifier);
const std::string productName = TCHAR_TO_UTF8(*product.localizedTitle);
const std::string currency = TCHAR_TO_UTF8(*product.priceCurrencyCode);
const Parameter params[] = {
Parameter("product_id", productId.c_str()),
Parameter("product_name", productName.c_str()),
Parameter("currency", currency.c_str()),
Parameter("price", priceAmount),
Parameter("value", priceAmount),
Parameter("quantity", int64_t(1)),
Parameter("validated", int64_t(1)),
};
LogEvent("in_app_purchase", params, sizeof(params) / sizeof(params[0]));
#endif
// --------------- END ---------------
}
});
📖 Firebase C++ 이벤트 로깅 공식 문서: Log events
=== "기타 C++ (Cocos2d-x 등)"
iOS 네이티브 브릿지를 직접 구성해서, Objective-C 레벨에서 SGSPurchasesUpdatedNotification을 관찰하고 필요한 필드를 C++ 핸들러로 넘겨 이벤트를 로깅해요.
Objective-C 브릿지 — onSGSPurchasesUpdated: 콜백에서 Firebase 전송 대신 C++ 핸들러를 호출해요.
// SGSBridge.mm — e.g., declare C interface named ForwardPurchaseToCpp
extern "C" void ForwardPurchaseToCpp(const char *productId,
const char *productName,
const char *currencyCode,
double priceAmountMicros);
- (void)onSGSPurchasesUpdated:(NSNotification *)notification
{
SGSResult *result = notification.userInfo objectForKey:@"result";
if (result isSuccessful) {
// Handle in-game purchase success (grant items, update UI, etc.)
// ...
// --------------- START: Forward to C++ handler ---------------
SGSIAPProduct *product = notification.userInfo objectForKey:@"product";
ForwardPurchaseToCpp(
product.productIdentifier UTF8String,
product.localizedTitle UTF8String,
product.priceCurrencyCode UTF8String,
product.priceAmountMicros
);
// --------------- END ---------------
}
}
C++ 핸들러 — 브릿지에서 전달된 값을 받아 Firebase C++ SDK로 전송해요.
```cpp
#include "firebase/analytics.h"
extern "C" void ForwardPurchaseToCpp(const char *productId,
const char *productName,
const char *currencyCode,
double priceAmountMicros)
{
using namespace firebase::analytics;
// Unit: Since Firebase converts the value/price of reserved events by ×1,000,000,
// transmit the actual currency unit as a Double
const double priceAmount = priceAmountMicros / 1'000'000.0;
const Parameter params[] = {
Parameter("product_id", productId),
Parameter("product_name", productName),
Parameter("currency", currencyCode),
Parameter("price", priceAmount),
Parameter("value", priceAmount),
Parameter("quantity", int64_t(1)),
Parameter("validated", int64_t(1)),
};
LogEvent("in_app_purchase", params, sizeof(params) / sizeof(params[0]));
}
📌 The
const char*pointer passed by Obj-C may not have a guaranteed lifetime after the Obj-C method returns. If you need to use the values asynchronously in a C++ handler, copy them tostd::stringimmediately. As shown in the example above, ifLogEventfinishes within a synchronous call, it is safe to use as is.
Supported Engine Summary
| Engine | Listener Signature | Remarks |
|---|---|---|
| iOS Native (Obj-C / Swift) | Observe SGSPurchasesUpdatedNotification in NotificationCenter | Directly call Firebase iOS SDK |
| Unity | IAP.SetListener(Action |
Caution: Firebase Unity SDK ↔ iOS CocoaPods version mapping |
| Unreal (C++) | stove::IAP::SetListener(TFunction |
FString → UTF-8 conversion required |
| Cocos2d-x / Other C++ | Configure iOS native bridge directly | — |
Integration Checklist
- Firebase SDK Version Update
- iOS Native: CocoaPods
12.5.0or higher - Unity:
13.6.0or higher (internal iOS Pods12.6.0or higher automatically installed) - C++ (Cocos2d-x, etc.): Firebase C++
13.3.0or higher (internal iOS Pods12.6.0or higher)
- iOS Native: CocoaPods
- Add engine-specific integration code examples to the existing listener success branch
Verify Payment Data Integration
After integration, you can check in Firebase DebugView if the in_app_purchase event is being tracked in real-time with the intended parameters.
- Enable DebugView in the test build according to the official guide
- Perform test payment (Apple Sandbox / TestFlight)
- Check in Firebase Console Analytics → DebugView for
in_app_purchaseevent occurrence and required parameter exposure
!info
DebugView Note
ㆍ DebugView allows real-time verification of manually sent events (event_origin = app).
ㆍ Firebase DebugView 공식 가이드
Reference
- Firebase iOS 인앱 구매 측정 — Document defining parameter specifications, unit conversions, and aggregation behavior
- Official documentation for engine-specific event logging — iOS · Unity · C++
- Firebase SDK Release Notes — iOS · Unity · C++
Module Configuration
The STOVE SDK is provided as modular components by function. From 3.0.0, basic features are integrated into a single Stove module, and you only add the necessary modules for Authentication Provider, Payment, Push, and Game Log.
Module Classification
Based on 4.0.0. The module structure is the same as 3.0.0, and all modules must be matched to 4.0.0. The module column follows the iOS pod / Android coordinates order. Unity packages and Unreal plugins are Stove · StoveProviders · StoveIAP · StovePush · StoveGameLog are provided.
| Category | Module | Role |
|---|---|---|
| Basic (Required) | Stove / stove | SDK initialization/environment settings, login/token management, integrated login UI, WebView UI for pop-ups/notices/community, log collection (Integration of Base, Log, Auth, AuthUI, and View from 2.9.x) |
| Authentication Provider | StoveProviders / stove-providers | Google, Apple, Facebook, Naver, Line, Steam, and Google Play Games login (Integration of Auth* Provider modules from 2.9.x) |
| Payment | iOS: StoveIAP2 Android: stove-iap + stove-iap-google / stove-iap-huawei / stove-iap-onestore |
In-app payment. iOS is based on StoreKit 2; for Android, select only the market modules you use. |
| Push | iOS: StovePush (+ StovePushExtension) Android: stove-push + stove-push-firebase / stove-push-huawei |
Receiving and processing push notifications. The notification service extension is only required if using iOS Rich Push. |
| Game Log (Optional) | StoveGameLog / stove-gamelog | Game log transmission. Add only for games that use game logs. |
!info
Cannot be used with 2.9.x modules
ㆍ The 2.9.xGamingServiceshas been removed in 3.0.0. The GPG User ID feature is included inStoveProviders.
ㆍ Please refer to the 3.0.0 업그레이드 안내 for the full correspondence table with 2.9.x modules.
!info
How to check module version information
ㆍ The SDK module version applied to the client can be checked in JSON format by callingLog.getSDKVersions().
ㆍ It is used for QA build verification, debugging, and displaying in-game settings screens. For more details, please refer to Feature Guide > Game Information.
External Module Information by Version
- External modules such as 3rd party Authentication Providers, Push (Firebase), and Payment (StoreKit2) have different compatible external library versions depending on the SDK version.
- When adding external modules, please check the SDK release notes for the external library versions compatible with the STOVE SDK version you are using.
Multi-platform Considerations
For multi-platform games that service both PC and mobile, both platform SDKs must be applied. Here are additional points to check.
SDK Application
- PC and Mobile SDKs are downloaded and applied separately
- Mobile build: STOVE Mobile SDK (Android / iOS)
- PC build: STOVE PC SDK (PCSDK3)
- Common Identifier Consistency
- Game ID and App ID are used identically across the entire multi-platform game.
- While package names and bundle IDs differ by platform, STOVE identifier keys must maintain consistency.
- Environment Synchronization
- The environments (Live/Sandbox) of PC/mobile builds must be matched.
- Mismatched configurations during QA, such as PC = Sandbox and mobile = Live, lead to user identification and payment verification errors.
User Identification
- MemberNo: STOVE platform member identifier. The same MemberNo is used for the same member on both PC and mobile.
- GUID: Game character identifier. Refer to the character linkage guide when sharing character information between PC and mobile in multi-platform games.
- Member Type Differences: Mobile supports both full members and guests, while PC supports only full members (Guest login is not available on PC).
Build Branching Recommendations
- Branching by Build Environment: Separate PC/mobile SDK calls in the client code using compilation branches (
#if UNITY_ANDROID, etc.). - Common Business Logic Abstraction: It is recommended to abstract common flows such as authentication and payment into interfaces and then distinguish them by platform-specific implementations.
- Developer Center usage/Smilegate publishing game related: stove.developers@smilegate.com
- STOVE Store entry/STOVE Studio related: store.support@smilegate.com