diff --git a/src/Plugins/AppleAppLovinPlugin/AppleAppLovinApplicationDelegate.h b/src/Plugins/AppleAppLovinPlugin/AppleAppLovinApplicationDelegate.h index 882d12af70..c973eb7a36 100644 --- a/src/Plugins/AppleAppLovinPlugin/AppleAppLovinApplicationDelegate.h +++ b/src/Plugins/AppleAppLovinPlugin/AppleAppLovinApplicationDelegate.h @@ -1,5 +1,12 @@ #import "Environment/iOS/UIPluginApplicationDelegateInterface.h" +#import + @interface AppleAppLovinApplicationDelegate : NSObject ++ (ALSdk * _Nonnull) AppLovinSdk; ++ (void) setAppLovinSdk:(ALSdk * _Nonnull) value; + @end + + diff --git a/src/Plugins/AppleAppLovinPlugin/AppleAppLovinApplicationDelegate.mm b/src/Plugins/AppleAppLovinPlugin/AppleAppLovinApplicationDelegate.mm index 1a9b5a2973..53b73b0d2e 100644 --- a/src/Plugins/AppleAppLovinPlugin/AppleAppLovinApplicationDelegate.mm +++ b/src/Plugins/AppleAppLovinPlugin/AppleAppLovinApplicationDelegate.mm @@ -2,20 +2,31 @@ #include "Environment/Apple/AppleDetail.h" -#import -#import - @implementation AppleAppLovinApplicationDelegate +static ALSdk * AppLovinSdk; + +#define PLUGIN_BUNDLE_NAME @"MengineAppleAppLovinPlugin" + ++ (ALSdk * _Nonnull) AppLovinSdk { + return AppLovinSdk; +} + ++ (void) setAppLovinSdk:(ALSdk * _Nonnull) value { + AppLovinSdk = value; +} + #pragma mark - UIPluginApplicationDelegateInterface - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - if( Mengine::Helper::AppleHasBundlePluginConfig(@"MengineAppleAppLovinPlugin") == NO ) + if( Mengine::Helper::AppleHasBundlePluginConfig(PLUGIN_BUNDLE_NAME) == NO ) { + NSLog(@"AppLovin plugin not found bundle config [%@]", PLUGIN_BUNDLE_NAME); + return NO; } - NSString * MengineAppleAppLovinPlugin_IsAgeRestrictedUser = Mengine::Helper::AppleGetBundlePluginConfigString(@"MengineAppleAppLovinPlugin", @"IsAgeRestrictedUser", @"UNKNOWN"); + NSString * MengineAppleAppLovinPlugin_IsAgeRestrictedUser = Mengine::Helper::AppleGetBundlePluginConfigString(PLUGIN_BUNDLE_NAME, @"IsAgeRestrictedUser", @"UNKNOWN"); if( [MengineAppleAppLovinPlugin_IsAgeRestrictedUser caseInsensitiveCompare:@"YES"] == NSOrderedSame ) { @@ -31,10 +42,12 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( } else { + NSLog(@"AppLovin plugin invalid config [%@.IsAgeRestrictedUser] value %@ [YES|NO|UNKNOWN]", PLUGIN_BUNDLE_NAME, MengineAppleAppLovinPlugin_IsAgeRestrictedUser); + return NO; } - NSString * MengineAppleAppLovinPlugin_CCPA = Mengine::Helper::AppleGetBundlePluginConfigString(@"MengineAppleAppLovinPlugin", @"CCPA", @"UNKNOWN"); + NSString * MengineAppleAppLovinPlugin_CCPA = Mengine::Helper::AppleGetBundlePluginConfigString(PLUGIN_BUNDLE_NAME, @"CCPA", @"UNKNOWN"); if( [MengineAppleAppLovinPlugin_CCPA caseInsensitiveCompare:@"YES"] == NSOrderedSame ) { @@ -50,28 +63,39 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( } else { + NSLog(@"AppLovin plugin invalid config [%@.CCPA] value %@ [YES|NO|UNKNOWN]", PLUGIN_BUNDLE_NAME, MengineAppleAppLovinPlugin_CCPA); + return NO; } ALSdkSettings * settings = [[ALSdkSettings alloc] init]; - BOOL MengineAppleAppLovinPlugin_Verbose = Mengine::Helper::AppleGetBundlePluginConfigBoolean(@"MengineAppleAppLovinPlugin", @"Verbose", NO); + BOOL MengineAppleAppLovinPlugin_Verbose = Mengine::Helper::AppleGetBundlePluginConfigBoolean(PLUGIN_BUNDLE_NAME, @"Verbose", NO); if( MengineAppleAppLovinPlugin_Verbose == YES ) { settings.verboseLoggingEnabled = YES; } - BOOL MengineAppleAppLovinPlugin_TermsAndPrivacyPolicyFlow = Mengine::Helper::AppleGetBundlePluginConfigBoolean(@"MengineAppleAppLovinPlugin", @"TermsAndPrivacyPolicyFlow", NO); + BOOL MengineAppleAppLovinPlugin_TermsAndPrivacyPolicyFlow = Mengine::Helper::AppleGetBundlePluginConfigBoolean(PLUGIN_BUNDLE_NAME, @"TermsAndPrivacyPolicyFlow", NO); if( MengineAppleAppLovinPlugin_TermsAndPrivacyPolicyFlow == YES ) { - NSString * MengineAppleAppLovinPlugin_PrivacyPolicyURL = Mengine::Helper::AppleGetBundlePluginConfigString(@"MengineAppleAppLovinPlugin", @"PrivacyPolicyURL", nil); + NSString * MengineAppleAppLovinPlugin_PrivacyPolicyURL = Mengine::Helper::AppleGetBundlePluginConfigString(PLUGIN_BUNDLE_NAME, @"PrivacyPolicyURL", nil); + + NSString * MengineAppleAppLovinPlugin_TermsOfServiceURL = Mengine::Helper::AppleGetBundlePluginConfigString(PLUGIN_BUNDLE_NAME, @"TermsOfServiceURL", nil); - NSString * MengineAppleAppLovinPlugin_TermsOfServiceURL = Mengine::Helper::AppleGetBundlePluginConfigString(@"MengineAppleAppLovinPlugin", @"TermsOfServiceURL", nil); + if( MengineAppleAppLovinPlugin_PrivacyPolicyURL == nil ) + { + NSLog(@"AppLovin plugin missed required config [%@.PrivacyPolicyURL]", PLUGIN_BUNDLE_NAME); + + return NO; + } - if( MengineAppleAppLovinPlugin_PrivacyPolicyURL == nil || MengineAppleAppLovinPlugin_TermsOfServiceURL == nil ) + if( MengineAppleAppLovinPlugin_TermsOfServiceURL == nil ) { + NSLog(@"AppLovin plugin missed required config [%@.TermsOfServiceURL]", PLUGIN_BUNDLE_NAME); + return NO; } @@ -80,10 +104,12 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( settings.termsAndPrivacyPolicyFlowSettings.termsOfServiceURL = [NSURL URLWithString: MengineAppleAppLovinPlugin_TermsOfServiceURL]; } - NSString * MengineAppleAppLovinPlugin_SdkKey = Mengine::Helper::AppleGetBundlePluginConfigString(@"MengineAppleAppLovinPlugin", @"SdkKey", nil); + NSString * MengineAppleAppLovinPlugin_SdkKey = Mengine::Helper::AppleGetBundlePluginConfigString(PLUGIN_BUNDLE_NAME, @"SdkKey", nil); if( MengineAppleAppLovinPlugin_SdkKey == nil ) { + NSLog(@"AppLovin plugin missed required config [%@.SdkKey]", PLUGIN_BUNDLE_NAME); + return NO; } @@ -91,9 +117,21 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( appLovinSdk.mediationProvider = @"max"; - [[ALSdk shared] initializeSdkWithCompletionHandler:^(ALSdkConfiguration *configuration) { + [appLovinSdk initializeSdkWithCompletionHandler:^(ALSdkConfiguration *configuration) { + ALConsentFlowUserGeography consentFlowUserGeography = configuration.consentFlowUserGeography; + NSString * countryCode = configuration.countryCode; + ALAppTrackingTransparencyStatus appTrackingTransparencyStatus = configuration.appTrackingTransparencyStatus; + BOOL testModeEnabled = configuration.testModeEnabled; + + NSLog(@"AppLovin plugin initialize complete"); + NSLog(@"consent flow user geography: %ld", consentFlowUserGeography); + NSLog(@"country code: %@", countryCode); + NSLog(@"app tracking transparency status: %ld", appTrackingTransparencyStatus); + NSLog(@"test mode enabled: %d", testModeEnabled); }]; + AppleAppLovinApplicationDelegate.AppLovinSdk = appLovinSdk; + return YES; } diff --git a/src/Plugins/AppleAppLovinPlugin/AppleAppLovinBannerDelegate.h b/src/Plugins/AppleAppLovinPlugin/AppleAppLovinBannerDelegate.h index 60785e015b..d2fde8996a 100644 --- a/src/Plugins/AppleAppLovinPlugin/AppleAppLovinBannerDelegate.h +++ b/src/Plugins/AppleAppLovinPlugin/AppleAppLovinBannerDelegate.h @@ -11,12 +11,12 @@ @interface AppleAppLovinBannerDelegate : AppleAppLovinBaseDelegate -- (instancetype _Nonnull) initWithAdUnitIdentifier:(NSString * _Nonnull) adUnitId - placement:(NSString * _Nonnull) placement - amazonSlotId:(NSString * _Nullable) amazonSlotId - rect:(CGRect) rect +- (instancetype _Nullable) initWithAdUnitIdentifier:(NSString * _Nonnull) adUnitId + placement:(NSString * _Nonnull) placement + amazonSlotId:(NSString * _Nullable) amazonSlotId + rect:(CGRect) rect provider:(const Mengine::AppleAppLovinBannerProviderInterfacePtr &) provider - analytics:(AppleAppLovinAnalyticsService * _Nonnull) analytics; + analytics:(AppleAppLovinAnalyticsService * _Nonnull) analytics; - (void) show; - (void) hide; diff --git a/src/Plugins/AppleAppLovinPlugin/AppleAppLovinBannerDelegate.mm b/src/Plugins/AppleAppLovinPlugin/AppleAppLovinBannerDelegate.mm index 59a125fa73..a5063e9a7e 100644 --- a/src/Plugins/AppleAppLovinPlugin/AppleAppLovinBannerDelegate.mm +++ b/src/Plugins/AppleAppLovinPlugin/AppleAppLovinBannerDelegate.mm @@ -5,21 +5,36 @@ #include "Environment/iOS/iOSDetail.h" +#include "AppleAppLovinApplicationDelegate.h" + #include "Kernel/Logger.h" @implementation AppleAppLovinBannerDelegate -- (instancetype _Nonnull) initWithAdUnitIdentifier:(NSString * _Nonnull) adUnitId - placement:(NSString * _Nonnull) placement - amazonSlotId:(NSString * _Nullable) amazonSlotId - rect:(CGRect) rect - provider:(const Mengine::AppleAppLovinBannerProviderInterfacePtr &) provider - analytics:(AppleAppLovinAnalyticsService * _Nonnull) analytics { +- (instancetype _Nullable) initWithAdUnitIdentifier:(NSString * _Nonnull) adUnitId + placement:(NSString * _Nonnull) placement + amazonSlotId:(NSString * _Nullable) amazonSlotId + rect:(CGRect) rect + provider:(const Mengine::AppleAppLovinBannerProviderInterfacePtr &) provider + analytics:(AppleAppLovinAnalyticsService * _Nonnull) analytics { self = [super initWithAdUnitIdentifier:adUnitId adFormat:MAAdFormat.banner analytics:analytics]; self.m_provider = provider; - MAAdView * adView = [[MAAdView alloc] initWithAdUnitIdentifier:adUnitId]; + MAAdView * adView; + + @try { + adView = [[MAAdView alloc] initWithAdUnitIdentifier:adUnitId sdk:AppleAppLovinApplicationDelegate.AppLovinSdk]; + } @catch (NSException * ex) { + LOGGER_ERROR( "[Error] AppleAppLovinBannerDelegate invalid create MAAdView adUnitId: %s exception: %s [%s]" + , [adUnitId UTF8String] + , [ex.reason UTF8String] + , [ex.name UTF8String] + ); + + return nil; + } + [adView setPlacement:placement]; adView.delegate = self; diff --git a/src/Plugins/AppleAppLovinPlugin/AppleAppLovinBaseDelegate.h b/src/Plugins/AppleAppLovinPlugin/AppleAppLovinBaseDelegate.h index d3143e8cd9..193585dbb5 100644 --- a/src/Plugins/AppleAppLovinPlugin/AppleAppLovinBaseDelegate.h +++ b/src/Plugins/AppleAppLovinPlugin/AppleAppLovinBaseDelegate.h @@ -8,7 +8,7 @@ @interface AppleAppLovinBaseDelegate : NSObject -- (instancetype _Nonnull) initWithAdUnitIdentifier:(NSString * _Nonnull) adUnitId +- (instancetype _Nullable) initWithAdUnitIdentifier:(NSString * _Nonnull) adUnitId adFormat:(MAAdFormat * _Nonnull) adFormat analytics:(AppleAppLovinAnalyticsService * _Nonnull) analytics; diff --git a/src/Plugins/AppleAppLovinPlugin/AppleAppLovinBaseDelegate.mm b/src/Plugins/AppleAppLovinPlugin/AppleAppLovinBaseDelegate.mm index e31a5f4d6e..dd78f69df8 100644 --- a/src/Plugins/AppleAppLovinPlugin/AppleAppLovinBaseDelegate.mm +++ b/src/Plugins/AppleAppLovinPlugin/AppleAppLovinBaseDelegate.mm @@ -4,7 +4,7 @@ @implementation AppleAppLovinBaseDelegate -- (instancetype _Nonnull) initWithAdUnitIdentifier:(NSString * _Nonnull) adUnitId +- (instancetype _Nullable) initWithAdUnitIdentifier:(NSString * _Nonnull) adUnitId adFormat:(MAAdFormat * _Nonnull) adFormat analytics:(AppleAppLovinAnalyticsService * _Nonnull) analytics { self = [super init]; diff --git a/src/Plugins/AppleAppLovinPlugin/AppleAppLovinInterstitialDelegate.h b/src/Plugins/AppleAppLovinPlugin/AppleAppLovinInterstitialDelegate.h index 8e29c002af..991311b44b 100644 --- a/src/Plugins/AppleAppLovinPlugin/AppleAppLovinInterstitialDelegate.h +++ b/src/Plugins/AppleAppLovinPlugin/AppleAppLovinInterstitialDelegate.h @@ -11,10 +11,10 @@ @interface AppleAppLovinInterstitialDelegate : AppleAppLovinBaseDelegate -- (instancetype _Nonnull) initWithAdUnitIdentifier:(NSString * _Nonnull) adUnitId - amazonSlotId:(NSString * _Nullable) amazonSlotId - provider:(const Mengine::AppleAppLovinInterstitialProviderInterfacePtr &) provider - analytics:(AppleAppLovinAnalyticsService * _Nonnull) analytics; +- (instancetype _Nullable) initWithAdUnitIdentifier:(NSString * _Nonnull) adUnitId + amazonSlotId:(NSString * _Nullable) amazonSlotId + provider:(const Mengine::AppleAppLovinInterstitialProviderInterfacePtr &) provider + analytics:(AppleAppLovinAnalyticsService * _Nonnull) analytics; - (BOOL) canYouShow:(NSString * _Nonnull) placement; - (BOOL) show:(NSString * _Nonnull) placement; diff --git a/src/Plugins/AppleAppLovinPlugin/AppleAppLovinInterstitialDelegate.mm b/src/Plugins/AppleAppLovinPlugin/AppleAppLovinInterstitialDelegate.mm index 97ef9e2891..48853b2631 100644 --- a/src/Plugins/AppleAppLovinPlugin/AppleAppLovinInterstitialDelegate.mm +++ b/src/Plugins/AppleAppLovinPlugin/AppleAppLovinInterstitialDelegate.mm @@ -3,20 +3,35 @@ #include "Environment/Apple/AppleString.h" #include "Environment/Apple/AppleAnalytics.h" +#include "AppleAppLovinApplicationDelegate.h" + #include "Kernel/Logger.h" #include "Kernel/AnalyticsHelper.h" @implementation AppleAppLovinInterstitialDelegate -- (instancetype _Nonnull) initWithAdUnitIdentifier:(NSString * _Nonnull) adUnitId - amazonSlotId:(NSString * _Nullable) amazonSlotId - provider:(const Mengine::AppleAppLovinInterstitialProviderInterfacePtr &) provider - analytics:(AppleAppLovinAnalyticsService * _Nonnull) analytics { +- (instancetype _Nullable) initWithAdUnitIdentifier:(NSString * _Nonnull) adUnitId + amazonSlotId:(NSString * _Nullable) amazonSlotId + provider:(const Mengine::AppleAppLovinInterstitialProviderInterfacePtr &) provider + analytics:(AppleAppLovinAnalyticsService * _Nonnull) analytics { self = [super initWithAdUnitIdentifier:adUnitId adFormat:MAAdFormat.rewarded analytics:analytics]; self.m_provider = provider; - MAInterstitialAd * interstitialAd = [[MAInterstitialAd alloc] initWithAdUnitIdentifier:adUnitId]; + MAInterstitialAd * interstitialAd; + + @try { + interstitialAd = [[MAInterstitialAd alloc] initWithAdUnitIdentifier:adUnitId sdk:AppleAppLovinApplicationDelegate.AppLovinSdk]; + } @catch (NSException * ex) { + LOGGER_ERROR( "[Error] AppleAppLovinInterstitialDelegate invalid create MAInterstitialAd adUnitId: %s exception: %s [%s]" + , [adUnitId UTF8String] + , [ex.reason UTF8String] + , [ex.name UTF8String] + ); + + return nil; + } + interstitialAd.delegate = self; interstitialAd.revenueDelegate = self; interstitialAd.requestDelegate = self; diff --git a/src/Plugins/AppleAppLovinPlugin/AppleAppLovinRewardedDelegate.h b/src/Plugins/AppleAppLovinPlugin/AppleAppLovinRewardedDelegate.h index 2619627727..1eec579699 100644 --- a/src/Plugins/AppleAppLovinPlugin/AppleAppLovinRewardedDelegate.h +++ b/src/Plugins/AppleAppLovinPlugin/AppleAppLovinRewardedDelegate.h @@ -11,10 +11,10 @@ @interface AppleAppLovinRewardedDelegate : AppleAppLovinBaseDelegate -- (instancetype _Nonnull) initWithAdUnitIdentifier:(NSString * _Nonnull) adUnitId - amazonSlotId:(NSString * _Nullable) amazonSlotId - provider:(const Mengine::AppleAppLovinRewardedProviderInterfacePtr &) provider - analytics:(AppleAppLovinAnalyticsService * _Nonnull) analytics; +- (instancetype _Nullable) initWithAdUnitIdentifier:(NSString * _Nonnull) adUnitId + amazonSlotId:(NSString * _Nullable) amazonSlotId + provider:(const Mengine::AppleAppLovinRewardedProviderInterfacePtr &) provider + analytics:(AppleAppLovinAnalyticsService * _Nonnull) analytics; - (BOOL) canOffer:(NSString * _Nonnull) placement; - (BOOL) canYouShow:(NSString * _Nonnull) placement; diff --git a/src/Plugins/AppleAppLovinPlugin/AppleAppLovinRewardedDelegate.mm b/src/Plugins/AppleAppLovinPlugin/AppleAppLovinRewardedDelegate.mm index 5922b92556..0d840618af 100644 --- a/src/Plugins/AppleAppLovinPlugin/AppleAppLovinRewardedDelegate.mm +++ b/src/Plugins/AppleAppLovinPlugin/AppleAppLovinRewardedDelegate.mm @@ -3,19 +3,34 @@ #include "Environment/Apple/AppleString.h" #include "Environment/Apple/AppleAnalytics.h" +#include "AppleAppLovinApplicationDelegate.h" + #include "Kernel/Logger.h" @implementation AppleAppLovinRewardedDelegate -- (instancetype _Nonnull) initWithAdUnitIdentifier:(NSString * _Nonnull) adUnitId - amazonSlotId:(NSString * _Nullable) amazonSlotId - provider:(const Mengine::AppleAppLovinRewardedProviderInterfacePtr &) provider - analytics:(AppleAppLovinAnalyticsService * _Nonnull) analytics { +- (instancetype _Nullable) initWithAdUnitIdentifier:(NSString * _Nonnull) adUnitId + amazonSlotId:(NSString * _Nullable) amazonSlotId + provider:(const Mengine::AppleAppLovinRewardedProviderInterfacePtr &) provider + analytics:(AppleAppLovinAnalyticsService * _Nonnull) analytics { self = [super initWithAdUnitIdentifier:adUnitId adFormat:MAAdFormat.interstitial analytics:analytics]; self.m_provider = provider; - MARewardedAd * rewardedAd = [MARewardedAd sharedWithAdUnitIdentifier: adUnitId]; + MARewardedAd * rewardedAd; + + @try { + rewardedAd = [MARewardedAd sharedWithAdUnitIdentifier: adUnitId sdk:AppleAppLovinApplicationDelegate.AppLovinSdk]; + } @catch (NSException * ex) { + LOGGER_ERROR( "[Error] AppleAppLovinRewardedDelegate invalid create MARewardedAd adUnitId: %s exception: %s [%s]" + , [adUnitId UTF8String] + , [ex.reason UTF8String] + , [ex.name UTF8String] + ); + + return nil; + } + rewardedAd.delegate = self; rewardedAd.requestDelegate = self; rewardedAd.revenueDelegate = self; diff --git a/src/Plugins/AppleAppLovinPlugin/AppleAppLovinService.mm b/src/Plugins/AppleAppLovinPlugin/AppleAppLovinService.mm index 32f42bcd38..14f592e144 100644 --- a/src/Plugins/AppleAppLovinPlugin/AppleAppLovinService.mm +++ b/src/Plugins/AppleAppLovinPlugin/AppleAppLovinService.mm @@ -97,6 +97,11 @@ provider:_provider analytics:m_analyticsService]; + if( banner == nil ) + { + return false; + } + [m_banners setValue:banner forKey:adUnitId]; return true; @@ -153,6 +158,11 @@ provider:_provider analytics:m_analyticsService]; + if( interstitial == nil ) + { + return false; + } + [m_interstitials setValue:interstitial forKey:adUnitId]; return true; @@ -213,6 +223,11 @@ provider:_provider analytics:m_analyticsService]; + if( rewarded == nil ) + { + return false; + } + [m_rewardeds setValue:rewarded forKey:adUnitId]; return true; diff --git a/src/SDLApplication/SDLUIApplicationDelegate.mm b/src/SDLApplication/SDLUIApplicationDelegate.mm index e1f68dffac..2b4fc55547 100644 --- a/src/SDLApplication/SDLUIApplicationDelegate.mm +++ b/src/SDLApplication/SDLUIApplicationDelegate.mm @@ -73,6 +73,8 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( for (id delegate in self.m_pluginDelegates) { if ([delegate application:application didFinishLaunchingWithOptions:launchOptions] == NO) { + NSLog(@"Mengine application initialize plugin %@ failed", NSStringFromClass([delegate class])); + return NO; } } diff --git a/src/SDLApplication/iOSMain.mm b/src/SDLApplication/iOSMain.mm index 94901d34ca..375552c51c 100644 --- a/src/SDLApplication/iOSMain.mm +++ b/src/SDLApplication/iOSMain.mm @@ -27,7 +27,13 @@ int main( int argc, char * argv[] ) { int result; @autoreleasepool { - result = UIApplicationMain(argc, argv, nil, NSStringFromClass([SDLUIApplicationDelegate class])); + @try { + result = UIApplicationMain(argc, argv, nil, NSStringFromClass([SDLUIApplicationDelegate class])); + } @catch (NSException * ex) { + result = EXIT_FAILURE; + + NSLog(@"Exception Megnine application: %@ [%@]", ex.description, ex.reason); + } } NSLog(@"Finish Megnine application: %d", result); diff --git a/src/Services/LoaderService/LoaderService.cpp b/src/Services/LoaderService/LoaderService.cpp index 4000c38d14..3d3f0adc2b 100644 --- a/src/Services/LoaderService/LoaderService.cpp +++ b/src/Services/LoaderService/LoaderService.cpp @@ -457,7 +457,7 @@ namespace Mengine } #else ////////////////////////////////////////////////////////////////////////// - bool LoaderService::openBin_( const ContentInterfacePtr & _content, InputStreamInterfacePtr * const _stream, bool * const _exist ) const + bool LoaderService::openBin_( const ContentInterfacePtr & _content, InputStreamInterfacePtr * const _stream, bool * const _exist, const DocumentInterfacePtr & _doc ) const { if( _content->exist( true ) == false ) { @@ -469,7 +469,7 @@ namespace Mengine const FileGroupInterfacePtr & fileGroup = _content->getFileGroup(); const FilePath & filePath = _content->getFilePath(); - InputStreamInterfacePtr file_bin = Helper::openInputStreamFile( fileGroup, filePath, false, false, MENGINE_DOCUMENT_FACTORABLE ); + InputStreamInterfacePtr file_bin = Helper::openInputStreamFile( fileGroup, filePath, false, false, _doc ); MENGINE_ASSERTION_MEMORY_PANIC( file_bin );