简体   繁体   中英

Problems with push notification on Enterprise environment

I am facing a problem with Push notification, and the problem occurs only on clients Enterprise environment.

The problem is as follows: when I am testing on my side (development and not distribution) I receive notification and - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo is called every time and works perfectly through the following cases:

  1. When app is not opened (not in memory or suspended apps), and not in background nor foreground
  2. When app is opened but in background.
  3. When app is in foreground.

But when the client tries it on his environment (after mdm wrapping), the following happens in each case:

Case 1: Works successfully, and didReceiveRemoteNotification method gets called fine.

Case 2: Receives notification, but didReceiveRemoteNotification is not called.

Case 3: I don't see any notification neither in notification centre and didReceiveRemoteNotification is not called also.

I searched for anything that could help, and I only found that there is this - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler maybe be a better replacement.

Any other suggestions? Any thing to check or to consider? Is it maybe an iOS related issue? Caused by MDM configuration (a long shot I know)?.

Thanks in advance.

我找到了解决方案,我使用了这种方法- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler非常合适。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM