Skip to content

Commit c8096c3

Browse files
Turn on sandboxing with entitlement for user selected files
- Create and add entitlements file to project - Update build settings to specify entitlements file - Add entitlement for read-write access to user selected files - Resolves #55
1 parent a415560 commit c8096c3

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

BuildSettingExtractor.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343

4444
/* Begin PBXFileReference section */
4545
532C57C7234BB32700FA0872 /* BSE-CodeSigning.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "BSE-CodeSigning.xcconfig"; sourceTree = "<group>"; };
46+
536AA121235293B600A0FE29 /* BuildSettingExtractor.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = BuildSettingExtractor.entitlements; sourceTree = "<group>"; };
4647
53719E8F19BF4C6D005D3DE0 /* BuildSettingExtractor.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BuildSettingExtractor.app; sourceTree = BUILT_PRODUCTS_DIR; };
4748
53719E9219BF4C6D005D3DE0 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
4849
53719E9519BF4C6D005D3DE0 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
@@ -154,6 +155,7 @@
154155
53719E9819BF4C6D005D3DE0 /* BuildSettingExtractor */ = {
155156
isa = PBXGroup;
156157
children = (
158+
536AA121235293B600A0FE29 /* BuildSettingExtractor.entitlements */,
157159
53719EA419BF4C6D005D3DE0 /* AppDelegate.h */,
158160
53719EA519BF4C6D005D3DE0 /* AppDelegate.m */,
159161
53F372EE1A7C042F006118CB /* BuildSettingExtractor.h */,
@@ -480,6 +482,7 @@
480482
isa = XCBuildConfiguration;
481483
buildSettings = {
482484
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
485+
CODE_SIGN_ENTITLEMENTS = BuildSettingExtractor/BuildSettingExtractor.entitlements;
483486
COMBINE_HIDPI_IMAGES = YES;
484487
CURRENT_PROJECT_VERSION = 14;
485488
INFOPLIST_FILE = "BuildSettingExtractor/BuildSettingExtractor-Info.plist";
@@ -494,6 +497,7 @@
494497
isa = XCBuildConfiguration;
495498
buildSettings = {
496499
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
500+
CODE_SIGN_ENTITLEMENTS = BuildSettingExtractor/BuildSettingExtractor.entitlements;
497501
COMBINE_HIDPI_IMAGES = YES;
498502
CURRENT_PROJECT_VERSION = 14;
499503
INFOPLIST_FILE = "BuildSettingExtractor/BuildSettingExtractor-Info.plist";
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>com.apple.security.app-sandbox</key>
6+
<true/>
7+
<key>com.apple.security.files.user-selected.read-write</key>
8+
<true/>
9+
</dict>
10+
</plist>

0 commit comments

Comments
 (0)