CN113127000B - Compiling method, compiling device, compiling equipment and compiling storage medium for application program component - Google Patents

Compiling method, compiling device, compiling equipment and compiling storage medium for application program component Download PDF

Info

Publication number
CN113127000B
CN113127000B CN202110443462.0A CN202110443462A CN113127000B CN 113127000 B CN113127000 B CN 113127000B CN 202110443462 A CN202110443462 A CN 202110443462A CN 113127000 B CN113127000 B CN 113127000B
Authority
CN
China
Prior art keywords
component
compiling
project
ios
file
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
CN202110443462.0A
Other languages
Chinese (zh)
Other versions
CN113127000A (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.)
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/CN113127000B/en
Publication of CN113127000A publication Critical patent/CN113127000A/en
Priority to PCT/CN2022/079594 priority patent/WO2022222625A1/en
Application granted granted Critical
Publication of CN113127000B publication Critical patent/CN113127000B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the disclosure relates to a compiling method, a compiling device, compiling equipment and a storage medium of an application program component, wherein the compiling method, the compiling device, the compiling equipment and the storage medium are used for 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; 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 head files of all components in a first main project, which are obtained in advance, into the first iOS project to obtain a second iOS project; and then compiling the second iOS engineering, and when compiling to undefined symbols, skipping the symbols to continue compiling to obtain the compiling files corresponding to the first components. The scheme provided by the embodiment of the disclosure realizes the compiling of the single component and improves the compiling efficiency.

Description

Compiling method, compiling device, compiling equipment and compiling storage medium for application program component
Technical Field
The embodiment of the disclosure relates to the technical field of computers, in particular to a compiling method, device and equipment of an application program component and a storage medium.
Background
Apple mobile device operating system (iPhone Operating System, iOS for short)) may generally be made up of multiple components. In the prior art, when compiling a certain component in an iOS application program, all components of the whole application program generally need to be downloaded, and the time consumption of the whole compiling process is long and the efficiency is low due to the large downloaded data volume.
Disclosure of Invention
In order to solve the above technical problems or at least partially solve the above technical problems, embodiments of the present disclosure provide a compiling method, device, equipment and storage medium of an application program component.
A first aspect of an embodiment of the present disclosure provides a compiling method of an application component, the method including:
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 the function library type of the first component being a dynamic library frame, integrating the first component into a first iOS project based on a first declaration file, and copying head files of all components 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 engineering, and when compiling to undefined symbols, skipping the symbols to continue compiling until the compiling is finished, so as to obtain the compiling file corresponding to the first component.
In an 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 calling a preset first hook script in response to the function library type of the first component being a static library, and modifying the function library type of the first component into a dynamic library frame.
In an implementation manner, after obtaining the compiled file corresponding to the first component, the method of the first aspect may further include:
Based on a first user instruction, replacing a second component in the first main project with a compiling file corresponding to the first component, and re-signing the first main project to obtain a second main project, wherein the first component is updated by the second component; and running the second main project based on the second user instruction to debug.
In an embodiment, before acquiring the empty first iOS project and the first declaration file of the first iOS project, the method of the first aspect may further include:
Acquiring a second plaintext file of the first main project, wherein the second plaintext 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; responding to the function library type corresponding to each component as 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 a first main project based on the modified second plaintext.
A second aspect of an embodiment of the present disclosure provides a compiling apparatus, the apparatus including:
The first acquisition module is used for acquiring the empty first iOS engineering and a first declaration file of the first iOS engineering, wherein the first declaration file at least declares the dependence of the first iOS engineering 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 the head files of all components 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 engineering, and when compiling to the undefined symbol, skipping the symbol to continue compiling until the compiling is finished, so as to obtain the compiling file corresponding to the first component.
In one embodiment, the apparatus provided in the second aspect may further include:
And 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 compiling 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 updated by the second component;
And the debugging module is used for running the second main engineering to debug based on the second user instruction.
In one embodiment, the apparatus provided in the second aspect may further include:
the second acquisition module is used for acquiring a second plaintext file of the first main project, and the second plaintext 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 the first main project based on the modified second plaintext.
A third aspect of the disclosed embodiments provides a computer device comprising a memory and a processor, wherein the memory stores a computer program which, when executed by the processor, performs the method of the first aspect described above.
A fourth aspect of the disclosed embodiments provides a computer readable storage medium having stored therein a computer program which, when executed by a processor, can 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 the empty first iOS project and the first declaration file of the first iOS project, at least the first iOS project is declared to depend on the first component to be compiled and the information of the function library type corresponding to the first component 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 head files of all components 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 engineering, and when compiling to undefined symbols, skipping the symbols to continue compiling to obtain the compiling files corresponding to the first components. The scheme provided by the embodiment of the disclosure realizes the compiling of the single component of the application program, and all components of the application program do not need to be pulled, so that the pulling amount of data and the compiling time consumption are reduced, and the compiling efficiency of the single component is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments of the present disclosure or the solutions in the prior art, the drawings that are required for the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a flow chart of a method of compiling an application component provided by an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a component pull scenario provided by an embodiment of the present disclosure;
FIG. 3 is a flow chart of a debugging method provided by an embodiment of the present disclosure;
Fig. 4 is a schematic structural diagram of a compiling apparatus according to an embodiment of the present 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, a further description of aspects of the present disclosure will be provided below. It should be noted that, without conflict, the embodiments of the present disclosure and features in the embodiments may be combined with each other.
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 otherwise than as described herein; it will be apparent that the embodiments in the specification are only some, but not all, embodiments of the disclosure.
Fig. 1 is a flowchart of a method of compiling application components, which may be performed by a computer device, provided by an embodiment of the present disclosure. As shown in fig. 1, the method provided in this embodiment includes the following steps:
Step 101, 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 first iOS project to be compiled depending on a first component and information of a function library type corresponding to the first component.
In practice, an application may be made up of multiple components. Each component may be understood as a basic building block of an application. A component may define the functionality of some aspect or aspects of an application.
The first iOS project referred to in this embodiment may also be referred to as a host project, which is a null project that does not include components in the main program (hereinafter referred to as a first main program for convenience of distinction), and is similar in form and structure to the first main program.
In this embodiment, the first declaration file may be used to declare dependencies of the first iOS project. At least the first iOS engineering is declared to be dependent on a certain component to be compiled (for convenience of distinction, hereinafter referred to as a first component) and configuration information of the first component, where the configuration information at least includes 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 (english names may be expressed as static_library) and dynamic libraries (english names may be expressed as dynamic_frame work). In the iOS system, the static library and the dynamic library are generally 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 the present embodiment may also include a static library frame work and a dynamic library frame work.
There may be various methods for obtaining the first iOS project and the first declaration file in the present disclosure, for example, in a possible implementation, a configuration interface may be provided to a 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 created in advance and stored locally may also be obtained from a local storage area. For another example, in yet 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. The above-listed embodiments are of course illustrative only and are not intended to be limiting. In practice, the method of obtaining the first iOS project and the first declaration file may be set as desired, and need not be limited to one or several specific methods.
And 102, responding to the function library type of the first component as a dynamic library frame, integrating the first component into a first iOS project based on a first declaration file, and copying the head files of all components 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.
By way of example, fig. 2 is a schematic diagram of a component pulling scenario provided by an embodiment of the present disclosure, and in fig. 2, a computer device 21 may be understood as a device for compiling a first component in the present embodiment. Component management platform 22 may be understood as a platform for storing and managing various application components. After the computer device 21 acquires the first iOS project and the first declaration file in the present embodiment, the component management platform 22 is requested to acquire 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 engineering, the computer device 21 needs to read the configuration information of the first component from the first declaration file, judge 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 framework, integrate the first component into the first iOS engineering directly in a dynamic library linking manner; otherwise, if the function library type of the first component is a static library, a preset first hook function (also called hook) script is required to be called, the first component is packaged to obtain a dynamic library frame corresponding to the first component, parameters used for representing the function library type of the first component in configuration information of the first component are modified to parameters corresponding to the dynamic library type, and then the first component is linked to the first iOS engineering based on a 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 into the first iOS engineering in a dynamic library linking mode, and the system memory is saved.
Further, the first main project obtained in advance includes each component forming the application program and information of the header files of each component, in this embodiment, the header files of each component in the first main project need to be copied into 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 engineering, and when compiling to undefined symbols, skipping the symbols to continue compiling until compiling is finished, so as to obtain the compiling file corresponding to the first component.
In the embodiment of the disclosure, although only the first component is complete and other components are header files, the embodiment of the disclosure configures the compiling capability of the compiler, so that the compiler does not report errors when compiling to undefined symbols, but skips symbols to continue compiling, and thus, even if only one component is the first component in the second iOS project, the compiling can be completed, therefore, the component compiling scheme of the embodiment of the disclosure does not need to download all components in the application program, and can also compile one component in the application program independently, thereby reducing the downloading amount of data and improving the compiling efficiency of the components.
According to the embodiment of the disclosure, by acquiring the empty first iOS project and the first declaration file of the first iOS project, at least the first iOS project is declared to depend on the first component to be compiled and the information of the function library type corresponding to the first component 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 head files of all components 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 engineering, and when compiling to undefined symbols, skipping the symbols to continue compiling to obtain the compiling files corresponding to the first components. The scheme provided by the embodiment of the disclosure realizes the compiling of the single component of the application program, and all components of the application program do not need to be pulled, so that the pulling amount of data and the compiling time consumption are reduced, and the compiling efficiency of the single component is improved.
Fig. 3 is a flowchart of a debugging method provided by an embodiment of the present disclosure, as shown in fig. 3, in one 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 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 updated by the second component.
And 302, running a second main project to debug based on a second user instruction.
The first component in this embodiment may be understood as an update product of the second component. I.e. the second component and the first component may be understood as an old version and a new version of a certain component, respectively. The compiled file of the first component may be understood as a compiled file of a dynamic library frame.
The first user command and the second user command in this embodiment may be voice commands, text commands, or other commands.
The first user instruction and the second user instruction may be acquired in various manners, and in one possible manner, the first user instruction may be triggered by providing a preset interactive interface to the user, so that the user selects the first component and the second component on the preset interactive interface, and triggering the corresponding key. In another possible manner, the first user instruction of the user may also be acquired by the 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) through a wired or wireless manner may also be received through a preset information receiving device. In this embodiment, the second user instruction may be acquired in a similar manner to the first user instruction, which is not described herein.
It should be noted that the above-mentioned embodiments are only some embodiments, but not all embodiments, of the embodiments of the disclosure, and in fact, the acquisition manners of the first user instruction and the second user instruction may be set according to needs, and are not necessarily limited to any one or several 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 re-sign the first main project to obtain the second main project, and the second user instruction is used to trigger the debugging operation of the second main project to obtain the corresponding debugging information.
It should be noted that, in order to avoid an error caused by different function library types of the 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 work, after or before obtaining the second main project, a preset second hook script is also required to be called to package each component into the dynamic library frame work, and the function library type of the component is modified into the dynamic library frame work. For example, in one embodiment of the present disclosure, the above method for modifying the function library types of the components in the first main project may be exemplarily performed before step 101 of 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 the first main project, wherein the second declaration 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; responding to the function library type corresponding to each component as 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 a first main project based on the modified second plaintext. Of course, this is by way of illustration only and not by way of limitation of the present disclosure.
According to the method, after the first component is compiled independently based on the method of the embodiment of fig. 1, the compiling file of the first component is adopted to replace the second component in the first main project, and debugging is carried out based on the replaced second main project, so that the debugging efficiency can be improved, and excessive time consumption during compiling the first component is avoided.
Fig. 4 is a schematic structural diagram of a compiling apparatus according to an embodiment of the present disclosure, which may be exemplarily understood as a computer device or a part of functional modules in the computer device in the above embodiment. 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 states 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;
The first integration module 42 is configured to integrate the first component into a first iOS project based on the first declaration file when the function library type of the first component is a dynamic library frame, and copy header files of components in the first main project into the first iOS project according to a first main project obtained in advance, so as to obtain a second iOS project;
and the compiling module 43 is configured to compile the second iOS project, and when compiling to a symbol without definition, skip the symbol to continue compiling until the compiling is completed, so as to obtain a compiling file corresponding to the first component.
In one embodiment, the compiling apparatus 40 may further include:
And 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 compiling 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 updated by the second component;
And the debugging module is used for running the second main engineering to debug based on the second user instruction.
In one embodiment, the compiling apparatus 40 may further include:
the second acquisition module is used for acquiring a second plaintext file of the first main project, and the second plaintext 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 the first main project based on the modified second plaintext.
The implementation manner and the beneficial effects of the device provided in this embodiment are similar to those of the method in any one of the foregoing embodiments of fig. 1 to 3, and are not repeated here.
The disclosed embodiments also provide a computer device comprising a memory and a processor, wherein the memory stores a computer program which, when executed by the processor, can perform the method of any of the embodiments of fig. 1-3 described above.
By way of example, fig. 5 is a schematic structural diagram of a computer device in an embodiment of the present disclosure. Referring now in particular 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 embodiments of the present disclosure may be understood as a device having program compiling and debugging functions. The computer device illustrated in fig. 5 is merely an example and should not be construed as limiting the functionality and scope of use of embodiments of the present disclosure.
As shown in fig. 5, the computer device 1000 may include a processing means (e.g., a central processing unit, a graphic processor, etc.) 1001 which 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 means 1008 into a Random Access Memory (RAM) 1003. In the RAM 1003, various programs and data required for the operation of the computer device 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.
In general, the following devices may be connected to the I/O interface 1005: input devices 1006 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 1007 including, for example, a Liquid Crystal Display (LCD), speaker, vibrator, etc.; storage 1008 including, for example, magnetic tape, hard disk, etc.; and communication means 1009. The communication means 1009 may allow the computer device 1000 to communicate wirelessly or by wire with other devices to exchange data. While fig. 5 shows a computer apparatus 1000 having various devices, it is to be understood that not all illustrated devices are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 1009, or installed from the storage device 1008, or installed from the ROM 1002. The above-described functions defined in the method of the embodiment of the present disclosure are performed when the computer program is executed by the processing device 1001.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any 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 context of this 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 the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. 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, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, 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 communication 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 networks.
The computer readable medium may be embodied in the computer device; or may exist alone without being assembled into the computer device.
The computer readable medium carries one or more programs which, when executed by the computer device, cause the computer 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; in response to the function library type of the first component being a dynamic library frame, integrating the first component into a first iOS project based on a first declaration file, and copying head files of all components 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 engineering, and when compiling to undefined symbols, skipping the symbols to continue compiling until the compiling is finished, so as to obtain the compiling file corresponding to the first component.
Computer program code for carrying out operations of the present disclosure may be written in 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 kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts 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 involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
The functions described above herein 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: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), 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. The 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, where the computer program, when executed by a processor, may implement the method of any one of the embodiments of fig. 1 to 3, and the implementation manner and beneficial effects are similar, and are not repeated herein.
The disclosed embodiments also provide a computer program product which, when executed by a computer device, can perform the method of any of the embodiments of fig. 1-3 described above.
It should be noted that in this document, relational terms such as "first" and "second" and the like are 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. Moreover, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing is merely a specific embodiment of the disclosure to enable one skilled in the art to understand or practice the 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 and described herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (8)

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;
Reading configuration information of a first component from a first declaration file, judging the function library type of the first component according to the configuration information of the first component, directly responding to the function library type of the first component as a dynamic library framework if the function library type of the first component is the dynamic library framework, integrating the first component into a first iOS project based on the first declaration file, and copying head files of all components 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;
If the function library of the first component is a static library, firstly packaging the first component into a dynamic library frame, modifying the function library type of the first component into the dynamic library frame, and then responding to the function library type of the first component as the dynamic library to enable the first component to be linked to the first iOS engineering in a link mode of the dynamic library;
And compiling the second iOS engineering, and when compiling to undefined symbols, skipping the symbols to continue compiling until compiling is finished, so as to obtain the compiling file corresponding to the first component.
2. The method of claim 1, wherein after the obtaining the compiled file corresponding to the first component, the method further comprises:
Based on a first user instruction, replacing a second component in the first main project with a compiling file corresponding to the first component, and re-signing the first main project to obtain a second main project, wherein the first component is updated by the second component;
And running the second main project based on a second user instruction to debug.
3. The method of claim 2, wherein prior to the acquiring the empty first iOS project and the first declaration file of the first iOS project, the method further comprises:
acquiring a second plaintext file of the first main project, wherein the second plaintext 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;
responding to the function library types corresponding to the components as static libraries, calling a preset second hook script, and modifying the function library types of the components recorded in the second plaintext into dynamic libraries;
and integrating to obtain the first main project based on the modified second plaintext.
4. A compiling apparatus, comprising:
the first acquisition module is used for 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;
The first integration module is used for reading the configuration information of the first component from the first declaration file, judging the function library type of the first component according to the configuration information of the first component, directly responding to the fact that the function library type of the first component is a dynamic library frame if the function library type of the first component is the dynamic library frame, integrating the first component into the first iOS project based on the first declaration file, and copying the head files of all components in the first main project into the first iOS project according to the first main project obtained in advance to obtain a second iOS project;
The first processing module is used for firstly packaging the first component into a dynamic library frame when the function library of the first component is a static library, modifying the function library type of the first component into the dynamic library frame, and responding to the function library type of the first component as the dynamic library so that the first component is linked to the first iOS engineering in a link mode of the dynamic library;
And the compiling module is used for compiling the second iOS engineering, and when compiling to undefined symbols, skipping the symbols to continue compiling until the compiling is finished, so as to obtain the compiling file corresponding to the first component.
5. The apparatus of claim 4, wherein the apparatus further comprises:
The second processing module is used for replacing a second component in the first main project with a compiling 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 updated by the second component;
and the debugging module is used for running the second main project to debug based on a second user instruction.
6. The apparatus of claim 5, wherein the apparatus further comprises:
The second acquisition module is used for acquiring a second plaintext file of the first main project, wherein the second plaintext 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 plaintext into a dynamic library frame;
And the second integration module is used for integrating the first main project based on the modified second plaintext.
7. 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-3.
8. A computer readable storage medium, characterized in that the storage medium has stored therein a computer program which, when executed by a processor, implements the method according to any of claims 1-3.
CN202110443462.0A 2021-04-23 2021-04-23 Compiling method, compiling device, compiling equipment and compiling storage medium for application program component Active CN113127000B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110443462.0A CN113127000B (en) 2021-04-23 2021-04-23 Compiling method, compiling device, compiling equipment and compiling storage medium for application program component
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 CN113127000B (en) 2021-04-23 2021-04-23 Compiling method, compiling device, compiling equipment and compiling storage medium for application program component

Publications (2)

Publication Number Publication Date
CN113127000A CN113127000A (en) 2021-07-16
CN113127000B true CN113127000B (en) 2024-05-28

Family

ID=76779653

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110443462.0A Active CN113127000B (en) 2021-04-23 2021-04-23 Compiling method, compiling device, compiling equipment and compiling storage medium for application program component

Country Status (2)

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

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113127000B (en) * 2021-04-23 2024-05-28 北京字节跳动网络技术有限公司 Compiling method, compiling device, compiling equipment and compiling storage medium for application program component
CN114020693B (en) * 2021-10-19 2022-07-08 北京五八信息技术有限公司 Header file address acquisition method and device, electronic equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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 (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9268557B2 (en) * 2014-06-24 2016-02-23 International Business Machines Corporation Wrapping computer software applications
US10740075B2 (en) * 2018-02-06 2020-08-11 Smartshift Technologies, Inc. Systems and methods for code clustering analysis and transformation
CN113127000B (en) * 2021-04-23 2024-05-28 北京字节跳动网络技术有限公司 Compiling method, compiling device, compiling equipment and compiling storage medium for application program component

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Also Published As

Publication number Publication date
CN113127000A (en) 2021-07-16
WO2022222625A1 (en) 2022-10-27

Similar Documents

Publication Publication Date Title
CN110554876A (en) Method and device for compiling android project
CN113127000B (en) Compiling method, compiling device, compiling equipment and compiling storage medium for application program component
CN111367516B (en) Application interface generation method and device and electronic equipment
CN111240684A (en) Cutting method and device of JS code, medium and electronic equipment
CN110990023A (en) aar file dependency uploading method and device, storage medium and electronic equipment
CN112631590B (en) Component library generation method, device, electronic equipment and computer readable medium
WO2019029451A1 (en) Method for publishing mobile applications and electronic apparatus
CN111338944B (en) Remote Procedure Call (RPC) interface testing method, device, medium and equipment
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
CN108536429B (en) Method and device for developing software, storage medium and electronic equipment
CN110442419B (en) Interface layout method and device for Android application
CN110489180B (en) Buried point reporting method, device, medium and electronic equipment
CN109669720B (en) Chain type asynchronous request processing method and device based on Promise and electronic equipment
CN111191225A (en) Method, device, medium and electronic equipment for switching isolated objects
CN112084254A (en) Data synchronization method and system
CN115952089A (en) Software automation unit testing method and device, server and storage medium
CN113448585B (en) Compiling method and device of thread pool, electronic equipment and storage medium
CN113741951B (en) Local packing method and device
CN114153462B (en) Client source code processing method and device, storage medium and electronic equipment
CN111241538B (en) Method, device, medium and electronic equipment for protecting node object variable
CN113342633B (en) Performance test method and device
CN114398099A (en) Program resource loading method, device, equipment and storage medium
CN112688863B (en) Gateway data processing method and device and electronic equipment
CN109933334B (en) Program execution method, device, equipment and 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