Skip to content

Commit aa6648d

Browse files
committed
Polling added to example app
1 parent 6a5f488 commit aa6648d

19 files changed

+212
-243
lines changed

example/README.md

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
Demonstrates how to use the sendbird_chat plugin.
44

5+
## Usage
6+
This example app requires the inclusion of a `.env` file located in the example root directory. Simplest option is to add your Sendbird keys to the `.env_sample` file and rename the file to `.env`.
7+
8+
## Polling
9+
Because there doesn't appear to be a public websocket endpoint, this example app polls sendbird periodically for available users and open group channels and every second when the chat window is open.
10+
511
## Getting Started
612

713
This project is a starting point for a Flutter application.

example/ios/Flutter/Debug.xcconfig

-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
21
#include "Generated.xcconfig"

example/ios/Flutter/Release.xcconfig

-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
21
#include "Generated.xcconfig"

example/ios/Podfile

-41
This file was deleted.

example/ios/Podfile.lock

-16
This file was deleted.

example/ios/Runner.xcodeproj/project.pbxproj

+8-89
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 50;
6+
objectVersion = 46;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -13,7 +13,6 @@
1313
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
1414
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
1515
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
16-
D4A9295E937B33D654155169 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E3A8B606E54A2E88EB66C257 /* Pods_Runner.framework */; };
1716
/* End PBXBuildFile section */
1817

1918
/* Begin PBXCopyFilesBuildPhase section */
@@ -32,7 +31,6 @@
3231
/* Begin PBXFileReference section */
3332
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
3433
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
35-
21AED4E5F239DFAF19980177 /* 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>"; };
3634
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
3735
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
3836
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
@@ -44,17 +42,13 @@
4442
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
4543
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
4644
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
47-
AEA3983F690281D74E267B38 /* 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>"; };
48-
E3A8B606E54A2E88EB66C257 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
49-
FB9CE378619EFFA96512F321 /* 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>"; };
5045
/* End PBXFileReference section */
5146

5247
/* Begin PBXFrameworksBuildPhase section */
5348
97C146EB1CF9000F007C117D /* Frameworks */ = {
5449
isa = PBXFrameworksBuildPhase;
5550
buildActionMask = 2147483647;
5651
files = (
57-
D4A9295E937B33D654155169 /* Pods_Runner.framework in Frameworks */,
5852
);
5953
runOnlyForDeploymentPostprocessing = 0;
6054
};
@@ -78,8 +72,6 @@
7872
9740EEB11CF90186004384FC /* Flutter */,
7973
97C146F01CF9000F007C117D /* Runner */,
8074
97C146EF1CF9000F007C117D /* Products */,
81-
CD0CE6DA9744819482BD45FE /* Pods */,
82-
D378A891AACEBABBC9F1D273 /* Frameworks */,
8375
);
8476
sourceTree = "<group>";
8577
};
@@ -106,40 +98,19 @@
10698
path = Runner;
10799
sourceTree = "<group>";
108100
};
109-
CD0CE6DA9744819482BD45FE /* Pods */ = {
110-
isa = PBXGroup;
111-
children = (
112-
21AED4E5F239DFAF19980177 /* Pods-Runner.debug.xcconfig */,
113-
FB9CE378619EFFA96512F321 /* Pods-Runner.release.xcconfig */,
114-
AEA3983F690281D74E267B38 /* Pods-Runner.profile.xcconfig */,
115-
);
116-
name = Pods;
117-
path = Pods;
118-
sourceTree = "<group>";
119-
};
120-
D378A891AACEBABBC9F1D273 /* Frameworks */ = {
121-
isa = PBXGroup;
122-
children = (
123-
E3A8B606E54A2E88EB66C257 /* Pods_Runner.framework */,
124-
);
125-
name = Frameworks;
126-
sourceTree = "<group>";
127-
};
128101
/* End PBXGroup section */
129102

130103
/* Begin PBXNativeTarget section */
131104
97C146ED1CF9000F007C117D /* Runner */ = {
132105
isa = PBXNativeTarget;
133106
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
134107
buildPhases = (
135-
DDA9D6D3DF913EE48B7F2516 /* [CP] Check Pods Manifest.lock */,
136108
9740EEB61CF901F6004384FC /* Run Script */,
137109
97C146EA1CF9000F007C117D /* Sources */,
138110
97C146EB1CF9000F007C117D /* Frameworks */,
139111
97C146EC1CF9000F007C117D /* Resources */,
140112
9705A1C41CF9048500538489 /* Embed Frameworks */,
141113
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
142-
E99BF84CE2F8B32858186FFA /* [CP] Embed Pods Frameworks */,
143114
);
144115
buildRules = (
145116
);
@@ -226,45 +197,6 @@
226197
shellPath = /bin/sh;
227198
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
228199
};
229-
DDA9D6D3DF913EE48B7F2516 /* [CP] Check Pods Manifest.lock */ = {
230-
isa = PBXShellScriptBuildPhase;
231-
buildActionMask = 2147483647;
232-
files = (
233-
);
234-
inputFileListPaths = (
235-
);
236-
inputPaths = (
237-
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
238-
"${PODS_ROOT}/Manifest.lock",
239-
);
240-
name = "[CP] Check Pods Manifest.lock";
241-
outputFileListPaths = (
242-
);
243-
outputPaths = (
244-
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
245-
);
246-
runOnlyForDeploymentPostprocessing = 0;
247-
shellPath = /bin/sh;
248-
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";
249-
showEnvVarsInLog = 0;
250-
};
251-
E99BF84CE2F8B32858186FFA /* [CP] Embed Pods Frameworks */ = {
252-
isa = PBXShellScriptBuildPhase;
253-
buildActionMask = 2147483647;
254-
files = (
255-
);
256-
inputFileListPaths = (
257-
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
258-
);
259-
name = "[CP] Embed Pods Frameworks";
260-
outputFileListPaths = (
261-
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
262-
);
263-
runOnlyForDeploymentPostprocessing = 0;
264-
shellPath = /bin/sh;
265-
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
266-
showEnvVarsInLog = 0;
267-
};
268200
/* End PBXShellScriptBuildPhase section */
269201

