IPA multi-channel batch packaging method and device
By dividing the target application project into multiple compilation targets and using batch packaging script files to package into IPA packages, the problem of cumbersome branch management is solved and the efficiency of IPA packaging and release is improved.
Patent Information
- Application Number
- CN202311119159.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-31
- Publication Date
- 2025-02-28
AI Technical Summary
During the enterprise-level application development process, the cumbersome branch management problem leads to inefficient IPA packaging and release.
By obtaining the target application project, it is divided into multiple compilation targets according to the preset functional requirements, and each compilation target corresponds to a code version channel for functional requirements. Then, access the multi-channel packaging directory, configure batch packaging script files, and execute these script files to traverse all code version channels, and package the compilation targets into IPA packages for each channel.
It effectively solves the problem of cumbersome branch management and significantly improves the efficiency of IPA packaging and release.
Smart Images

Figure CN119536785A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of application development under iOS system, and in particular to a multi-channel batch packaging method and device for IPA. Background Art
[0002] During the development of enterprise-level applications, an enterprise-level application may have different target user groups, and there may also be customized development codes corresponding to different functional requirements in the application. Such customized functional modules need to be isolated separately.
[0003] At present, the common practice in iterative development and code version management is to manage through different git branches. However, as the functional requirements continue to increase, the cost of branch management also increases, mainly including the investment in functional definition of different branches, branch merging operations, and packaging and publishing. In this way, the cumbersome branch management directly affects the efficiency of IPA packaging and publishing. Summary of the invention
[0004] The disclosed embodiments at least provide a multi-channel batch packaging method and device for IPA, which can effectively solve the problem of cumbersome branch management and improve the efficiency of IPA packaging and publishing.
[0005] The present disclosure provides a multi-channel batch packaging method for IPA, including:
[0006] Obtain target application engineering;
[0007] Divide the target application project into multiple compilation targets according to preset functional requirements, wherein each compilation target is a code version channel corresponding to realizing one of the functional requirements;
[0008] Access a multi-channel packaging directory pre-created in a project root directory corresponding to the target application project, and configure a batch packaging script file in the multi-channel packaging directory;
[0009] The batch packaging script file is executed to traverse all the code version channels, and for each code version channel, the compilation target corresponding to the code version channel is packaged into an IPA package.
[0010] In an optional implementation manner, the multi-channel packaging directory is also pre-configured with a Plist configuration file packaging script and a compilation output script.
[0011] In an optional implementation manner, executing the batch packaging script file, traversing all the code version channels, and for each of the code version channels, packaging the compilation target corresponding to the code version channel into an IPA package file, specifically includes:
[0012] Clean up the engineering space corresponding to the multi-channel packaging directory;
[0013] Execute the Plist configuration file packaging script, and for each of the code version channels, package the Plist configuration file corresponding to the code version channel;
[0014] Execute the batch packaging script file to package the packaged Plist configuration file and the compilation target corresponding to the code version channel into an IPA package file;
[0015] Execute the compilation output script, extract the IPA package file for compilation output.
[0016] In an optional implementation manner, the target application project is divided into multiple compilation targets according to preset functional requirements, specifically including:
[0017] For each of the functional requirements, create the compilation target corresponding to the functional requirement;
[0018] For each of the compilation targets, according to the functional requirements to be implemented by the compilation target, a corresponding channel version identifier is configured for the compilation target;
[0019] According to the functional requirements, configure the property list file corresponding to the compilation target, and set the corresponding reference path for the property list file;
[0020] According to the functional requirements, configure corresponding configuration file information for the compilation target;
[0021] For each of the channel version identifiers, a version code corresponding to the channel version identifier is compiled, wherein the version code includes a basic code corresponding to the target application project and a customized code for realizing the functional requirements.
[0022] In an optional implementation manner, after configuring the corresponding configuration file information for the compilation target according to the functional requirement, the method further includes:
[0023] According to the functional requirements, configure the corresponding dependent system framework for the compilation target, as well as the reference relationship with the functional components in the target application project;
[0024] According to the functional requirements, a corresponding resource file is configured for the compilation target.
[0025] In an optional implementation manner, after executing the batch packaging script file, traversing all the code version channels, and packaging the compilation target corresponding to each code version channel into an IPA package file, the method further includes:
[0026] Access the target file where the set of IPA packages corresponding to all code version channels is located;
[0027] The collection of IPA packages is uploaded to the preset intranet file server for internal testing and release.
[0028] The present disclosure also provides a multi-channel batch packaging device for IPA, including:
[0029] An acquisition module is used to acquire a target application project;
[0030] A channel division module, used to divide the target application project into multiple compilation targets according to preset functional requirements, wherein each compilation target is a code version channel corresponding to realizing one of the functional requirements;
[0031] A script configuration module is used to access a multi-channel packaging directory pre-created in a project root directory corresponding to the target application project, and configure a batch packaging script file in the multi-channel packaging directory;
[0032] The packaging execution module is used to execute the batch packaging script file, traverse all the code version channels, and for each code version channel, package the compilation target corresponding to the code version channel into an IPA package.
[0033] The present disclosure also provides an electronic device, including: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the memory via the bus, and when the machine-readable instructions are executed by the processor, the multi-channel batch packaging method of the IPA or steps in any possible implementation of the multi-channel batch packaging method of the IPA are executed.
[0034] The embodiments of the present disclosure also provide a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the multi-channel batch packaging method of the IPA described above or the steps in any possible implementation of the multi-channel batch packaging method of the IPA described above are executed.
[0035] The embodiments of the present disclosure also provide a computer program product, including a computer program / instruction, which, when executed by a processor, implements the multi-channel batch packaging method of the IPA described above, or the steps in any possible implementation of the multi-channel batch packaging method of the IPA described above.
[0036] The disclosed embodiment provides a multi-channel batch packaging method and device for IPA, which obtains a target application project; divides the target application project into multiple compilation targets according to preset functional requirements, wherein each compilation target is a code version channel corresponding to one of the functional requirements; accesses a multi-channel packaging directory pre-created in the project root directory corresponding to the target application project, and configures a batch packaging script file in the multi-channel packaging directory; executes the batch packaging script file, traverses all the code version channels, and for each code version channel, packages the compilation target corresponding to the code version channel into an IPA package. This can effectively solve the problem of cumbersome branch management and improve the efficiency of IPA packaging and publishing.
[0037] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.
[0039] Figure 1 A flowchart of a multi-channel batch packaging method of IPA provided by an embodiment of the present disclosure is shown;
[0040] Figure 2 A flowchart showing another multi-channel batch packaging method of IPA provided by an embodiment of the present disclosure is shown;
[0041] Figure 3 A schematic diagram of a multi-channel batch packaging device for IPA provided by an embodiment of the present disclosure is shown;
[0042] Figure 4 A schematic diagram of an electronic device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.
[0044] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0045] The term "and / or" herein only describes an association relationship, indicating that three relationships may exist. For example, A and / or B may represent the following three situations: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C may represent including any one or more elements selected from the set consisting of A, B, and C.
[0046] According to research, the common practice for iterative development and code version management is to manage through different git branches. However, as the number of functional requirements continues to increase, the cost of branch management also increases, mainly including the investment in functional definition of different branches, branch merging operations, and packaging and publishing. In this way, the cumbersome branch management directly affects the efficiency of IPA packaging and publishing.
[0047] Based on the above research, the present disclosure provides a multi-channel batch packaging method and device for IPA, which obtains the target application project; divides the target application project into multiple compilation targets according to preset functional requirements, wherein each compilation target is a code version channel corresponding to one of the functional requirements; accesses the multi-channel packaging directory pre-created in the project root directory corresponding to the target application project, and configures a batch packaging script file in the multi-channel packaging directory; executes the batch packaging script file, traverses all the code version channels, and for each code version channel, packages the compilation target corresponding to the code version channel into an IPA package. This can effectively solve the problem of cumbersome branch management and improve the efficiency of IPA packaging and publishing.
[0048] To facilitate understanding of this embodiment, a multi-channel batch packaging method of an IPA disclosed in an embodiment of the present disclosure is first introduced in detail. The execution subject of the multi-channel batch packaging method of an IPA provided in the embodiment of the present disclosure is generally a computer device with certain computing capabilities, and the computer device includes, for example: a terminal device or a server or other processing device, and the terminal device can be a user equipment (User Equipment, UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (Personal Digital Assistant, PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. In some possible implementations, the multi-channel batch packaging method of the IPA can be implemented by a processor calling a computer-readable instruction stored in a memory.
[0049] See also Figure 1 FIG. 1 is a flowchart of a multi-channel batch packaging method of IPA provided in an embodiment of the present disclosure, wherein the method includes steps S101 to S104, wherein:
[0050] S101. Obtain a target application project.
[0051] In the specific implementation, first obtain the target application project that needs to be IPA packaged.
[0052] Here, the embodiment of the present application can be applied to enterprise-level applications under the iOS system. Multiple compilation targets (Target) can be created under the target application project to distinguish different functional versions under the current main branch, including different dependent libraries or different servers accessed and different code logic executed, etc. to realize multi-channel projects.
[0053] The target application project may be a basic project (Project), which includes all code files, .a or .framework static library files, resource files, and basic settings related to compilation.
[0054] S102. Divide the target application project into a plurality of compilation targets according to preset functional requirements, wherein each of the compilation targets is a code version channel corresponding to realizing one of the functional requirements.
[0055] In the specific implementation, in order to adapt to the situation that an enterprise-level application may have different target users and customized code is needed to implement corresponding functions according to different functional requirements, multiple different compilation targets are established for the target application project. Each compilation target is used to implement a corresponding functional requirement. The compilation target contains the code required to implement the functional requirement, that is, each compilation target corresponds to a channel version of the code.
[0056] Here, a target application project can have multiple compilation targets, each of which can be packaged to generate an application program. That is, each compilation target is the corresponding application product, and different compilation targets can share the code under the project engineering space.
[0057] Specifically, the multi-channel configuration of application engineering can be achieved based on the following steps 1 to 5:
[0058] Step 1: For each functional requirement, create the compilation target corresponding to the functional requirement.
[0059] Step 2: For each compilation target, according to the functional requirements to be implemented by the compilation target, a corresponding channel version identifier is configured for the compilation target.
[0060] Step 3: According to the functional requirements, configure the property list file corresponding to the compilation target, and set the corresponding reference path for the property list file.
[0061] Step 4: According to the functional requirements, configure corresponding configuration file information for the compilation target.
[0062] Step 5: For each of the channel version identifiers, compile the version code corresponding to the channel version identifier, wherein the version code includes the basic code corresponding to the target application project and the customized code for realizing the functional requirements.
[0063] In the specific implementation, a compilation target corresponds to a channel version of the code. When there is a new functional requirement for development, it is necessary to create a compilation target or copy a new compilation target based on the compilation target of the current project, and then name the current compilation target a channel version identifier.
[0064] Optionally, a channel version identifier can be placed in the Preprocessor Macros setting.
[0065] Here, for the newly added compilation target, it is necessary to adaptively set the corresponding configuration information according to the functional requirements to be implemented by the compilation target.
[0066] First, set the compilation target configuration property list file (info.plist file) and the corresponding reference path. The info.plist file is a structured text file used to store the metadata of the application project. It contains important configuration information such as metadata, including information directly displayed to the user, and the document types used by the system to identify the application or its support.
[0067] After that, the configuration information setting process also needs to configure the configuration file (Scheme) information of the compilation target, including the Scheme name, package name identifier, corresponding description file, etc.
[0068] As a possible implementation method, the configuration information setting process may also include: according to the functional requirements, configuring the corresponding dependent system framework for the compilation target, and the reference relationship with the functional components in the target application project; according to the functional requirements, configuring the corresponding resource files for the compilation target.
[0069] In the specific implementation, according to the functional requirements, the corresponding dependent system framework (farmework), third-party SDK and reference relationship of functional components in the project are configured for the compilation target; the resource files corresponding to the compilation target are configured including: icons, logos, startup pictures, etc.
[0070] Among them, the system framework is used to assist in the loading of applications. Through the info.plist file, applications can provide their own meta information to the system.
[0071] Furthermore, when the above main configuration is completed, customized development of project functional requirements can be carried out based on the channel version identifier defined by the current compilation target. The code isolation is mainly controlled by the channel number. The core of its ultimate implementation is to ignore the business function requirement code that is not related to the current channel during compilation, and finally realize the customization function of the current channel requirements.
[0072] In this way, the multi-channel project configuration can effectively isolate the code space for different business function requirements, saving the code branch management overhead, especially the derivative requirements generated under different business function components of the main project can more effectively maintain and manage the code.
[0073] S103: Access a multi-channel packaging directory pre-created in a project root directory corresponding to the target application project, and configure a batch packaging script file in the multi-channel packaging directory.
[0074] In a specific implementation, a multi-channel packaging directory is created in advance under the project root directory, and the multi-channel packaging directory includes batch packaging script files, Plist configuration file packaging scripts, and compilation output scripts.
[0075] Here, the batch packaging script file is a script file for controlling the compilation target array traversal of different channel versions for packaging, which can be implemented by using a shell script.
[0076] S104: Execute the batch packaging script file, traverse all the code version channels, and for each code version channel, package the compilation target corresponding to the code version channel into an IPA package.
[0077] Specifically, step S104 can be implemented by the following steps 1 to 4:
[0078] Step 1: clean up the engineering space corresponding to the multi-channel packaging directory.
[0079] Step 2: Execute the Plist configuration file packaging script to package the Plist configuration file corresponding to each code version channel.
[0080] Step 3: execute the batch packaging script file to package the packaged Plist configuration file and the compilation target corresponding to the code version channel into an IPA package file.
[0081] Step 4: Execute the compilation output script to extract the IPA package file for compilation output.
[0082] In the specific implementation, after the batch packaging process starts, first enter the current multi-channel packaging directory, use the xcodebuild command line tool to compile and execute the multi-channel batch packaging script file. The code of the batch packaging script file mainly traverses and packages through the multi-channel array, first cleans the project, then starts code compilation, and finally exports the IPA package file from xcarchive.
[0083] Exemplarily, the logic code of the batch packaging script file may be:
[0084] Shell channelArray=("channel1""channel2")
[0085] optionsPlistArray=(". / Plist / config1.plist"". / Plist / config2.plist")
[0086] for((i=0;i<${#channelArray[*]};i++))
[0087] do
[0088] targetName=${channelArray[$i]}
[0089] optionsPlistPath=${optionsPlistArray[$i]}
[0090] xcodebuild clean-workspace${project path}-scheme${targetName}
[0091] xcodebuild archive-workspace${project path}-scheme${targetName}-archivePath. / Build / ${targetName}.xcarchive
[0092] xcodebuild-exportArchive-archivePath. / Build / ${targetName}.xcarchive-exportOptionsPlist${optionsPlistPath}-exportPath${IPA output path}
[0093] if[-e"${IPA path}"];then
[0094] curl -F "file=@${filePath}"\
[0095] -F"channel=${targetName}"\
[0096] "http: / / Intranet file server"
[0097] fi done
[0098] In this way, by executing the packaging script to package and upload batch IPA packages, the time spent on packaging can be saved to a great extent. At the same time, the main functions of each channel package can be kept consistent, ensuring the smooth progress of version internal testing and release.
[0099] The disclosed embodiment provides a multi-channel batch packaging method for IPA, which obtains a target application project; divides the target application project into multiple compilation targets according to preset functional requirements, wherein each compilation target is a code version channel corresponding to one of the functional requirements; accesses a multi-channel packaging directory pre-created in the project root directory corresponding to the target application project, and configures a batch packaging script file in the multi-channel packaging directory; executes the batch packaging script file, traverses all the code version channels, and for each code version channel, packages the compilation target corresponding to the code version channel into an IPA package. This can effectively solve the problem of cumbersome branch management and improve the efficiency of IPA packaging and publishing.
[0100] See also Figure 2 FIG. 2 is a flowchart of another multi-channel batch packaging method of IPA provided in an embodiment of the present disclosure, wherein the method includes steps S201 to S205, wherein:
[0101] S201. Obtain a target application project.
[0102] S202. Divide the target application project into a plurality of compilation targets according to preset functional requirements, wherein each of the compilation targets is a code version channel corresponding to realizing one of the functional requirements.
[0103] S203: Access a multi-channel packaging directory pre-created in the project root directory corresponding to the target application project, and configure a batch packaging script file in the multi-channel packaging directory.
[0104] S204: Execute the batch packaging script file, traverse all the code version channels, and for each code version channel, package the compilation target corresponding to the code version channel into an IPA package.
[0105] Here, steps S201 to S204 are substantially the same as steps S101 to S104, have the same implementation methods and can achieve the same technical effects, and will not be described in detail herein.
[0106] S205, accessing the target file where the set of IPA packages corresponding to all code version channels is located; uploading the set of IPA packages to a preset intranet file server for internal testing and release.
[0107] In the specific implementation, the batch packaging script file is executed. After the packaging is completed, the file where the IPA package set is located will be automatically opened, and then the script will automatically upload the batch to the intranet file server for the subsequent internal testing and release work.
[0108] The disclosed embodiment provides a multi-channel batch packaging method for IPA, which obtains a target application project; divides the target application project into multiple compilation targets according to preset functional requirements, wherein each compilation target is a code version channel corresponding to one of the functional requirements; accesses a multi-channel packaging directory pre-created in the project root directory corresponding to the target application project, and configures a batch packaging script file in the multi-channel packaging directory; executes the batch packaging script file, traverses all the code version channels, and for each code version channel, packages the compilation target corresponding to the code version channel into an IPA package. This can effectively solve the problem of cumbersome branch management and improve the efficiency of IPA packaging and publishing.
[0109] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0110] Based on the same inventive concept, the embodiment of the present disclosure also provides an IPA multi-channel batch packaging device corresponding to the IPA multi-channel batch packaging method. Since the principle of solving the problem by the device in the embodiment of the present disclosure is similar to the multi-channel batch packaging method of IPA mentioned above in the embodiment of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0111] See also Figure 3 , Figure 3 A schematic diagram of a multi-channel batch packaging device for IPA provided in an embodiment of the present disclosure. Figure 3 As shown in FIG. , the multi-channel batch packaging device 300 of IPA provided by the embodiment of the present disclosure includes:
[0112] The acquisition module 310 is used to acquire the target application project.
[0113] The channel division module 320 is used to divide the target application project into multiple compilation targets according to preset functional requirements, wherein each of the compilation targets is a code version channel corresponding to realizing one of the functional requirements.
[0114] The script configuration module 330 is used to access the multi-channel packaging directory pre-created in the project root directory corresponding to the target application project, and configure the batch packaging script file in the multi-channel packaging directory.
[0115] The packaging execution module 340 is used to execute the batch packaging script file, traverse all the code version channels, and for each code version channel, package the compilation target corresponding to the code version channel into an IPA package.
[0116] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.
[0117] The disclosed embodiment provides a multi-channel batch packaging device for IPA, which obtains a target application project; divides the target application project into multiple compilation targets according to preset functional requirements, wherein each compilation target is a code version channel corresponding to one of the functional requirements; accesses a multi-channel packaging directory pre-created in the project root directory corresponding to the target application project, and configures a batch packaging script file in the multi-channel packaging directory; executes the batch packaging script file, traverses all the code version channels, and for each code version channel, packages the compilation target corresponding to the code version channel into an IPA package. This can effectively solve the problem of cumbersome branch management and improve the efficiency of IPA packaging and publishing.
[0118] Corresponds to Figure 1 and Figure 2The multi-channel batch packaging method of IPA in the present disclosure also provides an electronic device 400, such as Figure 4 FIG. 4 is a schematic diagram of the structure of an electronic device 400 provided in an embodiment of the present disclosure, including:
[0119] Processor 41, memory 42, and bus 43; memory 42 is used to store execution instructions, including memory 421 and external memory 422; memory 421 here is also called internal memory, which is used to temporarily store operation data in processor 41 and data exchanged with external memory 422 such as hard disk. Processor 41 exchanges data with external memory 422 through memory 421. When the electronic device 400 is running, the processor 41 communicates with the memory 42 through bus 43, so that the processor 41 executes Figure 1 and Figure 2 The steps of the multi-channel batch packaging method of IPA.
[0120] The present disclosure also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the multi-channel batch packaging method of IPA described in the above method embodiment are executed. The storage medium can be a volatile or non-volatile computer-readable storage medium.
[0121] The present disclosure also provides a computer program product, which includes computer instructions. When the computer instructions are executed by a processor, the steps of the multi-channel batch packaging method of IPA described in the above method embodiment can be executed. For details, please refer to the above method embodiment, which will not be repeated here.
[0122] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is implemented as a computer storage medium. In another optional embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).
[0123] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.
[0124] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0125] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0126] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0127] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. A multi-channel batch packaging method for IPA, characterized in that: include: Obtain target application engineering; Divide the target application project into multiple compilation targets according to preset functional requirements, wherein each compilation target is a code version channel corresponding to realizing one of the functional requirements; Access a multi-channel packaging directory pre-created in a project root directory corresponding to the target application project, and configure a batch packaging script file in the multi-channel packaging directory; The batch packaging script file is executed to traverse all the code version channels, and for each code version channel, the compilation target corresponding to the code version channel is packaged into an IPA package.
2. The method according to claim 1, characterized in that: The multi-channel packaging directory also pre-configured with a Plist configuration file packaging script and a compilation output script.
3. The method according to claim 2, characterized in that The executing the batch packaging script file, traversing all the code version channels, and for each code version channel, packaging the compilation target corresponding to the code version channel into an IPA package file specifically includes: Clean up the engineering space corresponding to the multi-channel packaging directory; Execute the Plist configuration file packaging script, and for each of the code version channels, package the Plist configuration file corresponding to the code version channel; Execute the batch packaging script file to package the packaged Plist configuration file and the compilation target corresponding to the code version channel into an IPA package file; Execute the compilation output script, extract the IPA package file for compilation output.
4. The method according to claim 1, characterized in that: The target application project is divided into multiple compilation targets according to preset functional requirements, specifically including: For each of the functional requirements, create the compilation target corresponding to the functional requirement; For each of the compilation targets, according to the functional requirements to be implemented by the compilation target, a corresponding channel version identifier is configured for the compilation target; According to the functional requirements, configure the property list file corresponding to the compilation target, and set the corresponding reference path for the property list file; According to the functional requirements, configure corresponding configuration file information for the compilation target; For each of the channel version identifiers, a version code corresponding to the channel version identifier is compiled, wherein the version code includes a basic code corresponding to the target application project and a customized code for realizing the functional requirements.
5. The method according to claim 4, characterized in that After configuring the corresponding configuration file information for the compilation target according to the functional requirement, the method further includes: According to the functional requirements, configure the corresponding dependent system framework for the compilation target, as well as the reference relationship with the functional components in the target application project; According to the functional requirements, a corresponding resource file is configured for the compilation target.
6. The method according to claim 1, characterized in that After executing the batch packaging script file, traversing all the code version channels, and packaging the compilation target corresponding to each code version channel into an IPA package file, the method further includes: Access the target file where the set of IPA packages corresponding to all code version channels is located; The collection of IPA packages is uploaded to the preset intranet file server for internal testing and release.
7. A multi-channel batch packaging device for IPA, characterized in that: include: An acquisition module is used to acquire a target application project; A channel division module, used to divide the target application project into multiple compilation targets according to preset functional requirements, wherein each compilation target is a code version channel corresponding to realizing one of the functional requirements; A script configuration module is used to access a multi-channel packaging directory pre-created in a project root directory corresponding to the target application project, and configure a batch packaging script file in the multi-channel packaging directory; The packaging execution module is used to execute the batch packaging script file, traverse all the code version channels, and for each code version channel, package the compilation target corresponding to the code version channel into an IPA package.
8. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the multi-channel batch packaging method of the IPA as described in any one of claims 1 to 6 are performed.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, executes the steps of the multi-channel batch packaging method for an IPA as claimed in any one of claims 1 to 6.
10. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the steps of the multi-channel batch packaging method of IPA described in any one of claims 1 to 6 are implemented.