Skip to content

Commit 6fa1c9c

Browse files
committed
chore(example): update outdated macOS example using Flutter CLI (automated), deprecated @NSApplicationMain attribute
1 parent b9ac917 commit 6fa1c9c

File tree

4 files changed

+67
-4
lines changed

4 files changed

+67
-4
lines changed

packages/image_picker/image_picker_macos/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+
38BD9D1FDAF3360EC1CC0018 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2E9F2DE12CD9DE067306B460 /* 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+
103E92CF1EBAAB82E57C06F1 /* 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>"; };
57+
2E9F2DE12CD9DE067306B460 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
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 /* example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "example.app"; sourceTree = BUILT_PRODUCTS_DIR; };
60+
33CC10ED2044A3C60003C045 /* example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = 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,21 +69,35 @@
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+
6D83DCCDFE2A45D91B8A2673 /* 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>"; };
6973
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; };
7074
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; };
75+
CD373636C90085FB713CE436 /* 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>"; };
7176
/* End PBXFileReference section */
7277

7378
/* Begin PBXFrameworksBuildPhase section */
7479
33CC10EA2044A3C60003C045 /* Frameworks */ = {
7580
isa = PBXFrameworksBuildPhase;
7681
buildActionMask = 2147483647;
7782
files = (
83+
38BD9D1FDAF3360EC1CC0018 /* Pods_Runner.framework in Frameworks */,
7884
);
7985
runOnlyForDeploymentPostprocessing = 0;
8086
};
8187
/* End PBXFrameworksBuildPhase section */
8288

8389
/* Begin PBXGroup section */
90+
0C0105042ACC016BCC44F609 /* Pods */ = {
91+
isa = PBXGroup;
92+
children = (
93+
6D83DCCDFE2A45D91B8A2673 /* Pods-Runner.debug.xcconfig */,
94+
103E92CF1EBAAB82E57C06F1 /* Pods-Runner.release.xcconfig */,
95+
CD373636C90085FB713CE436 /* Pods-Runner.profile.xcconfig */,
96+
);
97+
name = Pods;
98+
path = Pods;
99+
sourceTree = "<group>";
100+
};
84101
33BA886A226E78AF003329D5 /* Configs */ = {
85102
isa = PBXGroup;
86103
children = (
@@ -99,6 +116,7 @@
99116
33CEB47122A05771004F2AC0 /* Flutter */,
100117
33CC10EE2044A3C60003C045 /* Products */,
101118
D73912EC22F37F3D000D13A0 /* Frameworks */,
119+
0C0105042ACC016BCC44F609 /* Pods */,
102120
);
103121
sourceTree = "<group>";
104122
};
@@ -148,6 +166,7 @@
148166
D73912EC22F37F3D000D13A0 /* Frameworks */ = {
149167
isa = PBXGroup;
150168
children = (
169+
2E9F2DE12CD9DE067306B460 /* 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+
DFDF70D0C2243DC8DB792B23 /* [CP] Check Pods Manifest.lock */,
162182
33CC10E92044A3C60003C045 /* Sources */,
163183
33CC10EA2044A3C60003C045 /* Frameworks */,
164184
33CC10EB2044A3C60003C045 /* Resources */,
165185
33CC110E2044A8840003C045 /* Bundle Framework */,
166186
3399D490228B24CF009A79C7 /* ShellScript */,
187+
47A625D09D635034DC1B5C5E /* [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 = 1510;
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+
47A625D09D635034DC1B5C5E /* [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+
DFDF70D0C2243DC8DB792B23 /* [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_macos/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 = "1510"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

packages/image_picker/image_picker_macos/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_macos/example/macos/Runner/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import Cocoa
66
import FlutterMacOS
77

8-
@NSApplicationMain
8+
@main
99
class AppDelegate: FlutterAppDelegate {
1010
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
1111
return true

0 commit comments

Comments
 (0)