diff --git a/README.md b/README.md index 29c41dcc..8b7f2c92 100644 --- a/README.md +++ b/README.md @@ -53,3 +53,6 @@ flutter format * BeeGridImageView - 网格图片显示 * HorizontalImageView - 水平图片显示 + +p12 password +cyephiathnupinbisosyyatuphuorhs diff --git a/ios/Flutter/.last_build_id b/ios/Flutter/.last_build_id index 60ab2fda..67265b10 100644 --- a/ios/Flutter/.last_build_id +++ b/ios/Flutter/.last_build_id @@ -1 +1 @@ -08772c882ade7695c518fdf7d64d7a30 \ No newline at end of file +1d25ad0f6dab6b4c703ddfca43e3d476 \ No newline at end of file diff --git a/ios/Podfile.lock b/ios/Podfile.lock index cc195f7c..b1801e73 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -28,11 +28,6 @@ PODS: - AMapFoundation-NO-IDFA (~> 1.6.4) - AMapSearch-NO-IDFA (7.3.0): - AMapFoundation-NO-IDFA (~> 1.6.3) - - BSGridCollectionViewLayout (1.2.5) - - BSImagePicker (2.10.3): - - BSGridCollectionViewLayout (= 1.2.5) - - BSImageView (= 1.0.3) - - BSImageView (1.0.3) - core_location_fluttify (0.0.1): - Flutter - foundation_fluttify @@ -47,9 +42,13 @@ PODS: - Flutter - image_picker (0.0.1): - Flutter - - multi_image_picker (4.7.14): - - BSImagePicker (~> 2.10.3) + - JCore (2.4.0) + - JPush (3.4.0): + - JCore (< 3.0.0, >= 2.0.0) + - jpush_flutter (0.0.2): - Flutter + - JCore (= 2.4.0) + - JPush (= 3.4.0) - package_info (0.0.1): - Flutter - path_provider (0.0.1): @@ -81,7 +80,7 @@ DEPENDENCIES: - fluwx (from `.symlinks/plugins/fluwx/ios`) - foundation_fluttify (from `.symlinks/plugins/foundation_fluttify/ios`) - image_picker (from `.symlinks/plugins/image_picker/ios`) - - multi_image_picker (from `.symlinks/plugins/multi_image_picker/ios`) + - jpush_flutter (from `.symlinks/plugins/jpush_flutter/ios`) - package_info (from `.symlinks/plugins/package_info/ios`) - path_provider (from `.symlinks/plugins/path_provider/ios`) - permission_handler (from `.symlinks/plugins/permission_handler/ios`) @@ -98,10 +97,9 @@ SPEC REPOS: - AMapFoundation-NO-IDFA - AMapLocation-NO-IDFA - AMapSearch-NO-IDFA - - BSGridCollectionViewLayout - - BSImagePicker - - BSImageView - FMDB + - JCore + - JPush - WechatOpenSDK EXTERNAL SOURCES: @@ -123,8 +121,8 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/foundation_fluttify/ios" image_picker: :path: ".symlinks/plugins/image_picker/ios" - multi_image_picker: - :path: ".symlinks/plugins/multi_image_picker/ios" + jpush_flutter: + :path: ".symlinks/plugins/jpush_flutter/ios" package_info: :path: ".symlinks/plugins/package_info/ios" path_provider: @@ -153,16 +151,15 @@ SPEC CHECKSUMS: AMapFoundation-NO-IDFA: 68a24362b110b8e0a3677605d0fd36bdf521f2bb AMapLocation-NO-IDFA: 2a3edfee336b38481b892e1ecc85df0f6b365851 AMapSearch-NO-IDFA: 85555dc9ba312949d39a259baa4ef4e0619fa944 - BSGridCollectionViewLayout: 333dcb457a5a3bdd9212607ab5756553dcfe06cb - BSImagePicker: 07404254f2fcdaf5a2eb403c0f8c337267ce8738 - BSImageView: a149459433a2687157d034c78e059d30ac7f2544 core_location_fluttify: 9466a411ea7d22c6349c7e6a767ae4623f01eb1d Flutter: 0e3d915762c693b495b44d77113d4970485de6ec fluwx: 07a55ed66bf3a4961e836a2a411b02dcada32902 FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a foundation_fluttify: 0c45145e3fad1fb99188e4979daed5b24cd9b278 image_picker: 9c3312491f862b28d21ecd8fdf0ee14e601b3f09 - multi_image_picker: c068931d08240565e0615fb01437d16984909183 + JCore: a29e4b0ee54e1301446dc02d8e1c350404108b34 + JPush: defaa108c38806f6efdcfaf4c416854d25fca8e5 + jpush_flutter: 364b245849348e05377d67295d0896ddd664a896 package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62 path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c permission_handler: eac8e15b4a1a3fba55b761d19f3f4e6b005d15b6 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 826ce97f..9b14e746 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -47,6 +47,7 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + D3872BA325F75CFC0069AC63 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -112,6 +113,7 @@ 97C146F01CF9000F007C117D /* Runner */ = { isa = PBXGroup; children = ( + D3872BA325F75CFC0069AC63 /* Runner.entitlements */, 97C146FA1CF9000F007C117D /* Main.storyboard */, 97C146FD1CF9000F007C117D /* Assets.xcassets */, 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, @@ -372,10 +374,11 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 8; - DEVELOPMENT_TEAM = 89Z9B4EZ45; + DEVELOPMENT_TEAM = R45ZDS6S92; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -392,7 +395,7 @@ "$(PROJECT_DIR)/Flutter", ); MARKETING_VERSION = 1.0.5; - PRODUCT_BUNDLE_IDENTIFIER = com.xmfzn.app; + PRODUCT_BUNDLE_IDENTIFIER = com.akuCommunity.bee; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -515,10 +518,11 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 8; - DEVELOPMENT_TEAM = 89Z9B4EZ45; + DEVELOPMENT_TEAM = R45ZDS6S92; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -535,7 +539,7 @@ "$(PROJECT_DIR)/Flutter", ); MARKETING_VERSION = 1.0.5; - PRODUCT_BUNDLE_IDENTIFIER = com.xmfzn.app; + PRODUCT_BUNDLE_IDENTIFIER = com.akuCommunity.bee; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -552,10 +556,11 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 8; - DEVELOPMENT_TEAM = 89Z9B4EZ45; + DEVELOPMENT_TEAM = R45ZDS6S92; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -572,7 +577,7 @@ "$(PROJECT_DIR)/Flutter", ); MARKETING_VERSION = 1.0.5; - PRODUCT_BUNDLE_IDENTIFIER = com.xmfzn.app; + PRODUCT_BUNDLE_IDENTIFIER = com.akuCommunity.bee; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift index 70693e4a..adc5e127 100644 --- a/ios/Runner/AppDelegate.swift +++ b/ios/Runner/AppDelegate.swift @@ -7,6 +7,9 @@ import Flutter _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { + // if #available(iOS 10.0, *) { + // UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate + // } GeneratedPluginRegistrant.register(with: self) return super.application(application, didFinishLaunchingWithOptions: launchOptions) } diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index dc2cdc5d..379b6e32 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -6,8 +6,6 @@ $(DEVELOPMENT_LANGUAGE) CFBundleExecutable $(EXECUTABLE_NAME) - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion @@ -17,11 +15,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - $(MARKETING_VERSION) + $(FLUTTER_BUILD_NAME) CFBundleSignature ???? - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) LSRequiresIPhoneOS MinimumOSVersion diff --git a/ios/Runner/Runner.entitlements b/ios/Runner/Runner.entitlements new file mode 100644 index 00000000..903def2a --- /dev/null +++ b/ios/Runner/Runner.entitlements @@ -0,0 +1,8 @@ + + + + + aps-environment + development + + diff --git a/lib/main.dart b/lib/main.dart index a14bb29f..91612508 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -43,6 +43,8 @@ void main() async { production: false, debug: true, // 设置是否打印 debug 日志 ); + jpush.applyPushAuthority( + new NotificationSettingsIOS(sound: true, alert: true, badge: true)); DeveloperUtil.setDev(true); runApp(MyApp()); } diff --git a/lib/pages/message_center_page/message_center_page.dart b/lib/pages/message_center_page/message_center_page.dart index 23fe2038..21b111e5 100644 --- a/lib/pages/message_center_page/message_center_page.dart +++ b/lib/pages/message_center_page/message_center_page.dart @@ -4,6 +4,7 @@ import 'package:flutter/material.dart'; // Package imports: import 'package:badges/badges.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; +import 'package:jpush_flutter/jpush_flutter.dart'; import 'package:provider/provider.dart'; // Project imports: @@ -82,9 +83,26 @@ class _MessageCenterPageState extends State { actions: [ MaterialButton( onPressed: () async { - await NetUtil().dio.get(API.message.allRead); - _refreshController.callRefresh(); - setState(() {}); + // await NetUtil().dio.get(API.message.allRead); + // _refreshController.callRefresh(); + // setState(() {}); + LocalNotification localNotification = LocalNotification( + id: 234, + title: 'notification title', + buildId: 1, + content: 'notification content', + fireTime: DateTime.fromMillisecondsSinceEpoch( + DateTime.now().millisecond + 3000), + subtitle: 'notification subtitle', // 该参数只有在 iOS 有效 + badge: 5, // 该参数只有在 iOS 有效 + extra: {'test': 'test'}, + // 设置 extras ,extras 需要是 Map + ); + JPush().sendLocalNotification(localNotification).then((res) { + print(res); + }); + // JPush().applyPushAuthority(new NotificationSettingsIOS( + // sound: true, alert: true, badge: true)); }, child: '全部已读'.text.size(28.sp).black.make(), padding: EdgeInsets.symmetric(horizontal: 32.w), diff --git a/lib/provider/app_provider.dart b/lib/provider/app_provider.dart index 5291218f..97daf14b 100644 --- a/lib/provider/app_provider.dart +++ b/lib/provider/app_provider.dart @@ -1,4 +1,6 @@ // Flutter imports: +import 'dart:io'; + import 'package:flutter/material.dart'; // Package imports: