Skip to content

Commit b61e19a

Browse files
committed
Update iMessage example
1 parent 90edc85 commit b61e19a

File tree

7 files changed

+139
-97
lines changed

7 files changed

+139
-97
lines changed

packages/imessage/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 51 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 46;
6+
objectVersion = 54;
77
objects = {
88

99
/* Begin PBXBuildFile section */
1010
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
1111
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
12+
672034BE764343416BBF054C /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 68C54947B67A97B17A212D7D /* Pods_Runner.framework */; };
1213
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
1314
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
1415
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
1516
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
16-
AD80798B75BEF39A28B8324C /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0EA12FA64E96796BC730E03 /* Pods_Runner.framework */; };
1717
/* End PBXBuildFile section */
1818

1919
/* Begin PBXCopyFilesBuildPhase section */
@@ -30,51 +30,51 @@
3030
/* End PBXCopyFilesBuildPhase section */
3131

3232
/* Begin PBXFileReference section */
33-
10AA3A20A8E8F51016843518 /* 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>"; };
3433
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
3534
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
36-
212173E324AE0FED45F2866A /* 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>"; };
3735
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
36+
68C54947B67A97B17A212D7D /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
3837
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
3938
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
39+
7804032A8DB1A80610037311 /* 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>"; };
4040
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
41-
87BC4F0CB1D55BC3C77185AD /* 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>"; };
4241
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
4342
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
4443
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
4544
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
4645
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
4746
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
4847
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
49-
D0EA12FA64E96796BC730E03 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
48+
9BAE28C557F7C8298AEBE685 /* 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>"; };
49+
C6E1DD8F5DA1BBEF18BEDBCA /* 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>"; };
5050
/* End PBXFileReference section */
5151

5252
/* Begin PBXFrameworksBuildPhase section */
5353
97C146EB1CF9000F007C117D /* Frameworks */ = {
5454
isa = PBXFrameworksBuildPhase;
5555
buildActionMask = 2147483647;
5656
files = (
57-
AD80798B75BEF39A28B8324C /* Pods_Runner.framework in Frameworks */,
57+
672034BE764343416BBF054C /* Pods_Runner.framework in Frameworks */,
5858
);
5959
runOnlyForDeploymentPostprocessing = 0;
6060
};
6161
/* End PBXFrameworksBuildPhase section */
6262

6363
/* Begin PBXGroup section */
64-
3F98BA59D9BB09C5816FF126 /* Frameworks */ = {
64+
7B31D8C32330F8D3BDF8768B /* Frameworks */ = {
6565
isa = PBXGroup;
6666
children = (
67-
D0EA12FA64E96796BC730E03 /* Pods_Runner.framework */,
67+
68C54947B67A97B17A212D7D /* Pods_Runner.framework */,
6868
);
6969
name = Frameworks;
7070
sourceTree = "<group>";
7171
};
72-
7231B8C27F5ACE1DDE056446 /* Pods */ = {
72+
860C8405C4C1076EEE6EC118 /* Pods */ = {
7373
isa = PBXGroup;
7474
children = (
75-
87BC4F0CB1D55BC3C77185AD /* Pods-Runner.debug.xcconfig */,
76-
10AA3A20A8E8F51016843518 /* Pods-Runner.release.xcconfig */,
77-
212173E324AE0FED45F2866A /* Pods-Runner.profile.xcconfig */,
75+
7804032A8DB1A80610037311 /* Pods-Runner.debug.xcconfig */,
76+
9BAE28C557F7C8298AEBE685 /* Pods-Runner.release.xcconfig */,
77+
C6E1DD8F5DA1BBEF18BEDBCA /* Pods-Runner.profile.xcconfig */,
7878
);
7979
name = Pods;
8080
path = Pods;
@@ -97,8 +97,8 @@
9797
9740EEB11CF90186004384FC /* Flutter */,
9898
97C146F01CF9000F007C117D /* Runner */,
9999
97C146EF1CF9000F007C117D /* Products */,
100-
7231B8C27F5ACE1DDE056446 /* Pods */,
101-
3F98BA59D9BB09C5816FF126 /* Frameworks */,
100+
860C8405C4C1076EEE6EC118 /* Pods */,
101+
7B31D8C32330F8D3BDF8768B /* Frameworks */,
102102
);
103103
sourceTree = "<group>";
104104
};
@@ -132,14 +132,14 @@
132132
isa = PBXNativeTarget;
133133
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
134134
buildPhases = (
135-
CAA82304056351F698F2FE92 /* [CP] Check Pods Manifest.lock */,
135+
70BE71C1BA167AD723F04822 /* [CP] Check Pods Manifest.lock */,
136136
9740EEB61CF901F6004384FC /* Run Script */,
137137
97C146EA1CF9000F007C117D /* Sources */,
138138
97C146EB1CF9000F007C117D /* Frameworks */,
139139
97C146EC1CF9000F007C117D /* Resources */,
140140
9705A1C41CF9048500538489 /* Embed Frameworks */,
141141
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
142-
5C9569EFDB9DD32B2BAFBEBB /* [CP] Embed Pods Frameworks */,
142+
3DA49115DFBB33B00233918E /* [CP] Embed Pods Frameworks */,
143143
);
144144
buildRules = (
145145
);
@@ -156,7 +156,7 @@
156156
97C146E61CF9000F007C117D /* Project object */ = {
157157
isa = PBXProject;
158158
attributes = {
159-
LastUpgradeCheck = 1020;
159+
LastUpgradeCheck = 1510;
160160
ORGANIZATIONNAME = "";
161161
TargetAttributes = {
162162
97C146ED1CF9000F007C117D = {
@@ -200,10 +200,12 @@
200200
/* Begin PBXShellScriptBuildPhase section */
201201
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
202202
isa = PBXShellScriptBuildPhase;
203+
alwaysOutOfDate = 1;
203204
buildActionMask = 2147483647;
204205
files = (
205206
);
206207
inputPaths = (
208+
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
207209
);
208210
name = "Thin Binary";
209211
outputPaths = (
@@ -212,7 +214,7 @@
212214
shellPath = /bin/sh;
213215
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
214216
};
215-
5C9569EFDB9DD32B2BAFBEBB /* [CP] Embed Pods Frameworks */ = {
217+
3DA49115DFBB33B00233918E /* [CP] Embed Pods Frameworks */ = {
216218
isa = PBXShellScriptBuildPhase;
217219
buildActionMask = 2147483647;
218220
files = (
@@ -229,41 +231,42 @@
229231
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
230232
showEnvVarsInLog = 0;
231233
};
232-
9740EEB61CF901F6004384FC /* Run Script */ = {
234+
70BE71C1BA167AD723F04822 /* [CP] Check Pods Manifest.lock */ = {
233235
isa = PBXShellScriptBuildPhase;
234236
buildActionMask = 2147483647;
235237
files = (
236238
);
239+
inputFileListPaths = (
240+
);
237241
inputPaths = (
242+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
243+
"${PODS_ROOT}/Manifest.lock",
244+
);
245+
name = "[CP] Check Pods Manifest.lock";
246+
outputFileListPaths = (
238247
);
239-
name = "Run Script";
240248
outputPaths = (
249+
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
241250
);
242251
runOnlyForDeploymentPostprocessing = 0;
243252
shellPath = /bin/sh;
244-
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
253+
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";
254+
showEnvVarsInLog = 0;
245255
};
246-
CAA82304056351F698F2FE92 /* [CP] Check Pods Manifest.lock */ = {
256+
9740EEB61CF901F6004384FC /* Run Script */ = {
247257
isa = PBXShellScriptBuildPhase;
258+
alwaysOutOfDate = 1;
248259
buildActionMask = 2147483647;
249260
files = (
250261
);
251-
inputFileListPaths = (
252-
);
253262
inputPaths = (
254-
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
255-
"${PODS_ROOT}/Manifest.lock",
256-
);
257-
name = "[CP] Check Pods Manifest.lock";
258-
outputFileListPaths = (
259263
);
264+
name = "Run Script";
260265
outputPaths = (
261-
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
262266
);
263267
runOnlyForDeploymentPostprocessing = 0;
264268
shellPath = /bin/sh;
265-
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";
266-
showEnvVarsInLog = 0;
269+
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
267270
};
268271
/* End PBXShellScriptBuildPhase section */
269272

@@ -340,7 +343,7 @@
340343
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
341344
GCC_WARN_UNUSED_FUNCTION = YES;
342345
GCC_WARN_UNUSED_VARIABLE = YES;
343-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
346+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
344347
MTL_ENABLE_DEBUG_INFO = NO;
345348
SDKROOT = iphoneos;
346349
SUPPORTED_PLATFORMS = iphoneos;
@@ -362,7 +365,10 @@
362365
"$(PROJECT_DIR)/Flutter",
363366
);
364367
INFOPLIST_FILE = Runner/Info.plist;
365-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
368+
LD_RUNPATH_SEARCH_PATHS = (
369+
"$(inherited)",
370+
"@executable_path/Frameworks",
371+
);
366372
LIBRARY_SEARCH_PATHS = (
367373
"$(inherited)",
368374
"$(PROJECT_DIR)/Flutter",
@@ -422,7 +428,7 @@
422428
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
423429
GCC_WARN_UNUSED_FUNCTION = YES;
424430
GCC_WARN_UNUSED_VARIABLE = YES;
425-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
431+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
426432
MTL_ENABLE_DEBUG_INFO = YES;
427433
ONLY_ACTIVE_ARCH = YES;
428434
SDKROOT = iphoneos;
@@ -471,7 +477,7 @@
471477
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
472478
GCC_WARN_UNUSED_FUNCTION = YES;
473479
GCC_WARN_UNUSED_VARIABLE = YES;
474-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
480+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
475481
MTL_ENABLE_DEBUG_INFO = NO;
476482
SDKROOT = iphoneos;
477483
SUPPORTED_PLATFORMS = iphoneos;
@@ -494,7 +500,10 @@
494500
"$(PROJECT_DIR)/Flutter",
495501
);
496502
INFOPLIST_FILE = Runner/Info.plist;
497-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
503+
LD_RUNPATH_SEARCH_PATHS = (
504+
"$(inherited)",
505+
"@executable_path/Frameworks",
506+
);
498507
LIBRARY_SEARCH_PATHS = (
499508
"$(inherited)",
500509
"$(PROJECT_DIR)/Flutter",
@@ -521,7 +530,10 @@
521530
"$(PROJECT_DIR)/Flutter",
522531
);
523532
INFOPLIST_FILE = Runner/Info.plist;
524-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
533+
LD_RUNPATH_SEARCH_PATHS = (
534+
"$(inherited)",
535+
"@executable_path/Frameworks",
536+
);
525537
LIBRARY_SEARCH_PATHS = (
526538
"$(inherited)",
527539
"$(PROJECT_DIR)/Flutter",

packages/imessage/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 2 additions & 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 = "1020"
3+
LastUpgradeVersion = "1510"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -50,6 +50,7 @@
5050
ignoresPersistentStateOnLaunch = "NO"
5151
debugDocumentVersioning = "YES"
5252
debugServiceExtension = "internal"
53+
enableGPUValidationMode = "1"
5354
allowLocationSimulation = "YES">
5455
<BuildableProductRunnable
5556
runnableDebuggingMode = "0">

packages/imessage/ios/Runner/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import UIKit
22
import Flutter
33

4-
@UIApplicationMain
4+
@main
55
@objc class AppDelegate: FlutterAppDelegate {
66
override func application(
77
_ application: UIApplication,

packages/imessage/ios/Runner/Info.plist

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,9 @@
4141
</array>
4242
<key>UIViewControllerBasedStatusBarAppearance</key>
4343
<false/>
44+
<key>CADisableMinimumFrameDurationOnPhone</key>
45+
<true/>
46+
<key>UIApplicationSupportsIndirectInputEvents</key>
47+
<true/>
4448
</dict>
4549
</plist>

packages/imessage/lib/channel_list_view.dart

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ class ChannelListView extends StatelessWidget {
1111

1212
@override
1313
Widget build(BuildContext context) {
14-
channels.removeWhere((channel) => channel.lastMessageAt == null);
14+
final filteredChannels = List.from(channels)
15+
..removeWhere((channel) => channel.lastMessageAt == null);
16+
1517
return SliverList(
1618
delegate: SliverChildBuilderDelegate(
1719
(
@@ -21,13 +23,13 @@ class ChannelListView extends StatelessWidget {
2123
return Padding(
2224
padding: const EdgeInsets.symmetric(vertical: 4.0),
2325
child: ChannelPreview(
24-
channel: channels[index],
26+
channel: filteredChannels[index],
2527
onTap: () {
2628
Navigator.push(
2729
context,
2830
PageRouteBuilder(
2931
pageBuilder: (_, __, ___) => StreamChannel(
30-
channel: channels[index],
32+
channel: filteredChannels[index],
3133
child: const MessagePage(),
3234
),
3335
transitionsBuilder: (
@@ -48,7 +50,7 @@ class ChannelListView extends StatelessWidget {
4850
),
4951
);
5052
},
51-
childCount: channels.length,
53+
childCount: filteredChannels.length,
5254
),
5355
);
5456
}

0 commit comments

Comments
 (0)