1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00

add App Group entitlement

kambala-decapitator/vcmi#9
This commit is contained in:
Andrey Filipenkov 2021-03-17 20:15:48 +03:00
parent d716db942c
commit 4647bd8981
4 changed files with 28 additions and 0 deletions

View File

@ -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)

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.application-groups</key>
<array>
<string>group.@BUNDLE_IDENTIFIER_PREFIX@.vcmi</string>
</array>
</dict>
</plist>

View File

@ -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)

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.application-groups</key>
<array>
<string>group.@BUNDLE_IDENTIFIER_PREFIX@.vcmi</string>
</array>
</dict>
</plist>