Disclosure of Invention
The invention mainly aims to provide a method and a system for realizing the online updating of iOS application, aiming at solving the defect that the user experience is deteriorated due to the long updating period when bug occurs in the prior art.
In order to achieve the above object, the present invention provides a method for implementing online update of an iOS application, comprising the steps of:
writing an automatic replacement method framework and integrating the automatic replacement method framework into the application of the client;
the server side sends a messenger file to the client side;
and the client reads the messenger file and executes updating operation on the corresponding application through the automatic replacement method framework.
Wherein the automatic replacement method framework is written using the objective-c dynamic language property.
Wherein the messenger file is written by lua, javascript or html5 script language.
Wherein, the step that the server sends the messenger file to the client further comprises:
deploying a messenger file issuing interface at the server end; when the update is needed, the server side sends the messenger file to the client side through the messenger file sending interface.
And in the step of reading the messenger file by the client and executing the updating operation on the corresponding application through the automatic replacement method framework, the client executes the updating operation through the automatic replacement method framework when the corresponding application is online.
A system for realizing iOS application online update comprises a server side and a client side;
the server is used for issuing messenger files to the client;
and the client integrates an automatic replacement method framework in the application and is used for executing updating operation on the corresponding application through the automatic replacement method framework when receiving the messenger file from the server.
The server is also provided with a messenger file issuing interface for the client to call.
In the method and the system for realizing the online update of the iOS application, because the automatic replacement method framework is integrated in each application of the client, when the application is updated due to the need of an application change function or bug repair and the like, the server can directly send messenger files to the client, and the automatic update operation is completed by the automatic replacement method framework in the client application, so that the application can be updated in real time, including function modification, bug repair and the like, the influence on the use of a user due to long-term bug occurrence is avoided, and the user experience is greatly improved.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
A mobile terminal implementing various embodiments of the present invention will now be described with reference to the accompanying drawings. In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in themselves. Thus, "module" and "component" may be used in a mixture.
The method for realizing the online updating of the iOS application provided by the embodiment mainly comprises the following three stages: the client side compiles a framework of an automatic replacement method, the server sends a messenger file to the client side, and the client side automatically replaces an application program. As will be described in detail below.
The first stage is as follows: client writing replacement method framework
First, the iOS developer writes an auto-replace method framework using the object-c dynamic language property. This automatic replacement method framework is then integrated into the client's application.
And a second stage: the server sends the messenger file to the client
First, iOS developers write scripting languages as messenger files. Then, the server transmits the messenger file to the client in a file form.
And a third stage: client-side auto-replace application
First, the client downloads the messenger file from the server and stores it locally in the handset. Then, the script language in the letter is read to replace the method in the application program.
The implementation method of the present invention is described below by taking an online bug modification as an example, and referring to fig. 1, the implementation method includes the following steps:
step 101, a client developer writes an automatic replacement method framework by using the object-c dynamic language characteristics and integrates the automatic replacement method framework into an application, so that the application has an on-line bug modification function.
And step 102, deploying an interface capable of sending the messenger file by the server side for the client side to call.
Step 103, the client application is on line and finds some bugs, wherein some fatal bugs may cause the program to crash.
And step 104, the client developer writes messenger files by applying scripting languages such as lua, javascript, html5 and the like according to the discovered bugs.
Step 105, the server sends the messenger file to the client.
And 106, the client receives the messenger file issued by the server during running, reads the messenger file and automatically replaces the application method with the bug by the automatic replacement method framework, so that the bug is successfully modified.
Correspondingly, referring to fig. 2, the embodiment further provides a system for implementing online update of the iOS application, including a server and a client; wherein,
the server is deployed with a messenger file issuing interface and used for issuing a messenger file to the client through the messenger file issuing interface when the application needs to be updated;
and the client integrates an automatic replacement method framework in the application and is used for executing updating operation on the corresponding application through the automatic replacement method framework when receiving the messenger file from the server.
In the system, according to different requirements, the server side can actively send the messenger file to the client side, and the client side can also actively request the server side to acquire the messenger file, so that the use experience of a user can be further improved.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.