diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index f826605d2..4004e814e 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -180,11 +180,15 @@ elseif(APPLE_IOS) "-framework Foundation -framework UIKit -framework QuartzCore -framework CoreGraphics -framework CoreServices -framework ImageIO -framework Metal -framework OpenGLES -framework AVFoundation -framework GameController -framework CoreMotion" # SDL2_image ) + 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" SKIP_BUILD_RPATH 1 XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED YES 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 new file mode 100644 index 000000000..73367ec6b --- /dev/null +++ b/client/ios/Entitlements.in @@ -0,0 +1,10 @@ + + + + + com.apple.security.application-groups + + group.@BUNDLE_IDENTIFIER_PREFIX@.vcmi + + + diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt index 30c448a81..f526bb41c 100644 --- a/server/CMakeLists.txt +++ b/server/CMakeLists.txt @@ -48,11 +48,15 @@ if(WIN32) PROJECT_LABEL "VCMI_server" ) elseif(APPLE_IOS) + set(ENTITLEMENTS_OUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/VCMI.entitlements) + configure_file(ios/Entitlements.in ${ENTITLEMENTS_OUT_PATH} @ONLY) + set_target_properties(vcmiserver PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_LIST_DIR}/ios/Info.plist" SKIP_BUILD_RPATH 1 XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED YES XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME AppIcon + XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS ${ENTITLEMENTS_OUT_PATH} ) # TODO: move to a common dir / add macro? target_sources(vcmiserver PRIVATE ${CMAKE_SOURCE_DIR}/client/LaunchScreen.storyboard) diff --git a/server/ios/Entitlements.in b/server/ios/Entitlements.in new file mode 100644 index 000000000..73367ec6b --- /dev/null +++ b/server/ios/Entitlements.in @@ -0,0 +1,10 @@ + + + + + com.apple.security.application-groups + + group.@BUNDLE_IDENTIFIER_PREFIX@.vcmi + + +