270202
/* Begin PBXSourcesBuildPhase section */
@@ -356,22 +288,18 @@
356288
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
357289
CLANG_ENABLE_MODULES = YES;
358290
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
359-
DEVELOPMENT_TEAM = 98C9JXLB72;
360291
ENABLE_BITCODE = NO;
361292
FRAMEWORK_SEARCH_PATHS = (
362293
"$(inherited)",
363294
"$(PROJECT_DIR)/Flutter",
364295
);
365296
INFOPLIST_FILE = Runner/Info.plist;
366-
LD_RUNPATH_SEARCH_PATHS = (
367-
"$(inherited)",
368-
"@executable_path/Frameworks",
369-
);
297+
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
370298
LIBRARY_SEARCH_PATHS = (
371299
"$(inherited)",
372300
"$(PROJECT_DIR)/Flutter",
373301
);
374-
PRODUCT_BUNDLE_IDENTIFIER = com.example.sendbirdChatExample;
302+
PRODUCT_BUNDLE_IDENTIFIER = com.example.example;
375303
PRODUCT_NAME = "$(TARGET_NAME)";
376304
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
377305
SWIFT_VERSION = 5.0;
@@ -479,8 +407,7 @@
479407
MTL_ENABLE_DEBUG_INFO = NO;
480408
SDKROOT = iphoneos;
481409
SUPPORTED_PLATFORMS = iphoneos;
482-
SWIFT_COMPILATION_MODE = wholemodule;
483-
SWIFT_OPTIMIZATION_LEVEL = "-O";
410+
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
484411
TARGETED_DEVICE_FAMILY = "1,2";
485412
VALIDATE_PRODUCT = YES;
486413
};
@@ -493,22 +420,18 @@
493420
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
494421
CLANG_ENABLE_MODULES = YES;
495422
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
496-
DEVELOPMENT_TEAM = 98C9JXLB72;
497423
ENABLE_BITCODE = NO;
498424
FRAMEWORK_SEARCH_PATHS = (
499425
"$(inherited)",
500426
"$(PROJECT_DIR)/Flutter",
501427
);
502428
INFOPLIST_FILE = Runner/Info.plist;
503-
LD_RUNPATH_SEARCH_PATHS = (
504-
"$(inherited)",
505-
"@executable_path/Frameworks",
506-
);
429+
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
507430
LIBRARY_SEARCH_PATHS = (
508431
"$(inherited)",
509432
"$(PROJECT_DIR)/Flutter",
510433
);
511-
PRODUCT_BUNDLE_IDENTIFIER = com.example.sendbirdChatExample;
434+
PRODUCT_BUNDLE_IDENTIFIER = com.example.example;
512435
PRODUCT_NAME = "$(TARGET_NAME)";
513436
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
514437
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@@ -524,22 +447,18 @@
524447
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
525448
CLANG_ENABLE_MODULES = YES;
526449
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
527-
DEVELOPMENT_TEAM = 98C9JXLB72;
528450
ENABLE_BITCODE = NO;
529451
FRAMEWORK_SEARCH_PATHS = (
530452
"$(inherited)",
531453
"$(PROJECT_DIR)/Flutter",
532454
);
533455
INFOPLIST_FILE = Runner/Info.plist;
534-
LD_RUNPATH_SEARCH_PATHS = (
535-
"$(inherited)",
536-
"@executable_path/Frameworks",
537-
);
456+
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
538457
LIBRARY_SEARCH_PATHS = (
539458
"$(inherited)",
540459
"$(PROJECT_DIR)/Flutter",
541460
);
542-
PRODUCT_BUNDLE_IDENTIFIER = com.example.sendbirdChatExample;
461+
PRODUCT_BUNDLE_IDENTIFIER = com.example.example;
543462
PRODUCT_NAME = "$(TARGET_NAME)";
544463
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
545464
SWIFT_VERSION = 5.0;

example/ios/Runner.xcworkspace/contents.xcworkspacedata

-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/ios/Runner/Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<key>CFBundleInfoDictionaryVersion</key>
1212
<string>6.0</string>
1313
<key>CFBundleName</key>
14-
<string>sendbird_chat_example</string>
14+
<string>example</string>
1515
<key>CFBundlePackageType</key>
1616
<string>APPL</string>
1717
<key>CFBundleShortVersionString</key>

0 commit comments

Comments
 (0)