Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a269871

Browse files
committedDec 7, 2024
🚧 update example
1 parent 199938d commit a269871

File tree

3 files changed

+20
-14
lines changed

3 files changed

+20
-14
lines changed
 

‎example/ios/Podfile.lock

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
PODS:
22
- AlicloudPush (2.2.0)
3-
- AlicloudUTDID (1.6.1)
4-
- AlicloudUtils (2.0.1):
5-
- AlicloudUTDID
63
- aliyun_push_flutter (0.0.1):
74
- AlicloudPush
8-
- AlicloudUtils
95
- Flutter
106
- Flutter (1.0.0)
117
- integration_test (0.0.1):
@@ -19,8 +15,6 @@ DEPENDENCIES:
1915
SPEC REPOS:
2016
https://github.com/aliyun/aliyun-specs.git:
2117
- AlicloudPush
22-
- AlicloudUTDID
23-
- AlicloudUtils
2418

2519
EXTERNAL SOURCES:
2620
aliyun_push_flutter:
@@ -32,12 +26,10 @@ EXTERNAL SOURCES:
3226

3327
SPEC CHECKSUMS:
3428
AlicloudPush: 74a9ac0ec7d9e1396283dfa71c40c895b273905e
35-
AlicloudUTDID: 5d2f22d50e11eecd38f30bc7a48c71925ea90976
36-
AlicloudUtils: ef4436f52b828b1182b002373758ecb88068e679
37-
aliyun_push_flutter: 1e17d1272e608d199dea42024b82bab782e4344f
29+
aliyun_push_flutter: 5b33b46510e6f1b7cb487eb5e0d1fa5df62cb574
3830
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
3931
integration_test: 252f60fa39af5e17c3aa9899d35d908a0721b573
4032

4133
PODFILE CHECKSUM: 7e12abdb2b7e20633f470f68b57681df76aa752a
4234

43-
COCOAPODS: 1.16.2
35+
COCOAPODS: 1.15.2

‎example/ios/Runner/Info.plist

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@
2828
<true/>
2929
<key>UIApplicationSupportsIndirectInputEvents</key>
3030
<true/>
31+
<key>UIBackgroundModes</key>
32+
<array>
33+
<string>remote-notification</string>
34+
<string>fetch</string>
35+
</array>
3136
<key>UILaunchStoryboardName</key>
3237
<string>LaunchScreen</string>
3338
<key>UIMainStoryboardFile</key>
@@ -45,9 +50,5 @@
4550
<string>UIInterfaceOrientationLandscapeLeft</string>
4651
<string>UIInterfaceOrientationLandscapeRight</string>
4752
</array>
48-
<key>UIBackgroundModes</key>
49-
<array>
50-
<string>remote-notification</string>
51-
</array>
5253
</dict>
5354
</plist>

‎example/lib/ios.dart

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,19 @@ class _IOSPageState extends BaseState<IOSPage> {
7070
child: const Text('通知通道是否已打开'),
7171
));
7272

73+
children.add(FilledButton(
74+
onPressed: () async {
75+
var result = await _aliyunPush.closeCCPChannel();
76+
var code = result['code'];
77+
if (code == kAliyunPushSuccessCode) {
78+
showOkDialog('关闭推送消息通道成功');
79+
} else {
80+
showErrorDialog('关闭推送消息通道失败');
81+
}
82+
},
83+
child: const Text('关闭推送消息通道'),
84+
));
85+
7386
return cardBuilder(Column(children: children));
7487
}
7588

0 commit comments

Comments
 (0)
Please sign in to comment.