CN110990078B - Application initialization method and device, storage medium and mobile terminal - Google Patents

Application initialization method and device, storage medium and mobile terminal Download PDF

Info

Publication number
CN110990078B
CN110990078B CN201911199361.2A CN201911199361A CN110990078B CN 110990078 B CN110990078 B CN 110990078B CN 201911199361 A CN201911199361 A CN 201911199361A CN 110990078 B CN110990078 B CN 110990078B
Authority
CN
China
Prior art keywords
debugging
plug
application
view
registered
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911199361.2A
Other languages
Chinese (zh)
Other versions
CN110990078A (en
Inventor
王右右
陈轩石
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Dasou Vehicle Software Technology Co Ltd
Original Assignee
Zhejiang Dasou Vehicle Software Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Dasou Vehicle Software Technology Co Ltd filed Critical Zhejiang Dasou Vehicle Software Technology Co Ltd
Priority to CN201911199361.2A priority Critical patent/CN110990078B/en
Publication of CN110990078A publication Critical patent/CN110990078A/en
Application granted granted Critical
Publication of CN110990078B publication Critical patent/CN110990078B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3644Software debugging by instrumenting at runtime
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Human Computer Interaction (AREA)
  • Stored Programmes (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application relates to an application initialization method, an application initialization device, a storage medium and a mobile terminal. The method comprises the following steps: responding to the application starting, and generating an object according to the management class of the debugging plug-in to be registered as registration information; the management class follows a preset protocol; the protocol specifies a method for calling the debugging plug-in the view and specifies a view controller class instantiation method of the debugging plug-in; the debugging plug-in packages the debugging method of the application information needing debugging in advance; and registering the debugging plug-in to be registered into the debugging menu according to the registration information, and generating a debugging menu view on the page of the mobile terminal. The method reduces the learning cost of debugging and greatly improves the debugging efficiency. In addition, when a new application debugging requirement exists, the debugging plug-in can be used to finish application debugging by directly registering the new debugging plug-in, and the extension of the plug-in is realized without modifying the source code of the application, so that the stability and the safety of the application are not influenced.

Description

Application initialization method and device, storage medium and mobile terminal
Technical Field
The present application relates to the field of mobile terminal technologies, and in particular, to an application initialization method, an application initialization device, a storage medium, and a mobile terminal.
Background
With the development of the technical field of mobile terminals, especially the continuous iteration of software, the functions and requirements of various applications are endless. In the development and testing stage of mobile terminal software, developers, testers, or product managers and the like often need to debug applications, such as: viewing the running log of the application, switching the execution environment of the application and the like.
Currently, there are two main methods for debugging IOS applications: one is to assist in debugging the application by modifying the source code of the application. For example, switching of the application execution environment is achieved by modifying the environment code, or debugging information is output to a log or page for viewing or modification by modifying the source code. The modified source codes need to be changed before the application is on-line, so that the debugging efficiency is low due to frequent code modification, and the stability of the application can be influenced, so that certain potential safety hazards are caused.
Another is to assist in debugging the application by installing computer software. The debugging method generally comprises the steps of starting package capturing software on a computer, embedding points on a page of mobile phone application, and then obtaining corresponding embedded point information through the package capturing software. In addition, the debugging process is very complicated because the mobile phone and the computer are connected to the same network, and the computer software is used for assisting in debugging the application, and the specific computer software is installed, so that the learning cost is high, and the debugging efficiency is low.
Therefore, the existing IOS application debugging method has the problems of low debugging efficiency and possibility of influencing the stability of the application.
Disclosure of Invention
In view of the foregoing, it is desirable to provide an application initialization method, device, storage medium, and mobile terminal that are advantageous for improving debugging efficiency.
An initialization method of an application, the initialization method of the application comprising:
responding to the application starting, and generating an object according to the management class of the debugging plug-in to be registered as registration information; the management class follows a preset protocol; the protocol specifies a method for calling the debugging plug-in the view and specifies a view controller class instantiation method of the debugging plug-in; the debugging plug-in packages a debugging method of application information needing debugging in advance;
and registering the debugging plug-in to be registered into a debugging menu according to the registration information, and generating a debugging menu view on a mobile terminal page.
In one embodiment, the generating an object according to the management class of the debug plug-in to be registered in response to the application start includes, as registration information:
responding to application starting, and acquiring a debugging plug-in to be registered from a pre-constructed plug-in container;
generating an object according to the acquired management class of the debugging plug-in as registration information;
registering the debugging plug-in to be registered into a debugging menu according to the registration information, and generating a debugging menu view on a mobile terminal page, including:
and according to the registration information, adopting a pre-constructed page management tool to register the debugging plug-in to be registered into a debugging menu, and generating a debugging menu view on a mobile terminal page.
In one embodiment, the protocol further specifies a plug-in name acquisition method and a plug-in icon acquisition method.
In one embodiment, the method for calling the debugging plug-in the view comprises the following steps:
the debug plug-in is clicked through the view.
In one embodiment, the registering the to-be-registered debugging plug-in to the debugging menu according to the registration information, and generating a debugging menu view on a mobile terminal page includes:
adding a plurality of debugging plug-ins to be registered to a plug-in queue;
debugging plug-ins are taken out from the plug-in queue in sequence, and the corresponding debugging plug-ins are registered in the debugging menu according to the registration information of the corresponding debugging plug-ins;
and responding to the completion of the registration of the plurality of debugging plug-ins to be registered, and generating a debugging menu view on a mobile terminal page.
In one embodiment, the method for initializing the application further includes:
and generating a floating ball inlet entering the debugging menu view.
In one embodiment, the method for initializing the application further includes:
adding a suspension ball to KeyWindow, and monitoring the running state of RunLoop.
An apparatus for initializing an application includes a plug-in registration module and a menu view generation module.
The registration information generation module is used for responding to the application starting and generating an object as registration information according to the management class of the debugging plug-in to be registered; the management class follows a preset protocol; the protocol specifies a method for calling the debugging plug-in the view and specifies a view controller class instantiation method of the debugging plug-in; the debugging plug-in packages a debugging method of application information needing debugging in advance;
and the menu view generating module is used for registering the debugging plug-in to be registered into a debugging menu according to the registration information and generating a debugging menu view on a mobile terminal page.
A mobile terminal comprising a memory and a processor, the memory storing a computer program, the processor when executing the computer program implementing the steps of:
responding to the application starting, and generating an object according to the management class of the debugging plug-in to be registered as registration information; the management class follows a preset protocol; the protocol specifies a method for calling the debugging plug-in the view and specifies a view controller class instantiation method of the debugging plug-in; the debugging plug-in packages a debugging method of application information needing debugging in advance;
and registering the debugging plug-in to be registered into a debugging menu according to the registration information, and generating a debugging menu view on a mobile terminal page.
A storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
responding to the application starting, and generating an object according to the management class of the debugging plug-in to be registered as registration information; the management class follows a preset protocol; the protocol specifies a method for calling the debugging plug-in the view and specifies a view controller class instantiation method of the debugging plug-in; the debugging plug-in packages a debugging method of application information needing debugging in advance;
and registering the debugging plug-in to be registered into a debugging menu according to the registration information, and generating a debugging menu view on a mobile terminal page.
According to the initialization method, the initialization device, the storage medium and the mobile terminal of the application, the object is generated according to the management class of the debugging plug-in to be registered as the registration information by responding to the application starting, the debugging plug-in to be registered is registered into the debugging menu according to the registration information, the debugging menu view is generated on the page of the mobile terminal, the debugging plug-in is registered into the debugging menu, the debugging menu is bound with the calling method of the debugging plug-in and the instantiation object of the returned view controller class in the application initialization process, the view display of the debugging plug-in and the calling of the debugging plug-in can be realized through the debugging menu view, and the debugging function of the debugging plug-in can be provided in a visual mode. Developers, testers, or product managers and the like can open the debugging menu view at the mobile terminal, and can call the debugging method packaged by the debugging plug-in by executing the operation corresponding to the method for triggering the behavior of the debugging plug-in the debugging menu view.
Compared with the prior art, the application initialization method, the device, the storage medium and the mobile terminal provide a debugging menu view for application debugging through the application initialization process, and the application debugging is completed on the mobile terminal through a visual debugging method brought by a debugging plug-in, so that the learning cost of debugging is reduced, and the debugging efficiency is greatly improved. In addition, when a new application debugging requirement exists, the debugging plug-in can be used to finish application debugging by directly registering the new debugging plug-in, and the extension of the plug-in is realized without modifying the source code of the application, so that the stability and the safety of the application are not influenced.
Drawings
FIG. 1 is a diagram of an application environment for an initialization method applied in one embodiment;
FIG. 2 is a flowchart illustrating an initialization method applied in one embodiment;
FIG. 3 is a flowchart illustrating an initialization method applied in another embodiment;
FIG. 4 is a block diagram of an initialization apparatus used in one embodiment;
fig. 5 is an internal structure diagram of the mobile terminal in an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The application initialization method provided by the application can be applied to the application environment shown in fig. 1. The mobile terminal 102 communicates with the server 104 through a network, wherein the mobile terminal 102 may be, but not limited to, various smart phones, tablet computers, and portable multimedia players capable of installing an IOS system, and the server 104 may be implemented by an independent server or a server cluster composed of a plurality of servers.
In one embodiment, as shown in FIG. 2, a method for initializing an application is provided. Taking the application of the method to the mobile terminal in fig. 1 as an example, the method includes the following steps:
step S200, responding to the application starting, and generating an object according to the management class of the debugging plug-in to be registered as registration information.
In this embodiment, the application is an IOS application. The IOS system is an apple mobile device operating system. The IOS application may be a chat application, a browser application, a game application, or a multimedia playing application, etc., which is not limited in this respect.
The code implementation of the embodiment can adopt the Swift language, which is a modern programming language proposed by apple and has the characteristics of static type, type inference, functional expression and the like. In other embodiments, Objective-C language may be employed.
A debugging plug-in is an object that can be presented in a visual form, such as a page, a dialog box, etc. The debugging plug-in can be a log information plug-in, a network interception plug-in or an environment configuration plug-in, etc. Since the debugging plug-in encapsulates the debugging method of the application information to be debugged, the debugging plug-in can be invoked to call the encapsulated debugging method, i.e. debug the corresponding application information, thereby implementing the corresponding debugging function, such as acquiring log information, network interception, environment configuration, specific page jump, etc. It should be noted that the debugging method may be an existing general debugging method, or may be a custom debugging method, which is not limited in the present invention.
The management class of the debug plug-in follows a preset protocol. Protocols are used to specify methods and attributes, and classes that meet the requirements of a protocol are referred to as compliance (conform) protocols. The management class of the debug plug-in provides the specific implementation to accomplish the method specified by the protocol. For the management classes of different debugging plugins, the specific contents specified by the following protocols are different and can be adjusted according to actual conditions.
The protocol is specified (defined) by protocol. The protocol specifies a view controller class instantiation method for the debug plug-in.
The View controller (ViewController) class is a subclass of UIViewController for managing views of an application. UIViewController is a generic controller class, part of the UIKit framework, which defines the shared behavior common to all view controllers. The instantiation object of the class is the object obtained by instantiating the class. And if the view controller class instantiation method returns the instantiation object of the view controller class of the debugging plug-in, the registration information comprises the instantiation object of the view controller class.
The protocol also specifies the method of invoking the debug plug-in the view. In this embodiment, the debugging plug-in is presented in the debugging menu view, and the method for calling the debugging plug-in the debugging menu view is specified by the protocol. The method calling the debugging plug-in the view does not return the instance object, and the registration information comprises the method calling the debugging plug-in the view.
Optionally, the method for calling the debug plug-in the view includes:
the debug plug-in is clicked through the view.
Namely, the debugging plug-in behavior can be triggered by the plug-in clicking operation in the view. If the user clicks one plug-in the debugging menu view, the mobile terminal page can display a view controller related to the plug-in implementation, and if the plug-in is not clicked, the user continues to wait.
Specifically, the initialization method further includes:
before the application starts, a view controller class and a management class of the debug plug-in are defined.
By defining a view controller class of the debugging plug-in, a specific plug-in function logic of the debugging plug-in is realized through the view controller, for example, for a log information plug-in, in this embodiment, information acquisition and formatted presentation of a console log output log are realized.
Specifically, before the application starts, a plug-in container class is constructed.
The plug-in container is used for realizing specific plug-in functions and defines a set of protocols which are convenient for external realization.
Step S200 includes:
responding to application starting, and acquiring a debugging plug-in to be registered from a pre-constructed plug-in container;
and generating an object according to the acquired management class of the debugging plug-in as registration information.
The developer may develop a debug plug-in at the server 104 and then write the debug plug-in to the plug-in container. The plug-in container can be arranged on the mobile terminal, and the registration information can be generated on the mobile terminal after the application is started. In other embodiments, the plug-in container may be located in the server 104, and the process of generating the registration information requires the mobile terminal to communicate with the server.
And S202, registering the debugging plug-in to be registered into a debugging menu according to the registration information.
In this embodiment, the debug menu view is a list view. In other embodiments, the debug menu view may be an icon view.
Specifically, before the application starts, a page management tool class is constructed.
The page management tool is used for managing the registered plug-ins, displaying the UI and displaying the floating ball.
The page management tool also implements a tool registration method for registering the plug-in to the debug menu.
Specifically, step S202 includes:
and according to the registration information, adopting a pre-constructed page management tool to register the debugging plug-in to be registered into the debugging menu, and generating a debugging menu view on the page of the mobile terminal.
In the embodiment, in response to application startup, an object is generated according to a management class of a debugging plug-in to be registered as registration information, the debugging plug-in to be registered is registered in a debugging menu according to the registration information, a debugging menu view is generated on a mobile terminal page, the debugging plug-in is registered in the debugging menu, and the debugging menu is bound with a calling method of the debugging plug-in and an instantiation object of a returned view controller class in an application initialization process, so that view display of the debugging plug-in and call of the debugging plug-in can be realized through the debugging menu view, that is, the debugging plug-in is realized to provide a debugging function in a visual form. Developers, testers, or product managers and the like can open the debugging menu view at the mobile terminal, and can call the debugging method packaged by the debugging plug-in by executing the operation corresponding to the method for triggering the behavior of the debugging plug-in the debugging menu view.
In the embodiment, the page management tool and the plug-in container are isolated, so that the external UI shell can be changed at any time without influencing the logic of the plug-in of the core, and secondly, when the plug-ins of the core are added, the update of the external UI is not needed, and the expansion, the customization, the forbidding and the opening of the plug-ins are convenient to realize.
It should be understood that, although the steps in the flowchart of fig. 2 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in fig. 2 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
In yet another embodiment, as shown in fig. 3, there is provided an initialization method of an application, which is applied to the mobile terminal shown in fig. 1.
The initialization method of the application comprises the following steps:
step S400, responding to the application starting, and generating an object according to the management class of the debugging plug-in to be registered as the registration information.
The management class follows a preset protocol. The debugging plug-in packages the debugging method of the application information needing debugging in advance. The protocol specifies a method to call the debug plug-in the view and specifies a view controller class instantiation method for the debug plug-in.
In this embodiment, the protocol further specifies an acquisition method of a plug-in name and an acquisition method of a plug-in icon. And the obtaining method of the plug-in name returns the name of the debugging plug-in. And returning the UIImage object by the acquisition method of the plug-in icon. The UIImage object is an icon of the debugging plug-in the view. The registration information also includes the name and icon of the debug plug-in. Specifically, the name and icon of the debugging plug-in may be obtained from a preset plug-in data source. The UIImage is a representation class of picture data in the UIkit frame of the iOS, and encapsulates representation methods of various pictures.
Step S402, adding a plurality of debugging plug-ins to be registered to a plug-in queue.
And S404, taking out the debugging plug-ins from the plug-in queue in sequence, and registering the corresponding debugging plug-ins into a debugging menu according to the registration information of the corresponding debugging plug-ins.
The developer may develop a debugging plug-in at the server 104, then write the debugging plug-in into the source code of the application of the mobile terminal 102, when the application is started, detect the debugging plug-in to be registered, add a plurality of debugging plug-ins to be registered to the plug-in queue, and register the debugging plug-ins in the plug-in queue in the debugging menu.
Specifically, the debugging menu includes debugging menu items corresponding to the debugging plug-ins one to one, and after the debugging plug-ins are taken out from the plug-in queue, the corresponding debugging plug-ins are registered to the corresponding debugging menu items.
Step S406, in response to the completion of the registration of the plurality of debugging plug-ins to be registered, generating a debugging menu view on the page of the mobile terminal.
And step S408, generating a floating ball inlet entering the debugging menu view.
And S410, adding a suspension ball to KeyWindow, and monitoring the running state of RunLoop.
Where KeyWindow is an interface displayed on the uppermost layer in the iOS platform, the hover ball view is displayed on the interface on the uppermost layer by adding the hover ball view to KeyWindow.
RunLoop is an App-level event loop mechanism in the iOS platform.
Since the iOS system does not support the App inner overlay hovercall, the addition of the hovercall into the KeyWindow is ensured by monitoring the RunLoop running state, so that the view of the hovercall is kept displayed on the uppermost interface.
The embodiment realizes the registration of a plurality of debugging plug-ins, thereby providing the debugging methods packaged by different debugging plug-ins through the debugging menu view and improving the debugging efficiency. In addition, the method for acquiring the name of the plug-in and the method for acquiring the icon of the plug-in are specified by the protocol, so that different debugging plug-ins can be distinguished conveniently, and the debugging efficiency is further improved.
In addition, by generating a floating ball inlet, a user can operate the debugging menu view more quickly and conveniently; by adding the suspension ball view into KeyWindow and monitoring the running state of RunLoop, the display state of the debugging menu view cannot be lost in the process of switching between the front and the back of the current application.
It should be understood that, although the steps in the flowchart of fig. 3 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in fig. 3 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 4, there is provided an initialization apparatus 1 of an application, including a registration information generation module 101 and a menu view generation module 103.
The registration information generation module 101 is configured to respond to application startup and generate an object according to a management class of the debug plug-in to be registered, as registration information; the management class follows a preset protocol; the protocol specifies a method for calling the debugging plug-in the view and specifies a view controller class instantiation method of the debugging plug-in; the debugging plug-in packages the debugging method of the application information needing debugging in advance;
the menu view generating module 103 is configured to register the debugging plug-in to be registered in the debugging menu according to the registration information, and generate a debugging menu view on a mobile terminal page.
In one embodiment, the registration information generation module 101 includes a plug-in acquisition unit and an object generation unit.
The plug-in obtaining unit is used for responding to the application starting and obtaining the debugging plug-in to be registered from the pre-constructed plug-in container.
And the object generating unit is used for generating an object according to the acquired management class of the debugging plug-in as registration information.
The menu view generating module 103 includes a first view generating unit, configured to register, according to the registration information, a to-be-registered debugging plug-in to the debugging menu by using a pre-established page management tool, and generate a debugging menu view on a mobile terminal page.
In one embodiment, the protocol also specifies the method of obtaining the name of the plug-in and the method of obtaining the icon of the plug-in.
In one embodiment, a method of invoking a debug plug-in a view comprises:
the debug plug-in is clicked through the view.
In one embodiment, the menu view generation module 103 includes: the device comprises a plug-in queue adding unit, a plug-in registration unit and a second view generating unit.
The plug-in queue adding unit is used for adding a plurality of debugging plug-ins to be registered to the plug-in queue;
the plug-in registration unit is used for taking out the debugging plug-ins from the plug-in queue in sequence and registering the corresponding debugging plug-ins into the debugging menu according to the registration information of the corresponding debugging plug-ins.
The second view generating unit is used for responding to the completion of registration of a plurality of debugging plug-ins to be registered and generating a debugging menu view on the page of the mobile terminal
In one embodiment, the initialization apparatus further includes a hover ball entry generating module for generating a hover ball entry into the debug menu view.
In one embodiment, the initialization apparatus 1 further comprises an event loop mechanism starting module and a view adding module.
And the suspension ball adding module is used for adding suspension balls to KeyWindow and monitoring the running state of RunLoop.
For the specific definition of the initialization apparatus of the application, reference may be made to the above definition of the initialization method of the application, which is not described herein again. The various blocks in the initialization apparatus for the above-described application may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent of a processor in the mobile terminal, and can also be stored in a memory in the mobile terminal in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a mobile terminal is provided, and an internal structure of the mobile terminal may be as shown in fig. 5. The mobile terminal includes a processor, a memory, a network interface, and a database connected by a device bus. Wherein the processor of the mobile terminal is configured to provide computing and control capabilities. The memory of the mobile terminal comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating device, a computer program, and a database. The internal memory provides an environment for the operation device and the execution of the computer program in the nonvolatile storage medium. The database of the mobile terminal is used for storing data. The network interface of the mobile terminal is used for connecting and communicating with an external terminal through a network. The computer program is executed by a processor to implement an initialization method of an application.
Those skilled in the art will appreciate that the configuration shown in fig. 5 is a block diagram of only a portion of the configuration associated with the present application and does not constitute a limitation on the mobile terminal to which the present application applies, and that a particular mobile terminal may include more or less components than those shown, or combine certain components, or have a different arrangement of components.
In one embodiment, a mobile terminal is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
responding to the application starting, and generating an object according to the management class of the debugging plug-in to be registered as registration information; the management class follows a preset protocol; the protocol specifies a method for calling the debugging plug-in the view and specifies a view controller class instantiation method of the debugging plug-in; the debugging plug-in packages the debugging method of the application information needing debugging in advance;
and registering the debugging plug-in to be registered into the debugging menu according to the registration information, and generating a debugging menu view on the page of the mobile terminal.
In one embodiment, in response to application startup, generating an object according to a management class of a debug plug-in to be registered, as registration information, includes:
responding to application starting, and acquiring a debugging plug-in to be registered from a pre-constructed plug-in container;
generating an object according to the acquired management class of the debugging plug-in as registration information;
registering the debugging plug-in to be registered into a debugging menu according to the registration information, and generating a debugging menu view on a mobile terminal page, wherein the debugging menu view comprises the following steps:
and according to the registration information, adopting a pre-constructed page management tool to register the debugging plug-in to be registered into the debugging menu, and generating a debugging menu view on the page of the mobile terminal.
In one embodiment, the protocol further specifies a plug-in name acquisition method and a plug-in icon acquisition method.
In one embodiment, the method for calling the debugging plug-in the view comprises the following steps:
the debug plug-in is clicked through the view.
In one embodiment, registering a debugging plug-in to be registered in a debugging menu according to registration information, and generating a debugging menu view on a mobile terminal page, includes:
adding a plurality of debugging plug-ins to be registered to a plug-in queue;
sequentially taking out the debugging plug-ins from the plug-in queue, and registering the corresponding debugging plug-ins into a debugging menu according to the registration information of the corresponding debugging plug-ins;
and responding to the completion of registration of a plurality of debugging plug-ins to be registered, and generating a debugging menu view on a mobile terminal page.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
and generating a floating ball inlet for entering the debugging menu view.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
adding a suspension ball to KeyWindow, and monitoring the running state of RunLoop.
In one embodiment, a storage medium is provided, the storage medium being a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
responding to the application starting, and generating an object according to the management class of the debugging plug-in to be registered as registration information; the management class follows a preset protocol; the protocol specifies a method for calling the debugging plug-in the view and specifies a view controller class instantiation method of the debugging plug-in; the debugging plug-in packages a debugging method of application information needing debugging in advance;
and registering the debugging plug-in to be registered into a debugging menu according to the registration information, and generating a debugging menu view on a mobile terminal page.
In one embodiment, the generating an object according to the management class of the debug plug-in to be registered in response to the application start includes, as registration information:
responding to application starting, and acquiring a debugging plug-in to be registered from a pre-constructed plug-in container;
generating an object according to the acquired management class of the debugging plug-in as registration information;
registering the debugging plug-in to be registered into a debugging menu according to the registration information, and generating a debugging menu view on a mobile terminal page, including:
and according to the registration information, adopting a pre-constructed page management tool to register the debugging plug-in to be registered into a debugging menu, and generating a debugging menu view on a mobile terminal page.
In one embodiment, the protocol further specifies a plug-in name acquisition method and a plug-in icon acquisition method.
In one embodiment, the method for calling the debugging plug-in the view comprises the following steps:
the debug plug-in is clicked through the view.
In one embodiment, the registering the to-be-registered debugging plug-in to the debugging menu according to the registration information, and generating a debugging menu view on a mobile terminal page includes:
adding a plurality of debugging plug-ins to be registered to a plug-in queue;
debugging plug-ins are taken out from the plug-in queue in sequence, and the corresponding debugging plug-ins are registered in the debugging menu according to the registration information of the corresponding debugging plug-ins;
and responding to the completion of the registration of the plurality of debugging plug-ins to be registered, and generating a debugging menu view on a mobile terminal page.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and generating a floating ball inlet entering the debugging menu view.
In one embodiment, the computer program when executed by the processor further performs the steps of:
adding a suspension ball to KeyWindow, and monitoring the running state of RunLoop.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method for initializing an application, comprising:
responding to application starting, and acquiring a debugging plug-in to be registered from a pre-constructed plug-in container; generating an object according to the acquired management class of the debugging plug-in as registration information; the management class follows a preset protocol; the protocol specifies a method for calling the debugging plug-in the view and specifies a view controller class instantiation method of the debugging plug-in; the debugging plug-in packages a debugging method of application information needing debugging in advance;
and registering the debugging plug-in to be registered into a debugging menu according to the registration information, and generating a debugging menu view on a mobile terminal page.
2. The method for initializing an application according to claim 1, wherein the registering the to-be-registered debugging plug-in to a debugging menu according to the registration information, and generating a debugging menu view on a mobile terminal page comprises:
and according to the registration information, adopting a pre-constructed page management tool to register the debugging plug-in to be registered into a debugging menu, and generating a debugging menu view on a mobile terminal page.
3. The method for initializing an application according to claim 2, wherein said protocol further specifies a plug-in name acquisition method and a plug-in icon acquisition method.
4. The method for initializing an application according to claim 2, wherein the method for calling a debugging plug-in a view comprises:
the debug plug-in is clicked through the view.
5. The method for initializing an application according to claim 1, wherein the registering the to-be-registered debugging plug-in to a debugging menu according to the registration information, and generating a debugging menu view on a mobile terminal page comprises:
adding a plurality of debugging plug-ins to be registered to a plug-in queue;
debugging plug-ins are taken out from the plug-in queue in sequence, and the corresponding debugging plug-ins are registered in the debugging menu according to the registration information of the corresponding debugging plug-ins;
and responding to the completion of the registration of the plurality of debugging plug-ins to be registered, and generating a debugging menu view on a mobile terminal page.
6. The method for initializing an application according to any one of claims 1 to 5, further comprising:
and generating a floating ball inlet entering the debugging menu view.
7. The method for initializing an application according to claim 6, further comprising:
adding a suspension ball to KeyWindow, and monitoring the running state of RunLoop.
8. An apparatus for initializing an application, comprising:
the registration information generation module is used for responding to the application starting and acquiring a debugging plug-in to be registered from a pre-constructed plug-in container; generating an object according to the acquired management class of the debugging plug-in as registration information; the management class follows a preset protocol; the protocol specifies a method for calling the debugging plug-in the view and specifies a view controller class instantiation method of the debugging plug-in; the debugging plug-in packages a debugging method of application information needing debugging in advance;
and the menu view generating module is used for registering the debugging plug-in to be registered into a debugging menu according to the registration information and generating a debugging menu view on a mobile terminal page.
9. A mobile terminal, characterized in that it comprises a memory and a processor, said memory storing a computer program, characterized in that said processor, when executing said computer program, implements the steps of the initialization method of an application according to any one of claims 1 to 7.
10. A storage medium on which a computer program is stored, characterized in that the computer program, when being executed by a processor, carries out the steps of the initialization method of an application according to any one of claims 1 to 7.
CN201911199361.2A 2019-11-29 2019-11-29 Application initialization method and device, storage medium and mobile terminal Active CN110990078B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911199361.2A CN110990078B (en) 2019-11-29 2019-11-29 Application initialization method and device, storage medium and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911199361.2A CN110990078B (en) 2019-11-29 2019-11-29 Application initialization method and device, storage medium and mobile terminal

Publications (2)

Publication Number Publication Date
CN110990078A CN110990078A (en) 2020-04-10
CN110990078B true CN110990078B (en) 2021-05-11

Family

ID=70088406

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911199361.2A Active CN110990078B (en) 2019-11-29 2019-11-29 Application initialization method and device, storage medium and mobile terminal

Country Status (1)

Country Link
CN (1) CN110990078B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107688529A (en) * 2017-02-20 2018-02-13 平安科技(深圳)有限公司 Component adjustment method and device
CN109710283A (en) * 2018-11-15 2019-05-03 中国平安人寿保险股份有限公司 Obtain method, apparatus, computer equipment and the storage medium of Mynav plug-in unit

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10296298B1 (en) * 2018-01-25 2019-05-21 Walmart Apollo, Llc Systems and methods for cross platform information exchange mechanism for integrating web-based components with a native application
CN108572813A (en) * 2018-03-24 2018-09-25 深圳市前海安测信息技术有限公司 Assembly type program development frame creates application system and method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107688529A (en) * 2017-02-20 2018-02-13 平安科技(深圳)有限公司 Component adjustment method and device
CN109710283A (en) * 2018-11-15 2019-05-03 中国平安人寿保险股份有限公司 Obtain method, apparatus, computer equipment and the storage medium of Mynav plug-in unit

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
"5 Tools for UI Debugging in iOS";Jesus Nieves;《https://medium.com/better-programming/top-5-tools-for-debugging-your-ios-app-views-ac53cba4cf3b》;20191006;全文 *
Xcode 内置调试工具;翻滚的Code;《https://www.huaweicloud.com/articles/5150574bf4108839d75cac31aaf88cbc.html》;20191104;全文 *
好用的iOS调试工具PonyDebugger;奏响曲;《https://juejin.cn/post/6844903968171098119》;20191016;全文 *

Also Published As

Publication number Publication date
CN110990078A (en) 2020-04-10

Similar Documents

Publication Publication Date Title
US8413128B2 (en) Asynchronous load of source dependencies
US10019298B2 (en) Middleware interface and middleware interface generator
CN111209122B (en) Interface calling method and device, electronic equipment and storage medium
WO2016177341A1 (en) Interface calling method and device, and terminal
CN112090079B (en) Game task running method and device, computer equipment and storage medium
CN111008132B (en) Application debugging method and device for Android system, computer equipment and storage medium
CN112882769B (en) Skill pack data processing method, skill pack data processing device, computer equipment and storage medium
KR20140023971A (en) Registration and execution of highly concurrent processing tasks
JP2022505656A (en) Sub-application development methods, equipment, computer equipment, and computer programs
CN112114808A (en) Page rendering method and device and electronic equipment
CN113296758A (en) Front-end component library construction method and device and storage medium
CN111367518A (en) Page layout method and device, computing equipment and computer storage medium
CN110362341B (en) Business management method, device, equipment and storage medium based on micro-service architecture
CN115309516A (en) Application life cycle detection method and device and computer equipment
CN108153533B (en) Method and device for making installation program, and method and device for installing program
KR101689984B1 (en) Programmable controller, programmable controller system, and execute error information creation method
CN113127329B (en) Script debugging method and device and computer storage medium
CN110990078B (en) Application initialization method and device, storage medium and mobile terminal
CN116954824A (en) Runtime system supporting multi-process mixed operation of multiple extended reality (XR) technical specification application programs and 2D application programs, data interaction method, device and medium
CN112214213B (en) Linux kernel development and management method and device, computer equipment and storage medium
CN114510334A (en) Class instance calling method and device, electronic equipment and automatic driving vehicle
CN108549585B (en) Method for modifying application data, application testing method and device
CN112685023A (en) Front-end development processing method, device, equipment and storage medium based on basic library
CN110941459A (en) Method and device for calling Replugin
CN113608801A (en) Interface calling method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant