Skip to content

Commit

Permalink
wip MENGINE_PLUGIN_APPLE_GENERALDATAPROTECTIONREGULATION
Browse files Browse the repository at this point in the history
  • Loading branch information
irov committed Aug 25, 2023
1 parent d5804c2 commit 651a75b
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

namespace Mengine
{
//////////////////////////////////////////////////////////////////////////
namespace Detail
{
//////////////////////////////////////////////////////////////////////////
Expand All @@ -33,11 +34,11 @@ static void s_AppleGeneralDataProtectionRegulation_isGDPRPass( bool _passGDPR )
//////////////////////////////////////////////////////////////////////////
}
//////////////////////////////////////////////////////////////////////////
AppleGeneralDataProtectionRegulationScriptEmbedding::AppleGeneralDataProtectionRegulationEmbedding()
AppleGeneralDataProtectionRegulationScriptEmbedding::AppleGeneralDataProtectionRegulationScriptEmbedding()
{
}
//////////////////////////////////////////////////////////////////////////
AppleGeneralDataProtectionRegulationScriptEmbedding::~AppleGeneralDataProtectionRegulationEmbedding()
AppleGeneralDataProtectionRegulationScriptEmbedding::~AppleGeneralDataProtectionRegulationScriptEmbedding()
{
}
//////////////////////////////////////////////////////////////////////////
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,8 @@ namespace Mengine
public:
void setGDPRPass( bool _passGDPR ) override;
bool isGDPRPass() const override;

protected:
bool m_passGDPR;
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
{
//////////////////////////////////////////////////////////////////////////
AppleGeneralDataProtectionRegulationService::AppleGeneralDataProtectionRegulationService()
: m_passGDPR(false)
{
}
//////////////////////////////////////////////////////////////////////////
Expand All @@ -38,21 +39,13 @@
LOGGER_MESSAGE( "set GDPR pass [%d]"
, _passGDPR
);

if (@available(iOS 14.0, *)) {
UIWindowScene * foregroundScene = nil;
for( UIWindowScene * scene in UIApplication.sharedApplication.connectedScenes ) {
if( scene.activationState == UISceneActivationStateForegroundActive ) {
foregroundScene = scene;
}
}

if( foregroundScene != nil ) {
[SKStoreReviewController requestReviewInScene:foregroundScene];
}
} else if (@available(iOS 10.3, *)) {
[SKStoreReviewController requestReview];
}

m_passGDPR = _passGDPR;
}
//////////////////////////////////////////////////////////////////////////
bool AppleGeneralDataProtectionRegulationService::isGDPRPass() const
{
return m_passGDPR;
}
//////////////////////////////////////////////////////////////////////////
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "Kernel/BuildMode.h"

#import <Sentry/Sentry.h>
#import "Sentry/Sentry.h"

@implementation AppleSentryApplicationDelegate

Expand Down
2 changes: 1 addition & 1 deletion src/Plugins/AppleSentryPlugin/AppleSentryLoggerCapture.mm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include "Config/StdString.h"

#import <Sentry/Sentry.h>
#import "Sentry/Sentry.h"

namespace Mengine
{
Expand Down
6 changes: 3 additions & 3 deletions src/Systems/ApplePersistentSystem/ApplePersistentSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@ namespace Mengine
//////////////////////////////////////////////////////////////////////////
bool ApplePersistentSystem::getPersistentArguments( Char * _value, size_t _capacity ) const
{
bool successful = Helper::AppleGetUserDefaultsString( "MengineApplePersistentArguments", _value, _capacity );
bool successful = Helper::AppleGetUserDefaultsString( "mengine.persistent.arguments", _value, _capacity );

return successful;
}
//////////////////////////////////////////////////////////////////////////
void ApplePersistentSystem::setPersistentArguments( const Char * _value )
{
Helper::AppleSetUserDefaultsString( "MengineApplePersistentArguments", _value );
Helper::AppleSetUserDefaultsString( "mengine.persistent.arguments", _value );
}
//////////////////////////////////////////////////////////////////////////
void ApplePersistentSystem::removePersistentArguments()
{
Helper::AppleRemoveUserDefaultsString( "MengineApplePersistentArguments" );
Helper::AppleRemoveUserDefaultsString( "mengine.persistent.arguments" );
}
//////////////////////////////////////////////////////////////////////////
}

0 comments on commit 651a75b

Please sign in to comment.