Starting with iOS 13, Apple introduced the
UISceneand
UISceneDelegateAPIs as part of a significant update to the application lifecycle model. Previously, all state transitions were managed exclusively through
UIApplicationDelegateat the app level. With multi-window support on iPad and enhanced lifecycle management on iPhone, Apple moved to a scene-based architecture, where each scene represents a distinct instance of the app's UI and is managed independently.
To align with these modern app architectures, the Strategy SDK now supports
UISceneDelegate.
The template Xcode project included in the Strategy iOS Library is preconfigured with an internal scene delegate class named
MSIDefaultSceneDelegate. However, developers can customize behavior by providing their own delegate. This is typically done by extending the internal scene delegate class and overriding relevant methods defined in the
UIWindowSceneDelegateprotocol to add functionality during app launch and state transitions.
StrategyLibrary.xcodeproj file.
CustomSceneDelegate.


CustomSceneDelegate). Select MSIDefaultSceneDelegate from the Subclass Of drop-down-list. Set the Language to Objective-C. Click Next.

StrategyMobileand that both
StrategyMobileIPhoneand
StrategyMobileIPadare selected as Targets. Click Create.

#import <StrategyMobileSDK/MSIDefaultSceneDelegate.h>


Info_IPad.plistand
Info_IPhone.plistby replacing
MSIDefaultSceneDelegatewith your scene delegate class name (for example,
CustomSceneDelegate).
