Skip to content

Commit ba12bc5

Browse files
[image_picker] Add missing entitlements to macOS example (#4931)
When endorsing macOS and adding the example app, I forgot to add the required entitlement, so the example didn't work. The actual fix is the entitlements file; the Runner.xc* changes are auto-generated by running `flutter build macos`; usually we do that before landing examples but clearly I didn't remember to actually run the example when endorsing in this case... Fixes flutter/flutter#134817
1 parent bc8c2f2 commit ba12bc5

File tree

5 files changed

+70
-3
lines changed

5 files changed

+70
-3
lines changed

packages/image_picker/image_picker/example/macos/Runner.xcodeproj/project.pbxproj

Lines changed: 62 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };
2727
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
2828
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
29+
E752A8CC1D9387A266D93ED4 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 686DC79A64D670F5C504FD08 /* Pods_Runner.framework */; };
2930
/* End PBXBuildFile section */
3031

3132
/* Begin PBXContainerItemProxy section */
@@ -52,9 +53,11 @@
5253
/* End PBXCopyFilesBuildPhase section */
5354

5455
/* Begin PBXFileReference section */
56+
1A4D3C07D27B19F648F074CC /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
57+
225EECB3B1227F1F63B05B0A /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
5558
333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; };
5659
335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = "<group>"; };
57-
33CC10ED2044A3C60003C045 /* image_picker_example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "image_picker_example.app"; sourceTree = BUILT_PRODUCTS_DIR; };
60+
33CC10ED2044A3C60003C045 /* image_picker_example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = image_picker_example.app; sourceTree = BUILT_PRODUCTS_DIR; };
5861
33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
5962
33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = "<group>"; };
6063
33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
@@ -66,6 +69,8 @@
6669
33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = "<group>"; };
6770
33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = "<group>"; };
6871
33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = "<group>"; };
72+
3BC5226339EC5EE981F2E45B /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
73+
686DC79A64D670F5C504FD08 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
6974
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; };
7075
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; };
7176
/* End PBXFileReference section */
@@ -75,6 +80,7 @@
7580
isa = PBXFrameworksBuildPhase;
7681
buildActionMask = 2147483647;
7782
files = (
83+
E752A8CC1D9387A266D93ED4 /* Pods_Runner.framework in Frameworks */,
7884
);
7985
runOnlyForDeploymentPostprocessing = 0;
8086
};
@@ -99,6 +105,7 @@
99105
33CEB47122A05771004F2AC0 /* Flutter */,
100106
33CC10EE2044A3C60003C045 /* Products */,
101107
D73912EC22F37F3D000D13A0 /* Frameworks */,
108+
D1147CF6C0F642E1DCD4FF72 /* Pods */,
102109
);
103110
sourceTree = "<group>";
104111
};
@@ -145,9 +152,21 @@
145152
path = Runner;
146153
sourceTree = "<group>";
147154
};
155+
D1147CF6C0F642E1DCD4FF72 /* Pods */ = {
156+
isa = PBXGroup;
157+
children = (
158+
225EECB3B1227F1F63B05B0A /* Pods-Runner.debug.xcconfig */,
159+
3BC5226339EC5EE981F2E45B /* Pods-Runner.release.xcconfig */,
160+
1A4D3C07D27B19F648F074CC /* Pods-Runner.profile.xcconfig */,
161+
);
162+
name = Pods;
163+
path = Pods;
164+
sourceTree = "<group>";
165+
};
148166
D73912EC22F37F3D000D13A0 /* Frameworks */ = {
149167
isa = PBXGroup;
150168
children = (
169+
686DC79A64D670F5C504FD08 /* Pods_Runner.framework */,
151170
);
152171
name = Frameworks;
153172
sourceTree = "<group>";
@@ -159,11 +178,13 @@
159178
isa = PBXNativeTarget;
160179
buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */;
161180
buildPhases = (
181+
D4E5037333BDDE606E4946C1 /* [CP] Check Pods Manifest.lock */,
162182
33CC10E92044A3C60003C045 /* Sources */,
163183
33CC10EA2044A3C60003C045 /* Frameworks */,
164184
33CC10EB2044A3C60003C045 /* Resources */,
165185
33CC110E2044A8840003C045 /* Bundle Framework */,
166186
3399D490228B24CF009A79C7 /* ShellScript */,
187+
3472B1913B7D85CC661265B6 /* [CP] Embed Pods Frameworks */,
167188
);
168189
buildRules = (
169190
);
@@ -182,7 +203,7 @@
182203
isa = PBXProject;
183204
attributes = {
184205
LastSwiftUpdateCheck = 0920;
185-
LastUpgradeCheck = 1300;
206+
LastUpgradeCheck = 1430;
186207
ORGANIZATIONNAME = "";
187208
TargetAttributes = {
188209
33CC10EC2044A3C60003C045 = {
@@ -271,6 +292,45 @@
271292
shellPath = /bin/sh;
272293
shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
273294
};
295+
3472B1913B7D85CC661265B6 /* [CP] Embed Pods Frameworks */ = {
296+
isa = PBXShellScriptBuildPhase;
297+
buildActionMask = 2147483647;
298+
files = (
299+
);
300+
inputFileListPaths = (
301+
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
302+
);
303+
name = "[CP] Embed Pods Frameworks";
304+
outputFileListPaths = (
305+
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
306+
);
307+
runOnlyForDeploymentPostprocessing = 0;
308+
shellPath = /bin/sh;
309+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
310+
showEnvVarsInLog = 0;
311+
};
312+
D4E5037333BDDE606E4946C1 /* [CP] Check Pods Manifest.lock */ = {
313+
isa = PBXShellScriptBuildPhase;
314+
buildActionMask = 2147483647;
315+
files = (
316+
);
317+
inputFileListPaths = (
318+
);
319+
inputPaths = (
320+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
321+
"${PODS_ROOT}/Manifest.lock",
322+
);
323+
name = "[CP] Check Pods Manifest.lock";
324+
outputFileListPaths = (
325+
);
326+
outputPaths = (
327+
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
328+
);
329+
runOnlyForDeploymentPostprocessing = 0;
330+
shellPath = /bin/sh;
331+
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
332+
showEnvVarsInLog = 0;
333+
};
274334
/* End PBXShellScriptBuildPhase section */
275335

276336
/* Begin PBXSourcesBuildPhase section */

packages/image_picker/image_picker/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1300"
3+
LastUpgradeVersion = "1430"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

packages/image_picker/image_picker/example/macos/Runner.xcworkspace/contents.xcworkspacedata

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/image_picker/image_picker/example/macos/Runner/DebugProfile.entitlements

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,7 @@
88
<true/>
99
<key>com.apple.security.network.server</key>
1010
<true/>
11+
<key>com.apple.security.files.user-selected.read-only</key>
12+
<true/>
1113
</dict>
1214
</plist>

packages/image_picker/image_picker/example/macos/Runner/Release.entitlements

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,7 @@
44
<dict>
55
<key>com.apple.security.app-sandbox</key>
66
<true/>
7+
<key>com.apple.security.files.user-selected.read-only</key>
8+
<true/>
79
</dict>
810
</plist>

0 commit comments

Comments
 (0)