AppDelegate.m 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #import "AppDelegate.h"
  2. #import "GeneratedPluginRegistrant.h"
  3. #import <flutter_aliyun_push/FlutterAliyunPushPlugin.h>
  4. @implementation AppDelegate
  5. - (BOOL)application:(UIApplication *)application
  6. didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  7. [FlutterAliyunPushPlugin initKey:@"333354905" appSecret:@"eeb5f0e8b09442b29b64658a0c5fa9b7"];
  8. [GeneratedPluginRegistrant registerWithRegistry:self];
  9. // Override point for customization after application launch.
  10. return [super application:application didFinishLaunchingWithOptions:launchOptions];
  11. }
  12. /*
  13. * APNs注册成功回调,将返回的deviceToken上传到CloudPush服务器
  14. */
  15. //- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
  16. // NSLog(@"appdelegate didRegisterForRemoteNotificationsWithDeviceToken ---");
  17. // [FlutterAliyunPushPlugin application:application
  18. // didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
  19. //}
  20. /*
  21. * APNs注册失败回调
  22. */
  23. //- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error {
  24. // NSLog(@"didFailToRegisterForRemoteNotificationsWithError %@", error);
  25. //}
  26. /*
  27. * App处于启动状态时,通知打开回调
  28. */
  29. //- (void)application:(UIApplication*)application didReceiveRemoteNotification:(NSDictionary*)userInfo {
  30. // NSLog(@"didReceiveRemoteNotification------- Receive one notification.");
  31. //// [FlutterAliyunPushPlugin application:application didReceiveRemoteNotification:userInfo];
  32. //
  33. //}
  34. #pragma mark 禁止横屏
  35. - (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window {
  36. return UIInterfaceOrientationMaskPortrait;
  37. }
  38. @end