CN113127000A - Compiling method, device and equipment of application program assembly and storage medium - Google Patents

Compiling method, device and equipment of application program assembly and storage medium Download PDF

Info

Publication number
CN113127000A
CN113127000A CN202110443462.0A CN202110443462A CN113127000A CN 113127000 A CN113127000 A CN 113127000A CN 202110443462 A CN202110443462 A CN 202110443462A CN 113127000 A CN113127000 A CN 113127000A
Authority
CN
China
Prior art keywords
component
project
file
ios
compiling
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.)
Pending
Application number
CN202110443462.0A
Other languages
Chinese (zh)
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.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network 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 Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202110443462.0A priority Critical patent/CN113127000A/en
Publication of CN113127000A publication Critical patent/CN113127000A/en
Priority to PCT/CN2022/079594 priority patent/WO2022222625A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/43Checking; Contextual analysis
    • G06F8/433Dependency analysis; Data or control flow analysis
    • 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

Abstract

The embodiment of the disclosure relates to a compiling method, a compiling device, equipment and a storage medium of an application program component, wherein by acquiring an empty first iOS project and a first declaration file of the first iOS project, at least the dependence of the first iOS project on a to-be-compiled first component and the information of a function library type corresponding to the first component are declared in the first declaration file; when the function library type of the first component is a dynamic library frame, integrating the first component into a first iOS project based on a first declaration file, and copying a head file of each component in a first main project obtained in advance into the first iOS project to obtain a second iOS project; and then compiling the second iOS project, and skipping over the symbol to continue compiling when compiling to an undefined symbol to obtain a compiled file corresponding to the first component. The scheme provided by the embodiment of the disclosure realizes the compiling of a single component, and improves the compiling efficiency.

Description

Compiling method, device and equipment of application program assembly and storage medium
Technical Field
The embodiment of the disclosure relates to the technical field of computers, and in particular, to a compiling method, device, equipment and storage medium for an application component.
Background
An application program of the apple mobile device Operating System (iOS) may generally be composed of a plurality of components. In the prior art, when a certain component in an iOS application program is compiled, all components of the whole application program generally need to be downloaded, and the whole compiling process consumes a long time and has low efficiency due to large downloaded data volume.
Disclosure of Invention
In order to solve the technical problem or at least partially solve the technical problem, embodiments of the present disclosure provide a compiling method, apparatus, device and storage medium for an application component.
A first aspect of an embodiment of the present disclosure provides a method for compiling an application component, where the method includes:
acquiring an empty first iOS project and a first declaration file of the first iOS project, wherein the first declaration file at least declares the dependence of the first iOS project on a first component to be compiled and the information of a function library type corresponding to the first component; responding to the fact that the function library type of the first component is a dynamic library frame, integrating the first component into a first iOS project based on a first declaration file, and copying a header file of each component in the first main project into the first iOS project according to a first main project obtained in advance to obtain a second iOS project; and compiling the second iOS project, and skipping the symbol to continue compiling until compiling is finished when an undefined symbol is compiled, so as to obtain a compiled file corresponding to the first component.
In one embodiment, after obtaining the empty first iOS project and the first declaration file of the first iOS project, the method of the first aspect may further include:
and in response to the fact that the function library type of the first component is a static library, calling a preset first hook script, and modifying the function library type of the first component into a dynamic library frame.
In one embodiment, after obtaining the compiled file corresponding to the first component, the method of the first aspect may further include:
replacing a second component in the first main project with a compiled file corresponding to the first component based on a first user instruction, and re-signing the first main project to obtain a second main project, wherein the first component is obtained by updating the second component; and running a second main project for debugging based on the second user instruction.
In one embodiment, prior to obtaining the empty first iOS project and the first declaration file for the first iOS project, the method of the first aspect may further include:
acquiring a second declarative file of the first main project, wherein the second declarative file at least comprises the dependency relationship of the first main project on each component and the information of the function library type corresponding to each component; in response to the fact that the function library type corresponding to each component is a static library, calling a preset second hook script, and modifying the function library type of each component recorded in a second transparent file into a dynamic library frame; and integrating to obtain a first main project based on the modified second declarative file.
A second aspect of an embodiment of the present disclosure provides a compiling apparatus including:
the first obtaining module is used for obtaining an empty first iOS project and a first declaration file of the first iOS project, wherein the first declaration file at least declares the dependence of the first iOS project on a first component to be compiled and the information of a function library type corresponding to the first component;
the first integration module is used for integrating the first component into a first iOS project based on a first declaration file when the function library type of the first component is a dynamic library frame, and copying a header file of each component in the first main project into the first iOS project according to a first main project obtained in advance to obtain a second iOS project;
and the compiling module is used for compiling the second iOS project, skipping the symbol to continue compiling when an undefined symbol is compiled, and obtaining a compiled file corresponding to the first component until the compiling is finished.
In one embodiment, the apparatus provided in the second aspect may further include:
the first processing module is used for calling a preset first hook script when the function library type of the first component is a static library, and modifying the function library type of the first component into a dynamic library frame.
In one embodiment, the apparatus provided in the second aspect may further include:
the second processing module is used for replacing a second component in the first main project with a compiled file corresponding to the first component based on the first user instruction, and re-signing the first main project to obtain a second main project, wherein the first component is obtained by updating the second component;
and the debugging module is used for operating the second main project to debug based on the second user instruction.
In one embodiment, the apparatus provided in the second aspect may further include:
the second obtaining module is used for obtaining a second declarative file of the first main project, wherein the second declarative file at least comprises the dependency relationship of the first main project on each component and the information of the function library type corresponding to each component;
the third processing module is used for calling a preset second hook script when the function library type corresponding to each component is a static library, and modifying the function library type of each component recorded in the second transparent file into a dynamic library frame;
and the second integration module is used for integrating to obtain the first main project based on the modified second declarative file.
A third aspect of embodiments of the present disclosure provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the method of the first aspect may be implemented.
A fourth aspect of embodiments of the present disclosure provides a computer-readable storage medium having a computer program stored therein, which, when executed by a processor, may implement the method of the first aspect described above.
Compared with the prior art, the technical scheme provided by the embodiment of the disclosure has the following advantages:
according to the embodiment of the disclosure, by acquiring an empty first iOS project and a first declaration file of the first iOS project, at least the dependence of the first iOS project on a first component to be compiled and the information of a function library type corresponding to the first component are declared in the first declaration file; when the function library type of the first component is a dynamic library frame, integrating the first component into a first iOS project based on a first declaration file, and copying a header file of each component in the first main project into the first iOS project according to a first main project obtained in advance to obtain a second iOS project; and then compiling the second iOS project, and skipping over the symbol to continue compiling when compiling to an undefined symbol to obtain a compiled file corresponding to the first component. The scheme provided by the embodiment of the disclosure realizes the compiling of a single component of the application program, and does not need to pull all components of the application program, thereby reducing the pulling amount and the compiling time consumption of data and improving the compiling efficiency of the single component.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present disclosure, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
FIG. 1 is a flowchart of a compiling method of an application component according to an embodiment of the disclosure;
FIG. 2 is a schematic diagram of a component pull scenario provided by an embodiment of the present disclosure;
fig. 3 is a flowchart of a debugging method provided by the embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a compiling apparatus according to an embodiment of the disclosure;
fig. 5 is a schematic structural diagram of a computer device in an embodiment of the present disclosure.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, aspects of the present disclosure will be further described below. It should be noted that the embodiments and features of the embodiments of the present disclosure may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced in other ways than those described herein; it is to be understood that the embodiments disclosed in the specification are only a few embodiments of the present disclosure, and not all embodiments.
Fig. 1 is a flowchart of a compiling method of an application component, which can be executed by a computer device, according to an embodiment of the present disclosure. As shown in fig. 1, the method provided by this embodiment includes the following steps:
step 101, obtaining an empty first iOS project and a first declaration file of the first iOS project, wherein the first declaration file at least declares dependence of the first iOS project on a first component to be compiled and information of a function library type corresponding to the first component.
In practice, one application may be made up of multiple components. Each component can be understood as a basic building block of an application. A component may define the functionality of a certain aspect or aspects of an application.
The first iOS process referred to in this embodiment may also be referred to as a host process, which is a null process that does not include a component in a main program (hereinafter referred to as a first main program for convenience of distinction), and is similar to the first main program in form and structure.
In this embodiment, the first declaration file may be used to declare dependencies of the first iOS project. The first declaration document declares at least a dependency of the first iOS project on a component to be compiled (for convenience of distinction, hereinafter referred to as a first component), and configuration information of the first component, which includes at least information of a function library type of the first component. The types of function libraries referred to in this embodiment include, but are not limited to, Static libraries (the english name may be expressed as Static library) and dynamic libraries (the english name may be expressed as dynamic frame). In the iOS system, the static library and the dynamic library are usually packaged into a frame (also referred to as a frame) and then used, so the static library in this embodiment may be understood as a static library frame obtained by packaging a library file, and the dynamic library may be understood as a dynamic library frame obtained by packaging a library file. The function library types of this embodiment may also include static library frames and dynamic library frames.
There are various ways to obtain the first iOS project and the first declaration file in the present disclosure, for example, in one possible embodiment, a configuration interface may be provided to the user, so that the user creates the first iOS project and the first declaration file through the configuration interface. For another example, in another possible implementation, the first iOS project and the first declaration file that are created in advance and stored locally may also be acquired from a local storage area. For another example, in another possible implementation, the user may also create the first iOS project and the corresponding first declaration file through a remote terminal device, and then transmit the first iOS project and the first declaration file to a computer device for compiling the first component through a wired or wireless network. Of course, the above-listed embodiments are merely illustrative and not restrictive. In fact, the method of obtaining the first iOS project and the first declaration document may be set as desired, and is not necessarily limited to a specific method or methods.
And 102, in response to the fact that the function library type of the first component is a dynamic library frame, integrating the first component into a first iOS project based on the first declaration file, and copying a header file of each component in the first main project into the first iOS project according to a first main project obtained in advance to obtain a second iOS project.
For example, fig. 2 is a schematic diagram of a component pulling scenario provided in an embodiment of the present disclosure, and in fig. 2, the computer device 21 may be understood as a device for compiling the first component in this embodiment. Component management platform 22 may be understood as a platform for storing and managing various application components. In this embodiment, after the computer device 21 acquires the first iOS project and the first declaration file, it requests the component management platform 22 to obtain the first component based on the dependency of the first iOS project on the first component recorded in the first declaration file.
Before integrating the first component into the first iOS project, the computer device 21 needs to read the configuration information of the first component from the first declaration file, and determine the function library type of the first component according to the configuration information of the first component, and if the function library type of the first component is a dynamic library frame, directly integrate the first component into the first iOS project in a link manner of the dynamic library; on the contrary, if the function library type of the first component is a static library, a preset first hook function (also referred to as hook) script needs to be called, the first component is encapsulated to obtain a dynamic library frame corresponding to the first component, a parameter used for representing the function library type of the first component in the configuration information of the first component is modified into a parameter corresponding to the dynamic library type, and then the first component is linked to the first iOS engineering based on the linking mode of the dynamic library. When the first component is a static library, the first component is packaged into a dynamic library frame, and the function library type of the first component is modified into the dynamic library frame, so that the first component can be linked to the first iOS project in a link mode of a dynamic library, and the system memory is saved.
Further, the first main project obtained in advance includes information of each component constituting the application program and a header file of each component, in this embodiment, the header file of each component in the first main project needs to be copied to the first iOS project, and when the header files of each component in the first component and the first main project are integrated into the first iOS project, the second iOS project can be obtained.
And 103, compiling the second iOS project, skipping the symbol to continue compiling when no defined symbol is compiled, and obtaining a compiled file corresponding to the first component until the compiling is finished.
In the embodiment of the present disclosure, although only the first component in the second iOS project is complete, and only the other components have header files, the compiling capability of the compiler is configured in the embodiment of the present disclosure, so that the compiler does not report an error when compiling to an undefined symbol, but skips over the symbol to continue compiling, and thus, even if only one component of the first component is in the second iOS project, the compiling can be completed.
According to the embodiment of the disclosure, by acquiring an empty first iOS project and a first declaration file of the first iOS project, at least the dependence of the first iOS project on a first component to be compiled and the information of a function library type corresponding to the first component are declared in the first declaration file; when the function library type of the first component is a dynamic library frame, integrating the first component into a first iOS project based on a first declaration file, and copying a header file of each component in the first main project into the first iOS project according to a first main project obtained in advance to obtain a second iOS project; and then compiling the second iOS project, and skipping over the symbol to continue compiling when compiling to an undefined symbol to obtain a compiled file corresponding to the first component. The scheme provided by the embodiment of the disclosure realizes the compiling of a single component of the application program, and does not need to pull all components of the application program, thereby reducing the pulling amount and the compiling time consumption of data and improving the compiling efficiency of the single component.
Fig. 3 is a flowchart of a debugging method provided in an embodiment of the present disclosure, and as shown in fig. 3, in an embodiment of the present disclosure, after obtaining a compiled file corresponding to a first component, the debugging method may further include the following steps:
step 301, replacing the second component in the first main project with the compiled file corresponding to the first component based on the first user instruction, and re-signing the first main project to obtain a second main project, wherein the first component is obtained by updating the second component.
And step 302, operating a second main project for debugging based on a second user instruction.
The first component in this embodiment may be understood as an updated product of the second component. I.e. the second component and the first component can be understood as an old version and a new version of a component, respectively. The compiled file of the first component may be understood as a compiled file of a dynamic library frame.
The first user instruction and the second user instruction referred to in this embodiment may be voice instructions, text instructions, or other forms of instructions.
The first user instruction and the second user instruction may be obtained in a variety of manners, and in a feasible manner, for example, by providing a preset interactive interface to a user, the user may select the first component and the second component on the preset interactive interface, and trigger the first user instruction by triggering a corresponding key. In another possible manner, a first user instruction of the user may be acquired through a preset audio acquisition device, where the first user instruction in this embodiment may be understood as a voice instruction. In yet another possible manner, the first user instruction sent by other devices (such as a mobile phone, a server, and the like, but not limited to the mobile phone and the server) in a wired or wireless manner may also be received by a preset information receiving apparatus. In this embodiment, the second user instruction may be obtained in a manner similar to that of the first user instruction, and is not described herein again.
It should be noted that the above-mentioned embodiments are only some embodiments of the present disclosure, but not all embodiments, and actually, the manner of acquiring the first user instruction and the second user instruction may be set according to needs, and is not necessarily limited to one or more embodiments.
In this embodiment, the first user instruction is used to instruct the computer device to replace the second component in the first main project with the first component and perform re-signing on the first main project, so as to obtain a second main project, and the second user instruction is used to trigger a debugging operation on the second main project, so as to obtain corresponding debugging information.
It should be noted that, in order to avoid an error caused by different function library types of components in the project to be debugged, if the function library type of the component in the first main project is not a dynamic library frame, after or before obtaining the second main project, a preset second hook script needs to be called to encapsulate the components into the dynamic library frame, and modify the function library type of the component into the dynamic library frame. For example, in an embodiment of the present disclosure, the above method for modifying the function library type of each component in the first main project may be exemplarily performed before step 101 in the embodiment of fig. 1, and the method may be exemplarily expressed as: acquiring a declaration file (hereinafter referred to as a second declaration file) of a first main project, wherein the second declaration file at least comprises the dependency relationship of the first main project on each component and information of a function library type corresponding to each component; in response to the fact that the function library type corresponding to each component is a static library, calling a preset second hook script, and modifying the function library type of each component recorded in a second transparent file into a dynamic library frame; and integrating to obtain a first main project based on the modified second declarative file. It is understood that this is by way of illustration only and is not meant as an exclusive limitation of the present disclosure.
In this embodiment, after the first component is separately compiled based on the method in the embodiment of fig. 1, the second component in the first main project is replaced by using the compiled file of the first component, and the second main project obtained after replacement is debugged, so that the debugging efficiency can be improved, and excessive time consumption during compiling the first component can be avoided.
Fig. 4 is a schematic structural diagram of a compiling apparatus provided by an embodiment of the present disclosure, where the compiling apparatus may be understood as a computer device or a part of functional modules in the computer device in the foregoing embodiments by way of example. As shown in fig. 4, the compiling apparatus 40 includes:
a first obtaining module 41, configured to obtain an empty first iOS project and a first declaration file of the first iOS project, where the first declaration file at least declares dependence of the first iOS project on a first component to be compiled and information of a function library type corresponding to the first component;
a first integration module 42, configured to, when the function library type of the first component is a dynamic library frame, integrate the first component into a first iOS project based on the first declaration file, and copy, according to a first main project obtained in advance, a header file of each component in the first main project into the first iOS project to obtain a second iOS project;
and the compiling module 43 is configured to compile the second iOS project, and skip the undefined symbol to continue compiling until compiling is finished when compiling to the undefined symbol, so as to obtain a compiled file corresponding to the first component.
In one embodiment, the compiling apparatus 40 may further include:
the first processing module is used for calling a preset first hook script when the function library type of the first component is a static library, and modifying the function library type of the first component into a dynamic library frame.
In one embodiment, the compiling apparatus 40 may further include:
the second processing module is used for replacing a second component in the first main project with a compiled file corresponding to the first component based on the first user instruction, and re-signing the first main project to obtain a second main project, wherein the first component is obtained by updating the second component;
and the debugging module is used for operating the second main project to debug based on the second user instruction.
In one embodiment, the compiling apparatus 40 may further include:
the second obtaining module is used for obtaining a second declarative file of the first main project, wherein the second declarative file at least comprises the dependency relationship of the first main project on each component and the information of the function library type corresponding to each component;
the third processing module is used for calling a preset second hook script when the function library type corresponding to each component is a static library, and modifying the function library type of each component recorded in the second transparent file into a dynamic library frame;
and the second integration module is used for integrating to obtain the first main project based on the modified second declarative file.
The apparatus provided in this embodiment can execute the method in any one of the embodiments in fig. 1 to fig. 3, and the execution manner and the beneficial effects are similar, and are not described herein again.
The embodiment of the present disclosure further provides a computer device, which includes a memory and a processor, where the memory stores a computer program, and when the computer program is executed by the processor, the processor may execute the method of any one of the above-mentioned fig. 1 to fig. 3.
For example, fig. 5 is a schematic structural diagram of a computer device in an embodiment of the present disclosure. Referring now specifically to FIG. 5, a schematic diagram of a computer device 1000 suitable for use in implementing embodiments of the present disclosure is shown. The computer device 1000 in the embodiment of the present disclosure may be understood as a device having a program compiling and debugging function. The computer device shown in fig. 5 is only an example and should not bring any limitation to the function and scope of use of the embodiments of the present disclosure.
As shown in fig. 5, the computer apparatus 1000 may include a processing device (e.g., a central processing unit, a graphic processor, etc.) 1001 that may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)1002 or a program loaded from a storage device 1008 into a Random Access Memory (RAM) 1003. In the RAM 1003, various programs and data necessary for the operation of the computer apparatus 1000 are also stored. The processing device 1001, the ROM1002, and the RAM 1003 are connected to each other by a bus 1004. An input/output (I/O) interface 1005 is also connected to bus 1004.
Generally, the following devices may be connected to the I/O interface 1005: input devices 1006 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 1007 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage devices 1008 including, for example, magnetic tape, hard disk, and the like; and a communication device 1009. The communication means 1009 may allow the computer device 1000 to communicate with other devices wirelessly or by wire to exchange data. While fig. 5 illustrates a computer device 1000 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication means 1009, or installed from the storage means 1008, or installed from the ROM 1002. The computer program, when executed by the processing device 1001, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the computer devices may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the computer device; or may exist separately and not be incorporated into the computer device.
The computer readable medium carries one or more programs which, when executed by the computing device, cause the computing device to: acquiring an empty first iOS project and a first declaration file of the first iOS project, wherein the first declaration file at least declares the dependence of the first iOS project on a first component to be compiled and the information of a function library type corresponding to the first component; responding to the fact that the function library type of the first component is a dynamic library frame, integrating the first component into a first iOS project based on a first declaration file, and copying a header file of each component in the first main project into the first iOS project according to a first main project obtained in advance to obtain a second iOS project; and compiling the second iOS project, and skipping the symbol to continue compiling until compiling is finished when an undefined symbol is compiled, so as to obtain a compiled file corresponding to the first component.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of an element does not in some cases constitute a limitation on the element itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The embodiments of the present disclosure further provide a computer-readable storage medium, where a computer program is stored in the storage medium, and when the computer program is executed by a processor, the method of any one of the embodiments in fig. 1 to fig. 3 may be implemented, where the execution manner and the beneficial effects are similar, and are not described herein again.
The disclosed embodiments also provide a computer program product, and when the computer program product is executed by a computer device, the computer device may execute the method of any one of the above-mentioned fig. 1-3.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, 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 identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present disclosure, which enable those skilled in the art to understand or practice the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for compiling an application component, comprising:
acquiring an empty first iOS project and a first declaration file of the first iOS project, wherein the first declaration file at least declares the dependence of the first iOS project on a first component to be compiled and the information of a function library type corresponding to the first component;
in response to that the function library type of the first component is a dynamic library frame, integrating the first component into the first iOS project based on the first declaration file, and copying a header file of each component in the first main project into the first iOS project according to a first main project obtained in advance to obtain a second iOS project;
and compiling the second iOS project, and skipping the symbol to continue compiling when an undefined symbol is compiled until the compiling is finished to obtain a compiled file corresponding to the first component.
2. The method of claim 1, wherein after obtaining the empty first iOS project and the first declaration for the first iOS project, the method further comprises:
and in response to the fact that the function library type of the first assembly is a static library, calling a preset first hook script, and modifying the function library type of the first assembly into a dynamic library frame.
3. The method of claim 1, wherein after obtaining the compiled file corresponding to the first component, the method further comprises:
replacing a second component in the first main project with a compiled file corresponding to the first component based on a first user instruction, and re-signing the first main project to obtain a second main project, wherein the first component is obtained by updating the second component;
and running the second main project for debugging based on a second user instruction.
4. The method of claim 3, wherein prior to obtaining the empty first iOS project and the first declaration for the first iOS project, the method further comprises:
acquiring a second declarative file of the first main project, wherein the second declarative file at least comprises the dependency relationship of the first main project on each component and the information of the function library type corresponding to each component;
in response to that the function library type corresponding to each component is a static library, calling a preset second hook script, and modifying the function library type of each component recorded in the second transparent file into a dynamic library frame;
and integrating to obtain the first main project based on the modified second declarative file.
5. A compiling apparatus characterized by comprising:
the system comprises a first obtaining module, a first editing module and a second obtaining module, wherein the first obtaining module is used for obtaining an empty first iOS project and a first declaration file of the first iOS project, and the first declaration file at least declares the dependence of the first iOS project on a first component to be compiled and the information of a function library type corresponding to the first component;
a first integration module, configured to, when a function library type of the first component is a dynamic library frame, integrate the first component into the first iOS project based on the first declaration file, and copy, according to a first main project obtained in advance, a header file of each component in the first main project into the first iOS project, so as to obtain a second iOS project;
and the compiling module is used for compiling the second iOS project, skipping the symbol to continue compiling when an undefined symbol is compiled, and obtaining a compiled file corresponding to the first component until the compiling is finished.
6. The apparatus of claim 5, further comprising:
and the first processing module is used for calling a preset first hook script when the function library type of the first assembly is a static library, and modifying the function library type of the first assembly into a dynamic library frame.
7. The apparatus of claim 5, further comprising:
the second processing module is used for replacing a second component in the first main project with a compiled file corresponding to the first component based on a first user instruction, and re-signing the first main project to obtain a second main project, wherein the first component is obtained by updating the second component;
and the debugging module is used for operating the second main project to debug based on a second user instruction.
8. The apparatus of claim 7, further comprising:
a second obtaining module, configured to obtain a second declarative file of the first main project, where the second declarative file at least includes a dependency relationship of the first main project on each component and information of a function library type corresponding to each component;
a third processing module, configured to, when the function library type corresponding to each component is a static library, call a preset second hook script, and modify the function library type of each component recorded in the second plaintext file into a dynamic library frame;
and the second integration module is used for integrating to obtain the first main project based on the modified second declarative file.
9. A computer device, comprising:
a processor and a memory, wherein the memory has stored therein a computer program which, when executed by the processor, performs the method of any of claims 1-4.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-4.
CN202110443462.0A 2021-04-23 2021-04-23 Compiling method, device and equipment of application program assembly and storage medium Pending CN113127000A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110443462.0A CN113127000A (en) 2021-04-23 2021-04-23 Compiling method, device and equipment of application program assembly and storage medium
PCT/CN2022/079594 WO2022222625A1 (en) 2021-04-23 2022-03-07 Application component compiling method and apparatus, device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110443462.0A CN113127000A (en) 2021-04-23 2021-04-23 Compiling method, device and equipment of application program assembly and storage medium

Publications (1)

Publication Number Publication Date
CN113127000A true CN113127000A (en) 2021-07-16

Family

ID=76779653

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110443462.0A Pending CN113127000A (en) 2021-04-23 2021-04-23 Compiling method, device and equipment of application program assembly and storage medium

Country Status (2)

Country Link
CN (1) CN113127000A (en)
WO (1) WO2022222625A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114020693A (en) * 2021-10-19 2022-02-08 北京五八信息技术有限公司 Header file address acquisition method and device, electronic equipment and storage medium
WO2022222625A1 (en) * 2021-04-23 2022-10-27 北京字节跳动网络技术有限公司 Application component compiling method and apparatus, device, and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150370553A1 (en) * 2014-06-24 2015-12-24 International Business Machines Corporation Wrapping computer software applications
CN106776266A (en) * 2015-11-25 2017-05-31 腾讯科技(深圳)有限公司 The collocation method and terminal device of testing tool
CN107908403A (en) * 2017-11-10 2018-04-13 北京搜狐新动力信息技术有限公司 A kind of collocation method and system of the modularization of mobile terminal business module
CN109189729A (en) * 2018-09-03 2019-01-11 五八有限公司 Lookup method, device, equipment and the storage medium of each inter-module dependence
CN109491664A (en) * 2018-11-08 2019-03-19 腾讯科技(深圳)有限公司 Generation method, device, equipment and the storage medium of iOS application program
CN111240689A (en) * 2020-01-13 2020-06-05 广州虎牙科技有限公司 Application program construction method, device, equipment and storage medium
CN111796817A (en) * 2020-07-22 2020-10-20 睿智合创(北京)科技有限公司 High-cohesion low-coupling processing method and system for iOS and electronic equipment
CN112214250A (en) * 2019-06-24 2021-01-12 北京京东尚科信息技术有限公司 Application program assembly loading method and device
CN112394942A (en) * 2020-11-24 2021-02-23 季明 Distributed software development compiling method and software development platform based on cloud computing

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10740075B2 (en) * 2018-02-06 2020-08-11 Smartshift Technologies, Inc. Systems and methods for code clustering analysis and transformation
CN113127000A (en) * 2021-04-23 2021-07-16 北京字节跳动网络技术有限公司 Compiling method, device and equipment of application program assembly and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150370553A1 (en) * 2014-06-24 2015-12-24 International Business Machines Corporation Wrapping computer software applications
CN106776266A (en) * 2015-11-25 2017-05-31 腾讯科技(深圳)有限公司 The collocation method and terminal device of testing tool
CN107908403A (en) * 2017-11-10 2018-04-13 北京搜狐新动力信息技术有限公司 A kind of collocation method and system of the modularization of mobile terminal business module
CN109189729A (en) * 2018-09-03 2019-01-11 五八有限公司 Lookup method, device, equipment and the storage medium of each inter-module dependence
CN109491664A (en) * 2018-11-08 2019-03-19 腾讯科技(深圳)有限公司 Generation method, device, equipment and the storage medium of iOS application program
CN112214250A (en) * 2019-06-24 2021-01-12 北京京东尚科信息技术有限公司 Application program assembly loading method and device
CN111240689A (en) * 2020-01-13 2020-06-05 广州虎牙科技有限公司 Application program construction method, device, equipment and storage medium
CN111796817A (en) * 2020-07-22 2020-10-20 睿智合创(北京)科技有限公司 High-cohesion low-coupling processing method and system for iOS and electronic equipment
CN112394942A (en) * 2020-11-24 2021-02-23 季明 Distributed software development compiling method and software development platform based on cloud computing

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022222625A1 (en) * 2021-04-23 2022-10-27 北京字节跳动网络技术有限公司 Application component compiling method and apparatus, device, and storage medium
CN114020693A (en) * 2021-10-19 2022-02-08 北京五八信息技术有限公司 Header file address acquisition method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
WO2022222625A1 (en) 2022-10-27

Similar Documents

Publication Publication Date Title
CN111367516B (en) Application interface generation method and device and electronic equipment
WO2022222625A1 (en) Application component compiling method and apparatus, device, and storage medium
CN111240684B (en) Cutting method and device of JS codes, medium and electronic equipment
CN112631590B (en) Component library generation method, device, electronic equipment and computer readable medium
CN111324342A (en) Method, device, medium and electronic equipment for generating interface layer code
CN113127361A (en) Application program development method and device, electronic equipment and storage medium
CN110489162B (en) Method, device, medium and equipment for simplifying installation package SO (storage and retrieval) file
CN113407165B (en) SDK generation and self-upgrade method, device, readable medium and equipment
CN111191225B (en) Method, device, medium and electronic equipment for switching isolated objects
CN110704050B (en) Module initializing method and device, electronic equipment and computer readable storage medium
CN112965713B (en) Development method, device, equipment and storage medium of visual editor
CN110442419B (en) Interface layout method and device for Android application
CN113709171B (en) Method and device for cross-component state communication
CN113448585B (en) Compiling method and device of thread pool, electronic equipment and storage medium
CN114090070A (en) Application program installation package file processing method and electronic equipment
CN109669720B (en) Chain type asynchronous request processing method and device based on Promise and electronic equipment
CN111241538B (en) Method, device, medium and electronic equipment for protecting node object variable
CN111221513B (en) Method, device, medium and electronic equipment for adjusting cascading style sheet
CN112688863B (en) Gateway data processing method and device and electronic equipment
CN113342633B (en) Performance test method and device
CN112445517B (en) Inlet file generation method, device, electronic equipment and computer readable medium
CN114398099A (en) Program resource loading method, device, equipment and storage medium
CN113760348A (en) Code packaging method and device, electronic equipment and computer readable medium
CN109933334B (en) Program execution method, device, equipment and medium
CN113419716A (en) Code generation method and device, terminal 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