[Apple calendar push im latest protocol push] APNs will process your push request and return a push response. You need to handle these responses on the server side to know if the push was successful and how to handle possible error or failure conditions.

Apple Push Notification service) is a push service provided by Apple, which allows developers to send push messages to iOS devices.

For example, a set of values: 1E58914B-6EE-50E8-9392 (← this value is also common) My NIC MAC is: A1:B2:C3:D4:E5:F6, so this SMUUID is: 1E58914B-6EEA- from now on 50E8 -9392 -A1B2C3D4E5F6 Paste the SMUUID to the location corresponding to the clover: Check the NIC MAC address: Open the terminal and enter IFConfig and enter the following picture, the Ethernet interposer is your MAC address format (A1:B2:C3:D4: E5:F6) : BoardSerialNumberboardSerialNumber is a set of parameters generated by the device serial number + any 5 letters or numbers generated by Clover. For example, your Clover generated serial number is C02J8YTODNCT, such as your fifth letter: ABCDE, then this BoardSerialNumber is: C02J8YTodnctabcde Fill in the following image, create a file in JSON format, Apple will download the operating program application when we request this file program.
insert image description here

New features of JDK1.5
1. Variable parameters of the method: array
public static int add(int ... arr) { int length = arr.length; int sum = 0; for(int i =0; i < length; i++) { sum = sum + arr[i]; } return sum; } is used at the top of the method... implying variable parameters







The variable parameter must be placed at the end of the method parameter and there is one and only one;

2. for-eanch statement (no more detailed explanation)
3. Dynamic import (import) (comprehension)
import static imports all static fields (methods and attributes) of a class, and
manipulates the static fields of the imported class just like in this class The definition is the same;
the method in that package can be called directly without adding the class name after using static import;

Overly detailed: it is not recommended to use static import;

4. Generic (typical goalkeeper)
definition: The definition of a class or method is not fixed. It must be used when it is used.

alt+insert shortcut import (eg getter(), setter())

ClassCastException (RuntimeException): During a strong cast, an exception occurs between two unrelated classes.

Potential safety hazards: Existing in forced transfers, generics can probably prevent potential safety hazards in downward transformations;

4.1 Generics: The type is not certain when it is defined, and the type can only be determined when it is used carefully.
4.2 Generic
class class MyClass<T, E> { // Generic class can act as multiple types
private T t;
private E e;
}

Black Apple often displays FaceTime and Imessage, unable to log in normally. Regular login is required, you need to mention 3 yards, some posts are even copied above real red Macs. But actually, I hope the above service will work normally, we need to add the parameters of SMUUID, BoardSerialNumber and MLB and ROM.
After that, you can enter the domain name/Apple-App-site relationship or domain name/Mohe Instrument Known/Apple-App-Site-Ksociation in the browser to download. Invoke the app by configuring a well-placed link, re-download and install the app (configured domain name in Xcode), enter the regular link in Safari, open the app, if required this value or Open program in the app For example, NIC MAC is: A1-B2-C3-D4-E5-F6, then ROM is: A1B2C3D4E5F6MLB, your BoardSerialNumber. Paste the cost in BoardSerialNumber.

(void)removeAllNotification { if (@available(iOS 10.0, *)) { UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter]; [center removeAllPendingNotificationRequests]; }else { [[UIApplication sharedApplication] cancelAllLocalNotifications]; } } check authorization Environment - (void )checkUserNotificationEnable { // Determine whether the user is allowed to receive care if (@available(iOS 10.0, *)) { __block BOOL isOn = NO; UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter]; [center getNotificationSettingsWithCompletionHandler:^(UNNotificationSettings * _Nonnull settings ) { if (settings.notificationCenterSetting == UNNotificationSettingEnabled) { isOn = YES; NSLog(@"notification is turned on"); }else { isOn = NO; NSLog(@"notification is turned off");

[self showAlertView]; } }]; }else { if ([[UIApplication sharedApplication] currentUserNotificationSettings].types == UIUserNotificationTypeNone){ NSLog(@"notification blocked"); [self showAlertView]; }else { NSLog(@" The notification is turned on"); } } } - (void)showAlertView { UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Notification" message:@"Notification permission is not obtained, please go to set up" preferredStyle:UIAlertControllerStyleAlert]; [alert addAction: [UIAlertAction actionWithTitle:@“Undo” style:UIAlertActionStyleCancel handler:nil]]; [alert addAction:[UIAlertAction actionWithTitle:@“Configuration” style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { [self goToAppSystemSetting]; }]] ; [self presentViewController:alert animated:YES completion:nil]; } // If the user closes the function of accepting notifications, this method can jump to the APP setting page for modification - (void)goToAppSystemSetting { dispatch_async(dispatch_get_main_queue(),^{ UIApplication *application = [UIApplication sharedApplication]; NSURL *url = [NSURL URLWithString:UIApplicationOpenSettingsURLString]; if ([application canOpenURL:url]) { if (@available(iOS 10.0, *))

Register a developer account and create a push certificate: You need to register an Apple developer account and create a developer certificate for the push service. These certificates are used for authentication and authorization.

Configure application push settings: In the Apple developer account, you need to configure the push settings of the application, including the content and actions of enabling push services, configuring certificates, and setting push notifications.

In the process of use, there is an error message after adjustment after iOS9: This application is modifying the autolayout engine from a background thread, which can lead to engine corruption and weird crashes. This will cause an exception in a future release. AFSessionManager *mgr = [AFHTTPSessionManager manager]; [mgr.responseSerializer setAcceptableContentTypes: [NSSet setWithObjects:@“application/json”, @“text/json”, @“text/javascript”,@“text/html”, nil]]; NSMutableDictionary * dict = [NSMutableDictionary dictionary]; dict[@"id"] = @"123456789";//

insert image description here

NSDictionary *dict = array[0]; if ([dict[@“version”] floatValue] > [subVersion floatValue]) { //If you have this version, please be careful if your version number is 1.1 .1 In the format of 1.1.1.1 or so, it cannot be directly converted to floatValue, and it is more decisive to find a way by yourself. UIWindow *alertWindow = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; alertWindow.rootViewController = [[UIViewController alloc] init]; alertWindow.windowLevel = UIWindowLevelAlert + 1; [alertWindow makeKeyAndVisible]; UIAlertController * alert = [UIAlertController alertControllerWithTitle:@“Update Reminder” message:@“A new version has been found. In order to ensure the normal use of various functions, please update first.”

Obtaining a device token: Every iOS device has a unique device token, which is used to identify the device. You need to implement the toll notification registration flow in your app to get a device token and send it to your server.

Create a connection with APNs: On your server side, you need to use the APNs communication protocol to establish a connection with APNs. APNs provides a presumably older binary communication protocol based on HTTP/2.

Create a push request: Once the connection with APNs is established, you can create a push request and send the relevant information of the push message to APNs. The push request includes device token, push title, content, sound and other information.
insert image description here

Processing push response: APNs will process your push request and return a push response. You need to handle these responses on the server side to know if the push was successful and how to handle possible error or failure conditions.

It should be noted that communicating with APNs requires specific development techniques and programming knowledge. You can use the development tools provided by Apple (such as Xcode) and related development languages ​​(such as Swift or Objective-C) to realize the communication and push function with APNs.

Apple provides detailed development documents and tutorials, introducing the interaction with APNs and the implementation of push services. It is recommended that you refer to Apple's developer documentation for more detailed guidance and guidelines.

Guess you like

Origin blog.csdn.net/IMEAE/article/details/131282032