From bb00ec8ce2a14b5a35230140b558e65477ead8f6 Mon Sep 17 00:00:00 2001 From: Andrey Filipenkov Date: Wed, 3 Aug 2022 10:57:27 +0300 Subject: [PATCH] remove entitlements and shared container usage they're no longer required since we have a single app now --- client/CMakeLists.txt | 4 ---- client/ios/Entitlements.in | 10 ---------- lib/CIOSUtils.h | 6 ------ lib/CIOSUtils.m | 15 --------------- lib/VCMIDirs.cpp | 2 +- 5 files changed, 1 insertion(+), 36 deletions(-) delete mode 100644 client/ios/Entitlements.in diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index 6a32dba15..f5d3a90d1 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -206,15 +206,11 @@ elseif(APPLE_IOS) "-weak_framework CoreHaptics" ) - set(ENTITLEMENTS_OUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/VCMI.entitlements) - configure_file(ios/Entitlements.in ${ENTITLEMENTS_OUT_PATH} @ONLY) - set_target_properties(vcmiclient PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_LIST_DIR}/ios/Info.plist" XCODE_ATTRIBUTE_LD_RUNPATH_SEARCH_PATHS "@executable_path/Frameworks" XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED "$(CODE_SIGNING_ALLOWED_FOR_APPS)" XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME AppIcon - XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS ${ENTITLEMENTS_OUT_PATH} ) target_sources(vcmiclient PRIVATE ${CMAKE_SOURCE_DIR}/client/LaunchScreen.storyboard) diff --git a/client/ios/Entitlements.in b/client/ios/Entitlements.in deleted file mode 100644 index 73367ec6b..000000000 --- a/client/ios/Entitlements.in +++ /dev/null @@ -1,10 +0,0 @@ - - - - - com.apple.security.application-groups - - group.@BUNDLE_IDENTIFIER_PREFIX@.vcmi - - - diff --git a/lib/CIOSUtils.h b/lib/CIOSUtils.h index 3b5bd3e80..1eb34cab6 100644 --- a/lib/CIOSUtils.h +++ b/lib/CIOSUtils.h @@ -22,12 +22,6 @@ extern "C" { extern const char *ios_documentsPath(); extern const char *ios_cachesPath(); -#ifdef __OBJC__ -NSURL *sharedContainerURL(); -NSURL *sharedGameDataURL(); -#endif -extern const char *ios_sharedDataPath(); - #if TARGET_OS_SIMULATOR extern const char *ios_hostApplicationSupportPath(); #endif diff --git a/lib/CIOSUtils.m b/lib/CIOSUtils.m index 27e291642..905e5d62c 100644 --- a/lib/CIOSUtils.m +++ b/lib/CIOSUtils.m @@ -21,21 +21,6 @@ static const char *standardPath(NSSearchPathDirectory directory) { return standa const char *ios_documentsPath() { return standardPath(NSDocumentDirectory); } const char *ios_cachesPath() { return standardPath(NSCachesDirectory); } -NSURL *sharedContainerURL() -{ - static NSURL *sharedPathURL; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - __auto_type bundleID = NSBundle.mainBundle.bundleIdentifier; - __auto_type lastDotPos = [bundleID rangeOfString:@"." options:NSBackwardsSearch].location; - __auto_type groupID = [NSString stringWithFormat:@"group.%@.vcmi", [bundleID substringToIndex:lastDotPos]]; - sharedPathURL = [NSFileManager.defaultManager containerURLForSecurityApplicationGroupIdentifier:groupID]; - }); - return sharedPathURL; -} -NSURL *sharedGameDataURL() { return [sharedContainerURL() URLByAppendingPathComponent:@"GameData"]; } -const char *ios_sharedDataPath() { return sharedGameDataURL().fileSystemRepresentation; } - #if TARGET_OS_SIMULATOR const char *ios_hostApplicationSupportPath() { diff --git a/lib/VCMIDirs.cpp b/lib/VCMIDirs.cpp index 87b2abd50..1086a6955 100644 --- a/lib/VCMIDirs.cpp +++ b/lib/VCMIDirs.cpp @@ -392,7 +392,7 @@ class VCMIDirsIOS final : public VCMIDirsApple bfs::path binaryPath() const override; }; -bfs::path VCMIDirsIOS::userDataPath() const { return {ios_sharedDataPath() ?: ios_documentsPath()}; } +bfs::path VCMIDirsIOS::userDataPath() const { return {ios_documentsPath()}; } bfs::path VCMIDirsIOS::userCachePath() const { return {ios_cachesPath()}; } bfs::path VCMIDirsIOS::userLogsPath() const { return {ios_documentsPath()}; }