mirror of
https://github.com/cocos/cocos-engine.git
synced 2026-10-15 12:02:30 +08:00
Add App Sandbox for Mac OSX application (#3685)
https://github.com/cocos-creator/3d-tasks/issues/7352 Use Cmake to enable app sandbox configuration
This commit is contained in:
@@ -63,6 +63,9 @@ set_target_properties(${LIB_NAME} PROPERTIES
|
||||
XCODE_ATTRIBUTE_SKIP_INSTALL NO
|
||||
XCODE_ATTRIBUTE_INSTALL_PATH "$(LOCAL_APPS_DIR)"
|
||||
)
|
||||
set_target_properties(${LIB_NAME} PROPERTIES
|
||||
XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS "${CMAKE_CURRENT_LIST_DIR}/entitlements.plist"
|
||||
)
|
||||
get_property(gles2_loc TARGET GLESv2 PROPERTY IMPORTED_LOCATION)
|
||||
get_property(egl_loc TARGET EGL PROPERTY IMPORTED_LOCATION)
|
||||
add_custom_command(TARGET ${LIB_NAME} POST_BUILD
|
||||
|
||||
11
native/templates/mac/entitlements.plist
Normal file
11
native/templates/mac/entitlements.plist
Normal file
@@ -0,0 +1,11 @@
|
||||
<!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.app-sandbox</key>
|
||||
<true/>
|
||||
<key>com.apple.security.network.client</key>
|
||||
<true/>
|
||||
<key>com.apple.security.network.server</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
Reference in New Issue
Block a user