A method for reporting transactions on mobile IOS applications
By using message notifications and long-term connections with APNs servers in mobile iOS applications, the problem of the application being unable to broadcast in the background and unstarted state is solved, enabling normal broadcasting in any state, being compatible with different iOS systems, and solving many problems. Issues reported within a short period of time.
Patent Information
- Application Number
- CN202210835468.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-15
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2042-07-15
AI Technical Summary
In the existing technology, the mobile iOS application cannot perform transaction reporting in the background and is not started, and Apple's review policy limits the VoIP wake-up function, resulting in the traditional solution failing to pass the review.
By implementing the message notification function, using the UserNotifications library and APNs server, registering remote notification permissions, maintaining long connections, parsing and broadcasting transaction notifications, ensure normal broadcasting in any application state.
It achieves the normal broadcast of transaction notifications in any application state (foreground, background, killed), is compatible with different iOS system versions, avoids audit risks, and ensures the stability and sequential playback of transaction broadcasts.
Smart Images

Figure CN115361441B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet technology, and more specifically, to a method for broadcasting transactions of mobile iOS applications. Background Art
[0002] In the prior art, based on the demand for voice broadcasting on the mobile IOS system platform, the following solutions are generally adopted: First, use the Notification Service Extension class + the sound synthesizer AVSpeechSynthesizer provided by Apple to realize transaction broadcasting. Apple officially no longer supports the synthesis of speech and text-to-speech (AVSpeechSynthesizer) broadcasting behavior in the push notification extension class NotificationService in iOS 12.1 and later system versions. The push extension system allocates very few memory resources, and calling AVSpeechSynthesizer to synthesize voice broadcast will cause memory overflow and hang up. Second, use the audio player AVPlayer to play audio, keep it alive when the program enters the background, keep it alive through positioning and other methods, and stay in the pseudo-background. It can play, but it is very unstable; by adding the background playback audio feature in the plist, it indicates which functions you want to run in the background. Due to Apple's strict review and control of APP, it is very likely that the function will not be recognized and rejected. More importantly, both methods have the problem that the program cannot be broadcast when it is not opened or killed. Third, use VoIP to wake up the APP and then make voice announcements. VoIP can realize the function, but generally, APPs that do transaction announcements and management tools do not provide this kind of Internet phone function. Due to Apple's strict review, APPs without VoIP functions cannot pass Apple's review. After all, Apple is still very cautious about giving the function of arbitrarily waking up the program. Fourth, Notification Service Extension Class NotificationService Extension + Local Notification Sound Reminder. In iOS15 and above systems, Apple has modified the rules of local notifications. According to the previous method of not setting the title and modifying the Sound method, it is no longer possible to broadcast. Summary of the invention
[0003] In order to overcome the shortcomings of the prior art, the present invention provides a method for broadcasting transactions of mobile iOS applications, which solves the disadvantage that general broadcasting solutions can only broadcast when the application is active, and cannot broadcast in the background or when the application is not started.
[0004] The technical solution adopted by the present invention to solve the technical problem is: a method for broadcasting transactions of mobile IOS applications, the improvement of which is that the method comprises the following steps:
[0005] S10, receiving messages from the backend by implementing message notification;
[0006] S20. After completing the APP client's receiving message notification, the server needs to implement sending notification;
[0007] S30. Complete the sending and receiving of APP client message notifications through steps S10 and S20, and implement the notification extension class to solve the background reception of message notifications and transaction broadcasting;
[0008] S40. Through step S30, the message notification sent by the backend server is parsed in the message notification extension class to obtain an array of audio names of the transaction notification;
[0009] S50. Obtain the audio name array of the transaction notification that needs to be broadcast through step S40. If the transaction needs to be broadcast, place the audio file used in the project root directory;
[0010] S60: Parse the transaction notification received by the client APP, and broadcast the transaction through the audio file built into the APP.
[0011] Furthermore, the step S10 includes the following steps:
[0012] S101. Project configuration APP supports message notification function: Go to Xcode to open the project where the target APP is located; Go to the background operation mode Background Modes under the project configuration Signing & Capabilities to turn on the remote notification Remote notifications switch to support the application to receive remote notifications;
[0013] S102. Import notification library and implement protocol methods: Go to the AppDelegate class that manages the entire application life cycle to introduce the message notification UserNotifications library, and implement the notification protocol UNUserNotificationCenterDelegate;
[0014] S103, registering the device: when the target client APP running on the IOS device starts the application, it applies for notification permission from the system through the requestAuthorizationWithOptions method of requesting notification permission; at the same time, it registers with Apple's Apple Push Notification Service APNs through the didRegisterForRemoteNotificationsWithDeviceToken method of registering push devices. After successful registration, the Apple Push Notification Service APNs returns a devicetoken, which is the identifier of the current mobile device, to the current APP;
[0015] S104, associating the user account with the device information identifier: after the client APP registers with the Apple Push Notification Service APNs and obtains the device token of the current application on the device, it will send it to the target application server that the client APP needs to connect to. The target server associates the user information with the application device identifier device token and stores it;
[0016] S105, notification sending and receiving: When sending a message notification, the target application server packages the message in a specified format, and then sends it to Apple's APNs server together with the device token of the iOS device;
[0017] The APNs server and the client APP maintain a long connection based on TCP. The APNs server will locate the device based on the devicetoken and push new messages to the corresponding IOS device. At this time, the device can receive the message notification pushed by APNs, and receive and parse it in the protocol method for receiving the message notification.
[0018] Furthermore, the step S20 includes the following steps:
[0019] S201. Before sending a notification, generate a certificate for the JAVA backend to connect to APNS: open the keychain, select the push certificate corresponding to Apple Development, and export it;
[0020] S202, sending a message notification. The server where the APP is located sends a message to APNs, and then APNs sends the message to the device where the target APP is located.
[0021] Furthermore, step S202 is divided into the following three stages:
[0022] In the first stage, the Push server application packages the message to be sent and the target iPhone's ID and sends it to APNS;
[0023] In the second stage, APNS searches for an iPhone device with a corresponding ID in its own list of iPhones that have registered for Push service, and sends the message to the corresponding iPhone.
[0024] In the third stage, the iPhone passes the message to the corresponding application and pops up a Push notification according to the settings.
[0025] Furthermore, step S30 includes the following steps:
[0026] S301. Create a notification extension class: Use the iOS code editor Xcode, go to the File menu of Xcode, and create a new notification extension class Target;
[0027] S302, go to the message extension class Extension to implement the receiving notification method for receiving messages and logical processing;
[0028] S303: Parse the message received in step S402, determine whether the notification needs to be broadcast according to the agreed parameter definition, and broadcast it according to the parsed data.
[0029] Furthermore, in step S40, the message notification is parsed in the message notification extension class Notification Service Extension.
[0030] Furthermore, step S40 includes the following steps:
[0031] S401. According to steps S10, S20, and S30, after receiving the message notification, the APP client executes the method for receiving the notification message in the message notification extension class;
[0032] S402, by obtaining the message body in the request body in step S401, judging whether to broadcast according to the agreed type of broadcast and the value of whether to broadcast;
[0033] S403, when the parsed message is received and no notification message needs to be broadcasted, the notification trigger callback method is called and a message notification bar pops up;
[0034] S404, when the notification message that needs to be broadcast is received, the transaction type and transaction amount are parsed;
[0035] Create an array and put the audio file name corresponding to the received amount type at the first place in the array;
[0036] Change the amount serial number into an amount string, and add each audio file name corresponding to the string to the above array in turn; put the audio file name corresponding to the amount unit at the end of the array.
[0037] Furthermore, step S50 includes the following steps:
[0038] S501. Agree on the transaction type required for the client APP and the target server to interact, including the amount and the unit of the amount;
[0039] S502. Convert the amount, the amount unit, and the text of the amount unit into a voice file and put it in the root directory of the project where the target APP is located, which is used as the basic audio file for synthesizing the final transaction broadcast; when a transaction broadcast is required, separate the transaction type and transaction amount, combine the amount units together, and then broadcast them one by one in order, so as to achieve a complete transaction broadcast;
[0040] S503. Any amount of data can be matched by the 0-9 numbers of the basic audio plus each audio of the unit and the decimal point. Finally, the target transaction type is placed at the first place of an array, and each number and unit of the transaction amount is placed after the transaction type in order. Finally, the amount unit is placed at the end of the target array, so that it can be broadcasted in order;
[0041] S404: traverse the target array, obtain the corresponding audio file path and play it.
[0042] Furthermore, step S60 includes the following steps:
[0043] S601, traverse the array of audio files obtained, and map them with the voice files in the APP resource package, parse the duration of the voice files, and add semaphores to control the playback duration of each split audio and serial broadcast through the semaphores;
[0044] S602. Before iOS 14, local notifications can modify the voice of notifications by setting the notification title and the notification sound to achieve audio broadcasting.
[0045] In iOS 15 and later, you can set the title or body of a local notification to play a custom voice.
[0046] S603: Perform compatibility processing on different versions of IOS systems.
[0047] Furthermore, after step S60, the following steps are further included:
[0048] S70. The broadcast of a single message notification is completed through step S60. The client APP receives multiple message notifications at one time and performs serial broadcast.
[0049] The beneficial effect of the present invention is that a mobile iOS application transaction broadcasting method of the present invention solves the shortcoming that general broadcasting can only be performed when the application is active. The broadcasting function implemented by this solution can broadcast normally regardless of whether the application is in the foreground, background, or killed. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 It is a flow chart of a method for broadcasting transactions of a mobile iOS application of the present invention.
[0051] Figure 2 FIG. 4 is a diagram showing a specific embodiment of step S10 in the present invention. DETAILED DESCRIPTION
[0052] The present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0053] The following will clearly and completely describe the concept, specific structure and technical effects of the present invention in combination with the embodiments and drawings, so as to fully understand the purpose, characteristics and effects of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, other embodiments obtained by technicians in this field without creative work are all within the scope of protection of the present invention. In addition, all the connection / connection relationships involved in the patent do not refer to the direct connection of components, but refer to the formation of a better connection structure by adding or reducing connection accessories according to the specific implementation situation. The various technical features in the invention can be combined interchangeably without conflicting with each other.
[0054] Reference Figure 1 As shown, the present invention discloses a method for broadcasting transactions of mobile IOS applications. Specifically, the method includes steps S10-S70, and the specific contents are as follows:
[0055] S10, receiving messages from the backend by implementing message notification;
[0056] Combination Figure 2 As shown, in this embodiment, step S10 includes the following steps:
[0057] S101. Project configuration APP supports message notification function: Go to Xcode to open the project where the target APP is located; Go to the background operation mode Background Modes under the project configuration Signing & Capabilities to turn on the remote notification Remote notifications switch to support the application to receive remote notifications;
[0058] S102. Import notification library and implement protocol methods: Go to the AppDelegate class that manages the entire application life cycle to introduce the message notification UserNotifications library, and implement the notification protocol UNUserNotificationCenterDelegate;
[0059] S103, registering the device: when the target client APP running on the IOS device starts the application, it applies for notification permission from the system through the requestAuthorizationWithOptions method of requesting notification permission; at the same time, it registers with Apple's Apple Push Notification Service APNs through the didRegisterForRemoteNotificationsWithDeviceToken method of registering push devices. After successful registration, the Apple Push Notification Service APNs returns a devicetoken, which is the identifier of the current mobile device, to the current APP;
[0060] S104, associating the user account with the device information identifier: after the client APP registers with the Apple Push Notification Service APNs and obtains the device token of the current application on the device, it will send it to the target application server that the client APP needs to connect to. The target server associates the user information with the application device identifier device token and stores it;
[0061] S105, notification sending and receiving: When sending a message notification, the target application server packages the message in a specified format, and then sends it to Apple's APNs server together with the device token of the iOS device;
[0062] The APNs server and the client APP maintain a long connection based on TCP. The APNs server will locate the device based on the devicetoken and push new messages to the corresponding IOS device. At this time, the device can receive the message notification pushed by APNs and receive and parse it in the protocol method for receiving message notifications - (void)APPlication:(UIAPPlication*)APPlicationdidReceiveRemoteNotification:(nonnull NSDictionary*)userInfofetchCompletionHandler:(nonnull void(^)(UIBackgroundFetchResult))completionHandler.
[0063] S20. After completing the APP client's receiving message notification, the server needs to implement sending notification;
[0064] In this embodiment, the step S20 includes the following steps:
[0065] S201. Before sending a notification, generate a certificate for the JAVA backend to connect to APNS: open the keychain, select the push certificate corresponding to Apple Development, and export it;
[0066] S202, sending a message notification. The server where the APP is located sends a message to APNs, and then APNs sends the message to the device where the target APP is located.
[0067] It should be noted that step S202 is divided into the following three stages:
[0068] In the first stage, the Push server application packages the message to be sent and the target iPhone's ID and sends it to APNS;
[0069] In the second stage, APNS searches for an iPhone device with a corresponding ID in its own list of iPhones that have registered for Push service, and sends the message to the corresponding iPhone.
[0070] In the third stage, the iPhone passes the message to the corresponding application and pops up a Push notification according to the settings.
[0071] S30. Complete the sending and receiving of APP client message notifications through steps S10 and S20, and implement the notification extension class to solve the background reception of message notifications and transaction broadcasting;
[0072] In this embodiment, step S30 includes the following steps:
[0073] S301. Create a notification extension class: Use the iOS code editor Xcode, go to the File menu of Xcode, and create a new notification extension class Target;
[0074] In this embodiment, create a new notification extension class Target by going to Xcode's File menu -> New -> Application Target -> Notification Service Extension.
[0075] S302, go to the message extension class Extension to implement the notification receiving method - (void)didReceiveNotificationRequest:(UNNotificationRequest*)requestwithContentHandler:(void(^)(UNNotificationContent*_Nonnull))contentHandlerAPI_AVAILABLE(IOS(10.0)) method, which is used to receive messages and perform logical processing;
[0076] S303: Parse the message received in step S402, determine whether the notification needs to be broadcast according to the agreed parameter definition, and broadcast it according to the parsed data.
[0077] S40. Through step S30, the message notification sent by the backend server is parsed in the message notification extension class to obtain an array of audio names of the transaction notification;
[0078] In step S40, the message notification is parsed in the message notification extension class Notification Service Extension; and in this embodiment, the step S40 includes the following steps:
[0079] 1. S401. According to steps S10, S20 and S30, after receiving the message notification, the APP client executes the method for receiving the notification message in the message notification extension class -- (void)didReceiveNotificationRequest:(UNNotificationRequest*)request withContentHandler:(void(^)(UNNotificationContent*_Nonnull))contentHandler API_AVAILABLE(IOS(10.0)){};
[0080] S402, by obtaining the message body in the request body in step S401, judging whether to broadcast according to the agreed type of broadcast and the value of whether to broadcast;
[0081] S403, when the parsed message is received and no notification message needs to be broadcasted, the notification trigger callback method is called and a message notification bar pops up;
[0082] S404, when the notification message that needs to be broadcast is received, the transaction type and transaction amount are parsed;
[0083] Create an array and put the audio file name corresponding to the received amount type at the first place in the array;
[0084] Change the amount serial number into an amount string, and add each audio file name corresponding to the string to the above array in turn; put the audio file name corresponding to the amount unit at the end of the array.
[0085] S50. Obtain the audio name array of the transaction notification that needs to be broadcast through step S40. If the transaction needs to be broadcast, place the audio file used in the project root directory;
[0086] Step S50 includes the following steps:
[0087] S501. Agree on the transaction type required for the client APP and the target server to interact, including the amount digit and the amount unit; for example, the amount digit is 0, 1, 2, 3, 4, 5, 6, 7, 8, 9; the amount unit is one, ten, hundred, thousand, ten thousand, hundred million, point;
[0088] S502. Convert the amount, the amount unit, and the text of the amount unit into a voice file and put it in the root directory of the project where the target APP is located, which is used as the basic audio file for synthesizing the final transaction broadcast; when a transaction broadcast is required, separate the transaction type and transaction amount, combine the amount units together, and then broadcast them one by one in order, so as to achieve a complete transaction broadcast;
[0089] S503. Any amount of data can be matched by the 0-9 numbers of the basic audio plus each audio of the unit and the decimal point. Finally, the target transaction type is placed at the first place of an array, and each number and unit of the transaction amount is placed after the transaction type in order. Finally, the amount unit is placed at the end of the target array, so that it can be broadcasted in order;
[0090] S404: traverse the target array, obtain the corresponding audio file path and play it.
[0091] S60, parsing the transaction notification received by the client APP, and broadcasting the transaction through the audio file built into the APP;
[0092] In this embodiment, step S60 includes the following steps:
[0093] S601, traverse the array of audio files obtained, and map them with the voice files in the APP resource package, parse the duration of the voice files, and add semaphores to control the playback duration of each split audio and serial broadcast through the semaphores;
[0094] S602. Before iOS 14, local notifications can modify the voice of notifications by setting the notification title and the notification sound to achieve audio broadcasting.
[0095] In iOS 15 and later, you can set the title or body of a local notification to play a custom voice.
[0096] S603: Perform compatibility processing on different versions of IOS systems.
[0097] S70. The broadcast of a single message notification is completed through step S60. The client APP receives multiple message notifications at one time and performs serial broadcast.
[0098] In this embodiment, step S70 includes the following steps:
[0099] S701, receiving multiple notifications that need to be broadcast, storing the data of these notifications in order using a notification array, and then broadcasting them in order;
[0100] S702, the entire life cycle from the notification bar being popped up to the notification bar being finally closed is only 6 seconds. For those multiple notifications arriving at the same time, they need to be broadcasted one by one in series. If they are not processed, only part of them will be broadcasted, the voice will be interrupted, and the following notifications will not be broadcasted;
[0101] S703. By controlling the time of the notification trigger callback method self.contentHandler(), the notification bar call-out timing is controlled, thereby controlling the serial broadcast of transaction notifications. This solves the problem that when the first notification comes, the first voice is broadcasted, and the notification bar pops up after the first broadcast is completed; when the second day's voice is broadcasted, the notification bar cycle time is up when the second day's voice is halfway through, and the notification bar will be folded at this time, and the code in the extension class will terminate execution, resulting in the termination of the subsequent voice broadcast.
[0102] S704, the serial broadcast involved in the above S703, for versions before IOS14, uses a semaphore to control the current message dispatch_semaphore_t to notify the playback of each audio in the audio array, and all audio files in the array are played.
[0103] S705. For IOS14 and later versions, the serial broadcast involved is broadcasted by using the result callback in the audio track synthesis method exportAsynchronouslyWithCompletionHandler and the sound creation and broadcasting method AudioServicesPlaySystemSoundWithCompletion of the system sound service SystemSoundServices.
[0104] S706. Perform different versions of the broadcast through S704 and S705. After the broadcast is completed, the callback function completeHandler() of the completed broadcast is used to inform the upstream. At this time, self.contentHandler() is triggered to call out the notification bar to inform that the current transaction notification broadcast is completed, and the next notification is broadcasted. At the same time, the notification in the notification array in 1 is removed.
[0105] S707. The above S702 to S705 complete the serial broadcast of different system versions, solving the problem that some notifications cannot be broadcast when multiple message notifications are received at one time.
[0106] A mobile iOS application transaction broadcasting method of the present invention implements functions under Apple's compliance policies without any risk of being rejected by review; it solves the disadvantage that general broadcasts can only be broadcast when the application is active. The broadcasting function implemented by this solution can broadcast normally regardless of whether the application is in the foreground, background, or killed; it solves the broadcasting compatibility problem under different IOS systems, ensuring that the current mainstream IOS systems can perform normal transaction broadcasting; it solves the broadcasting problem of receiving multiple transaction notifications in a short period of time, and realizes serial broadcasting in sequence.
[0107] The above is a specific description of the preferred implementation of the present invention, but the invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.
Claims
1. A method for reporting transactions on a mobile IOS application, characterized in that: The method comprises the following steps: S10, receiving messages from the backend by implementing message notification; The step S10 includes the following steps: S101. Project configuration APP supports message notification function: Go to Xcode to open the project where the target APP is located; Go to the background operation mode Background Modes under the project configuration Signing & Capabilities to turn on the remote notification Remote notifications switch to support the application to receive remote notifications; S102. Import notification library and implement protocol methods: Go to the AppDelegate class that manages the entire application life cycle to introduce the message notification UserNotifications library, and implement the notification protocol UNUserNotificationCenterDelegate; S103, registering the device: when the target client APP running on the IOS device starts the application, it applies for notification permission from the system through the requestAuthorizationWithOptions method of requesting notification permission; at the same time, it registers with Apple's Apple Push Notification Service APNs through the didRegisterForRemoteNotificationsWithDeviceToken method of registering push devices. After successful registration, the Apple Push Notification Service APNs returns a devicetoken, which is the identifier of the current mobile device, to the current APP; S104, associating the user account with the device information identifier: after the client APP registers with the Apple Push Notification Service APNs and obtains the device token of the current application on the device, it will send it to the target application server that the client APP needs to connect to. The target server associates the user information with the application device identifier device token and stores it; S105, notification sending and receiving: When sending a message notification, the target application server packages the message in a specified format, and then sends it to Apple's APNs server together with the device token of the iOS device; The APNs server and the client APP maintain a long connection based on TCP. The APNs server will locate the device based on the devicetoken and push new messages to the corresponding iOS device. At this time, the device can receive the message notification pushed by APNs and receive and parse it in the protocol method of receiving the message notification. S20. After completing the APP client's receiving message notification, the server needs to implement sending notification; S30. Complete the sending and receiving of APP client message notifications through steps S10 and S20, and implement the notification extension class to solve the background reception of message notifications and transaction broadcasting; S40. Through step S30, the message notification sent by the backend server is parsed in the message notification extension class to obtain an array of audio names of the transaction notification; S50. Obtain the audio name array of the transaction notification that needs to be broadcast through step S40. If the transaction needs to be broadcast, place the audio file used in the project root directory; S60: Parse the transaction notification received by the client APP, and broadcast the transaction through an audio file built into the APP.
2. A method for broadcasting mobile IOS application transactions according to claim 1, characterized in that: The step S20 includes the following steps: S201. Before sending notifications, generate a certificate for the JAVA backend to connect to APNS: Open the keychain, select the push certificate corresponding to Apple Development, and export it; S202, sending a message notification. The server where the APP is located sends a message to APNs, and then APNs sends the message to the device where the target APP is located.
3. A method for broadcasting mobile IOS application transactions according to claim 2, characterized in that: In step S202, there are three stages: In the first stage, the Push server application packages the message to be sent and the target iPhone's ID and sends it to APNS; In the second stage, APNS searches for an iPhone device with a corresponding ID in its own list of iPhones that have registered for the Push service, and sends the message to the corresponding iPhone. In the third stage, the iPhone passes the message to the corresponding application and pops up a Push notification according to the settings.
4. A method for broadcasting mobile IOS application transactions according to claim 1, characterized in that: Step S30 includes the following steps: S301. Create a notification extension class: Use the iOS code editor Xcode, go to the File menu of Xcode, and create a new notification extension class Target; S302, go to the message extension class Extension to implement the receiving notification method for receiving messages and logical processing; S303: Parse the message received in step S302, determine whether the message notification needs to be broadcast according to the agreed parameter definition, and broadcast it according to the parsed data.
5. A method for broadcasting mobile IOS application transactions according to claim 4, characterized in that: In step S40, the message notification is parsed in the message notification extension class Notification Service Extension.
6. A method for broadcasting mobile IOS application transactions according to claim 5, characterized in that: Step S40 includes the following steps: S401. According to steps S10, S20, and S30, after receiving the message notification, the APP client executes the method for receiving the notification message in the message notification extension class; S402, by obtaining the message body in the request body in step S401, judging whether to broadcast according to the agreed type of broadcast and the value of whether to broadcast; S403, when the parsed message is received and no notification message needs to be broadcasted, the notification trigger callback method is called and a message notification bar pops up; S404, when the notification message that needs to be broadcast is received, the transaction type and transaction amount are parsed; Create an array and put the audio file name corresponding to the received amount type at the first place in the array; Change the amount serial number into an amount string, and add each audio file name corresponding to the string to the above array in turn; put the audio file name corresponding to the amount unit at the end of the array.
7. A method for broadcasting mobile IOS application transactions according to claim 6, characterized in that: Step S50 includes the following steps: S501. Agree on the transaction type required for the client APP and the target server to interact, including the amount and the unit of the amount; S502. Convert the amount, the amount unit, and the text of the amount unit into a voice file and put it in the root directory of the project where the target APP is located, which is used as the basic audio file for synthesizing the final transaction broadcast; when a transaction broadcast is required, separate the transaction type and transaction amount, combine the amount units together, and then broadcast them one by one in order, so as to achieve a complete transaction broadcast; S503. Any amount of data can be matched by the 0-9 numbers of the basic audio plus each audio of the unit and the decimal point. Finally, the target transaction type is placed at the first place of an array, and each number and unit of the transaction amount is placed after the transaction type in order. Finally, the amount unit is placed at the end of the target array, so that it can be broadcasted in order; S404: traverse the target array, obtain the corresponding audio file path and play it.
8. A method for broadcasting mobile IOS application transactions according to claim 7, characterized in that: Step S60 includes the following steps: S601, traverse the array of audio files obtained, and map them with the voice files in the APP resource package, parse the duration of the voice files, and add semaphores to control the playback duration of each split audio and serial broadcast through the semaphores; S602. Before iOS 14, local notifications can modify the voice of notifications by setting the notification title and the notification sound to achieve audio broadcasting. In iOS 15 and later, you can set the title or body of a local notification to play a custom voice. S603: Perform compatibility processing on different versions of IOS systems.
9. A method for broadcasting mobile IOS application transactions according to claim 1, characterized in that: After step S60, the following steps are also included: S70. The broadcast of a single message notification is completed through step S60. The client APP receives multiple message notifications at one time and performs serial broadcast.
