IOS 13 is coming soon, detailed explanation of IOS push devicetoken adaptation scheme

Time:2020-1-21

As apple IOS 13 system is about to be released, gepush has launched the devicetoken adaptation scheme in advance to ensure the compatibility of the new version and the normal use of APP push service. An important change of IOS 13 is “[devicetoken
Description] “it will change under the influence of different operating environments and systems. If the adaptation work is not done in time, the SDK will be bound to the wrong devicetoken, which will affect the APN push. Please make corresponding updates and optimizations according to the current running environment to ensure users have a better use experience on IOS 13 system.

“[devicetoken description]” when xcode11 and ios13 are running, as shown in the following figure:

IOS 13 is coming soon, detailed explanation of IOS push devicetoken adaptation scheme

“[devicetoken” when running xcode11, ios12 or xcode10 and below
Description] “, as shown in the following figure:

IOS 13 is coming soon, detailed explanation of IOS push devicetoken adaptation scheme

According to different scenarios of developers registering devicetoken, a corresponding IOS push SDK adaptation scheme is proposed.

If you use “[getuisdk
Registerdevicetokendata:] method to register devicetoken, as shown in the following figure:

IOS 13 is coming soon, detailed explanation of IOS push devicetoken adaptation scheme

Adaptation scheme (recommended): because the old version of the push SDK does not adapt to xcode11 and ios13 changes, you can choose to upgrade the version of the push SDK to “2.4.1.0” (DOCS. Getui. COM / getui / mobile…). The code processing of this scheme is the easiest.

If the method [getuisdk registerdevicetoken:] is used to register the devicetoken, as shown in the following figure:

IOS 13 is coming soon, detailed explanation of IOS push devicetoken adaptation scheme

Adaptation scheme: because the process of obtaining devicetoken string is to convert nsdata into hexstring. After “[devicetoken description]” changes, developers need to modify the conversion scheme. The reference code is as follows:

IOS 13 is coming soon, detailed explanation of IOS push devicetoken adaptation scheme

The matching of devicetoken is very important for the integration of IOS push SDK. Please choose the appropriate adaptation scheme as early as possible to be more compatible with the new version of apple. If you have any questions, please contact us.

Recommended Today

Summary: NPM common commands and operations

The full name of NPM is (node package manager), which is a package management and distribution tool installed with nodejs. It is very convenient for JavaScript developersDownload, install, upload and manage installed packages。 First of all, the following variables will be used: < name > | < PKG > module name < version > version […]