CN109491664B - iOS application program generation method, device, equipment and storage medium - Google Patents

iOS application program generation method, device, equipment and storage medium Download PDF

Info

Publication number
CN109491664B
CN109491664B CN201811325722.9A CN201811325722A CN109491664B CN 109491664 B CN109491664 B CN 109491664B CN 201811325722 A CN201811325722 A CN 201811325722A CN 109491664 B CN109491664 B CN 109491664B
Authority
CN
China
Prior art keywords
target
compiling
project
file
application program
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
CN201811325722.9A
Other languages
Chinese (zh)
Other versions
CN109491664A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201811325722.9A priority Critical patent/CN109491664B/en
Publication of CN109491664A publication Critical patent/CN109491664A/en
Application granted granted Critical
Publication of CN109491664B publication Critical patent/CN109491664B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation

Abstract

The application discloses a method, a device, equipment and a storage medium for generating an iOS application program. The method comprises the following steps: creating a project corresponding to the target iOS application program, wherein the project comprises a first compiling target with the type of the application program; creating a second compiling target with the type of a dynamic library in the engineering; moving target content in the first compiling target from the first compiling target to a second compiling target, wherein the target content is a file set containing code files; and compiling and packaging the project to generate an installation package of the target iOS application program, wherein the installation package comprises an application program set corresponding to the first compiling target and a dynamic library corresponding to the second compiling target. The code segments do not need to be deleted, so that the integrity of the functions of the application program is ensured, the scheme can be adopted for any iOS application program to avoid the limitation requirement on the code segments, and the scheme is good in universality.

Description

iOS application program generation method, device, equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of software, in particular to a method, a device, equipment and a storage medium for generating an iOS application program.
Background
Apple Inc (Apple Inc.) has a limit on the size of code fragments in an installation package of an application (app) submitted to an application store by a developer. For example, for the ios8.0 system, the code section of the application must be less than 60M.
In the related art, the installation package of the iOS application is slimmed by technical means to meet the requirement that the code segment thereof is smaller than a specified size. For example, by deleting some useless code fragments, the size of the code fragments in the installation package of the iOS application is reduced.
Due to the bottleneck of the code segment deletion, for an application program such as a large-scale hand tour or other applications with rich functions, the method provided by the above related art may still not meet the restriction requirement after some useless code segments are deleted, i.e. the method is poor in universality.
Disclosure of Invention
The embodiment of the application provides a method, a device, equipment and a storage medium for generating an iOS application program, and can be used for solving the problem of poor universality of methods provided by the related technology. The technical scheme is as follows:
in one aspect, an embodiment of the present application provides a method for generating an iOS application, where the method includes:
creating a project corresponding to a target iOS application program, wherein the project comprises a first compiling target with the type of the application program;
creating a second compiling target with the type of a dynamic library in the engineering;
moving target content in the first compiled target from the first compiled target to the second compiled target, wherein the target content is a file set containing code files;
and compiling and packaging the project to generate an installation package of the target iOS application program, wherein the installation package comprises an application program set corresponding to the first compiled target and a dynamic library corresponding to the second compiled target.
In another aspect, an embodiment of the present application provides an iOS application generation apparatus, where the apparatus includes:
the system comprises a project creating module, a first compiling module and a second compiling module, wherein the project creating module is used for creating a project corresponding to a target iOS application program, and the project comprises a first compiling target with the type of the application program;
the object creating module is used for creating a second compiling object with the type of a dynamic library in the project;
a content transfer module, configured to move target content in the first compiled target from the first compiled target to the second compiled target, where the target content is a file set including a code file;
and the compiling and packaging module is used for compiling and packaging the project to generate an installation package of the target iOS application program, wherein the installation package comprises an application program set corresponding to the first compiling target and a dynamic library corresponding to the second compiling target.
In yet another aspect, an embodiment of the present application provides a computer device, which includes a processor and a memory, where the memory stores at least one instruction, at least one program, a code set, or a set of instructions, and the at least one instruction, the at least one program, the code set, or the set of instructions is loaded and executed by the processor to implement the method for generating an iOS application according to the foregoing aspect.
In yet another aspect, embodiments of the present application provide a computer-readable storage medium having at least one instruction, at least one program, a set of codes, or a set of instructions stored therein, which is loaded and executed by a processor to implement the method for generating an iOS application according to the above aspect.
In yet another aspect, the present application provides a computer program product, when being executed, for executing the method for generating an iOS application program according to the above aspect.
The technical scheme provided by the embodiment of the application at least comprises the following beneficial effects:
in the technical scheme provided by the embodiment of the application, a second compiled target with the type of a dynamic library is created in a project corresponding to an iOS application program, then target content in a first compiled target with the original type of the application program is moved into the second compiled target from the first compiled target, and finally the project is compiled and packaged to generate an installation package of the target iOS application program, wherein the installation package comprises an application program set corresponding to the first compiled target and the dynamic library corresponding to the second compiled target. Thus, when the installation package of the target iOS application is submitted to the apple application store, the size of the code segments in the application set will not exceed the restriction requirement, since apple will only perform compliance checks on the size of the code segments in the application set, and most of the code segments in the application set have been moved into the dynamic library. According to the technical scheme, the code segments do not need to be deleted, the integrity of the functions of the application program is ensured, the bottleneck can not occur, the technical scheme can be adopted for any iOS application program to avoid the limitation requirement on the code segments, and the universality of the scheme is good.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a diagram illustrating a related art generation flow of an iOS application;
FIG. 2 is a schematic diagram illustrating a generation flow of an iOS application provided in the present disclosure;
FIG. 3 is a flow chart of a method for generating an iOS application provided by one embodiment of the present application;
FIG. 4 is a flow chart of a method for generating an iOS application provided by another embodiment of the present application;
FIG. 5 illustrates a diagram of Xcode engineering before and after modification;
FIGS. 6 and 7 illustrate an architectural diagram of the content in the project files of an Xcode project before and after modification;
fig. 8 is a block diagram of an iOS application generation apparatus according to an embodiment of the present application;
fig. 9 is a block diagram of a computer device according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Unity is an engine suitable for developing iOS applications, particularly for game applications.
Referring to fig. 1, a schematic diagram of a generation flow of an iOS application provided by the related art is shown. First, a Unity project corresponding to the target iOS application is created. The Unity project is then exported as an Xcode project, which contains a Target of type application (which may be referred to as an App Target). And finally, compiling and packaging the Xcode project to generate an installation package of the target iOS application program.
Please refer to fig. 2, which shows a schematic diagram of a generation flow of the iOS application provided in the present technical solution. Different from the generation flow provided by the related art, according to the technical scheme of the application, after the Xcode project is derived, at least one Target (which may be called a Library Target) with a type of a dynamic Library is created in the Xcode project, and then some codes in the App Target are stolen from the App Target into the Library Target. And finally, compiling and packaging the Xcode project to generate an installation package of the Target iOS application program, wherein the installation package comprises an application program set corresponding to the App Target and a dynamic Library corresponding to the Library Target. Thus, when the installation package of the target iOS application is submitted to the apple application store, the size of the code segments in the application set will not exceed the restriction requirement, since apple will only perform compliance checks on the size of the code segments in the application set, and most of the code segments in the application set have been moved into the dynamic library. According to the technical scheme, the code segments do not need to be deleted, the integrity of the functions of the application program is ensured, the bottleneck can not occur, the technical scheme can be adopted for any iOS application program to avoid the limitation requirement on the code segments, and the universality of the scheme is good.
The technical solution of the present application will be described below by means of several embodiments.
Referring to fig. 3, a flowchart of a method for generating an iOS application according to an embodiment of the present application is shown. The method can be applied in Computer devices, which refer to devices with computing and processing capabilities, such as PCs (Personal computers). The method may comprise the steps of:
step 301, a project corresponding to the target iOS application program is created, wherein the project comprises a first compiled target of the type of the application program.
The computer device may create a project corresponding to the target iOS application in a tool or platform for developing the iOS application. One or more compiled targets may be created in a project. Compiled objects are used to define the products to be generated, one compiled object corresponding to a product, and one compiled object organizing the files and instructions required by the product into a series of operations that can be performed. The type of compiled object may include an application, a dynamic library, and the like. The project corresponding to the target iOS application program defaults to include a first compiling target with the type of the application program, the first compiling target includes contents such as code files, resource files and library files required by the target iOS application program, and an application program set can be generated after the first compiling target is compiled and packaged.
Taking an Xcode tool as an example, the Xcode tool is a software development tool dedicated to developing the iOS application, and during the process of developing the target iOS application, an Xcode project corresponding to the target iOS application can be created. The compiled targets in the Xcode project are called targets, and at least one Target can be included in one Xcode project. In Xcode engineering, the first Target of type application may be referred to as App Target.
Step 302, a second compiled target of the type of dynamic library is created in the project.
The project corresponding to the target iOS application program allows a plurality of compiled targets to be created. In the embodiment of the application, a second compiled target of which the type is a dynamic library is created in the project corresponding to the target iOS application program.
Taking the Xcode engineering as an example, a second Target with a type of a dynamic Library may be created in the Xcode engineering corresponding to the Target iOS application, and the second Target may be referred to as a Library Target.
Step 303, move the target content in the first compiled target from the first compiled target to the second compiled target, where the target content is a file set including a code file.
Optionally, the target content in the first compiled target is deleted from the first compiled target and the target content is added to the second compiled target by parsing the project file corresponding to the target iOS application and then modifying the project file.
In the embodiment of the application, because the object content is a file set including a code file, by moving the code file in the first compiled object into the second compiled object, because the type of the first compiled object is an application program, and the type of the second compiled object is a dynamic library, when the subsequent apple company performs compliance check, only the size of the code segment in the application program set generated by compiling and packaging based on the first compiled object is subjected to compliance check, and the size of the code segment in the dynamic library generated by compiling and packaging based on the second compiled object is not subjected to compliance check, so that the requirement of the apple company for limiting the size of the code segment is met.
In one possible implementation, the targeted content includes a code file. Optionally, the code file is a code file corresponding to a part of the code in the first compiled target. The method comprises the steps of stealing part of codes in a first compiled object into a second compiled object and appropriately keeping a part of codes in the first compiled object instead of stealing all codes in the first compiled object into the second compiled object, and the method is used for ensuring the normal operation of a target iOS application program, for example, keeping a main function (namely a main function) of the target iOS application program in the first compiled object and stealing code files corresponding to other codes except the main function into the second compiled object. It should be noted that the size of the code segment of the code reserved in the first compiled target after compiling should be smaller than a preset threshold to meet the limit requirement of apple, and the preset threshold may be determined according to the limit requirement of apple.
In some other embodiments, the target content includes a resource file and/or a library file in addition to the code file. Because some code files in the first compiling object are moved into the second compiling object, related resource files and library files can be moved into the second compiling object together, so that the situation that contents with incidence relations need to be maintained due to the fact that the contents are placed in different compiling objects, extra dependence and reference relations need to be maintained, and the organization structure in the engineering files is simplified.
The number of second compiled targets may be 1 or more. When the number of the second compiling targets is 1, the structure of the whole project is simpler. Of course, multiple second compiled targets may also be created, if necessary.
In one example, assuming that the number of second compilation targets is n, when n is greater than 1, the target content may be split into n pieces of content, and then the n pieces of content are respectively added to n second compilation targets, each of which adds one of the n pieces of content. For example, 2 second compiled objects are created in the project corresponding to the target iOS application program, then a part of the target contents in the first compiled object is stolen into one second compiled object, and another part of the target contents in the first compiled object is stolen into another second compiled object.
Step 304, compiling and packaging the project to generate an installation package of the target iOS application program, wherein the installation package comprises an application program set corresponding to the first compiling target and a dynamic library corresponding to the second compiling target.
The installation package of the target iOS application is an ipa (iphone application) file, and the ipa file is a compressed package, which includes an application set generated by compiling and packaging the content in the first compilation target and a dynamic library generated by compiling and packaging the content in the second compilation target.
Optionally, the step 303 further includes the following steps: and compressing the content in the second compiling target. For example, unnecessary contents including an unnecessary code file, an unnecessary resource file, an unnecessary library file, and the like in the second compilation target may be deleted, or a compression process or the like may be performed on the resource file. Through the mode, the size of the whole installation package can be reduced.
To sum up, in the technical solution provided in this embodiment of the present application, a second compiled object of which the type is a dynamic library is created in a project corresponding to an iOS application, then target content in a first compiled object of which the original type is an application is moved from the first compiled object to the second compiled object, and finally the project is compiled and packaged to generate an installation package of the target iOS application, where the installation package includes an application set corresponding to the first compiled object and a dynamic library corresponding to the second compiled object. Thus, when the installation package of the target iOS application is submitted to the apple application store, the size of the code segments in the application set will not exceed the restriction requirement, since apple will only perform compliance checks on the size of the code segments in the application set, and most of the code segments in the application set have been moved into the dynamic library. According to the technical scheme, the code segments do not need to be deleted, the integrity of the functions of the application program is ensured, the bottleneck can not occur, the technical scheme can be adopted for any iOS application program to avoid the limitation requirement on the code segments, and the universality of the scheme is good.
Referring to fig. 4, a flowchart of a method for generating an iOS application according to another embodiment of the present application is shown. In this embodiment, a technical solution of the present application will be described by taking an example of generating a target iOS application in an iOS application development tool, xocode. The method is equally applicable to the computer device described above. The method may include the steps of:
step 401, creating an Xcode project corresponding to a target iOS application program; the Xcode engineering comprises a first Target, and the type of the first Target is an application program.
Taking development of a target iOS application program through Unity as an example, firstly, a Unity project corresponding to the target iOS application program is created, and then the Unity project is exported to be an Xcode project. When a target iOS application is developed by Unity, a Unity project corresponding to the target iOS application is created. The Unity project will contain the code, resources, libraries, etc. of the target iOS application. In Unity engineering, the code of an application is typically written in C #.
To generate an iOS application, Unity engineering needs to be exported as Xcode engineering. The Xcode project comprises files generated by compiling the contents of codes, resources, libraries and the like in the Unity project, and the Xcode project can comprise the contents of code files, resource files, library files and the like. The code files in Xcode engineering are usually written in C + + and Objective-C. In the process of exporting the Xcode project, the content such as the code, the resource and the like can be compiled through the BuildPlayer, and the content such as the code file, the resource file and the like which meets the standard requirement of the Xcode project is generated.
At least one Target may be included in the Xcode engineering. Targets are used to define products (products) to be generated, one Target corresponding to a product and one Target organizing files and instructions required by the product into a series of operations that can be performed.
The Xcode project includes a first Target with a type of an application program as a default, namely the first Target can be called as App Target. The App Target includes contents such as code files, resource files, library files, and the like required by the Target iOS application program.
And 402, creating a second Target in the Xcode project, wherein the type of the second Target is a dynamic library.
The Xcode engineering allows multiple targets to be created. In the embodiment of the present application, a second Target of a type of a dynamic Library is created in the Xcode engineering, and the second Target may be referred to as a Library Target.
And step 403, moving the Target content in the first Target from the first Target to the second Target, wherein the Target content is a file set containing code files.
In one possible implementation, the engineering file of the Xcode engineering is parsed, then the engineering file is modified, the Target content in the first Target is deleted from the first Target, and the Target content is added to the second Target. Optionally, an XUDynLibMaker is obtained based on the second development of XUPorter, and the Xudynlibmaker is used for realizing the reverse analysis and customization functions of the engineering file of the Xcode engineering, so that the Target content is moved from the first Target to the second Target.
The suffix name of the engineering file of the Xcode engineering is. pbxproj, which may be referred to as project. pbxproj file. The engineering file of the Xcode engineering stores various configuration parameters of the Xcode engineering, the engineering file comprises a plurality of sections, and the following table-1 exemplarily shows several sections and introduction descriptions thereof:
section introduction description
PBXFileReference Path, type of each file, each file having a unique ID
PBXBuildFile Compiling parameters of respective files
PBXGroup Grouping of files, i.e. left-hand grouping of files in Xcode engineering
PBXNativeTarget Generating a target type: applications or dynamic libraries
PBXProject Root node of Xcode engineering, including provision and other data
XCBuildConfiguration Global compilation parameters for Xcode engineering
PBXBuildPhase series Organization (built) configuration of files of various types
TABLE-1
In the embodiment of the application, the engineering file of the Xcode engineering is modified, the code in the first Target is moved into the second Target, the type of the first Target is an application program, the type of the second Target is a dynamic library, and when the follow-up apple company carries out compliance check, only the size of the code segment in the application program set generated by compiling and packaging based on the first Target is subjected to compliance check, and the size of the code segment in the dynamic library generated by compiling and packaging based on the second Target is not subjected to compliance check, so that the restriction requirement of the apple company on the size of the code segment is met. In addition, the code files corresponding to partial codes in the first Target are stolen into the second Target, and the code files corresponding to a part of codes are properly reserved in the first Target, but not all codes in the first Target are stolen into the second Target, so that the normal operation of the Target iOS application program is ensured, for example, a main function (namely a main function) of the Target iOS application program is reserved in the first Target, and other codes except the main function are stolen into the second Target. It should be noted that the size of the code segment of the code reserved in the first Target after compiling should be smaller than a preset threshold to meet the limit requirement of the apple company, and the preset threshold may be determined according to the limit requirement of the apple company.
Optionally, the target content further includes at least one of the following in addition to the code file: some or all resource files, some or all library files. Because the code files corresponding to partial codes in the first Target are moved into the second Target, the resource files and library files related to the partial code files can be moved into the second Target together, so that the situation that contents with correlation relations are placed in different targets to cause the need of maintaining extra dependency and reference relations is avoided, and the organization structure in the engineering files of the Xcode engineering is simplified.
As shown in fig. 5, a schematic diagram of the Xcode engineering before and after modification is exemplarily shown. The left part of fig. 5 shows a schematic diagram of the original Xcode engineering, and on the basis of the original Xcode engineering, a new Target is created, such as Target 50 named unitigamedynalib, which is shown in the right part of fig. 5, and the type of Target 50 named unitigamedynalib is a dynamic library.
Referring to fig. 6 and 7 in combination, an architectural diagram of the content in the project file of an Xcode project before and after modification is exemplarily shown. FIG. 6 shows an architectural diagram of the content in the project file of the original Xcode project, which includes an App Target with files of code, resources, libraries, etc. of the Target iOS application configured in its BuildPhases attribute. Fig. 7 shows an architecture diagram of the content in the engineering file of the modified Xcode engineering, which adds a Library Target to the original Xcode engineering, modifies the BuildPhases attribute of the App Target and the BuildPhases attribute of the Library Target, and moves the Target content (including part of the code file and optionally part or all of the resource file and part or all of the Library file) in the App Target into the Library Target. In addition, the BuildConfigurationList attribute shown in fig. 6 and 7 contains a relevant configuration for compiling the content in Target.
The number of second targets may be 1 or more. When the number of the second targets is 1, the structure of the whole Xcode engineering is simpler. Of course, a plurality of second targets may also be created, if necessary.
In one example, assuming that the number of the second targets is n, when n is greater than 1, the Target content may be split into n pieces of content, and then the n pieces of content are respectively added to n second targets, each of which adds one of the n pieces of content. For example, 2 second targets are created in the Xcode engineering, and then a part of the Target content in the first Target is stolen into one second Target, and another part of the Target content in the first Target is stolen into another second Target.
Step 404, compiling and packaging the Xcode project, and generating an installation package of the Target iOS application program, wherein the installation package comprises an application program set corresponding to the first Target and a dynamic library corresponding to the second Target.
Optionally, the Xcode engineering is compiled and packaged by using the XcodeBuild, and an installation package corresponding to the Target iOS application is generated, where the installation package is an ipa (iphone application) file, and the ipa file is a compressed package, and includes an application set generated by compiling and packaging the content in the first Target and a dynamic library generated by compiling and packaging the content in the second Target.
Optionally, the following step is further included after the step 403: and compressing the content in the second Target. For example, useless contents including useless code files, useless resource files, useless library files, and the like in the second Target may be deleted, or the resource files may be compressed. Through the mode, the size of the whole installation package can be reduced.
To sum up, in the technical solution provided in the embodiment of the present application, a second Target with a type of a dynamic library is created in an Xcode project corresponding to an iOS application, then some codes in the first Target with the original type of the application are moved from the first Target to the second Target, and finally the Xcode project is compiled and packaged to generate an installation package of a Target iOS application, where the installation package includes an application set corresponding to the first Target and a dynamic library corresponding to the second Target. Thus, when the installation package of the target iOS application is submitted to the apple application store, the size of the code segments in the application set will not exceed the restriction requirement, since apple will only perform compliance checks on the size of the code segments in the application set, and most of the code segments in the application set have been moved into the dynamic library. According to the technical scheme, code segments do not need to be deleted, the integrity of the functions of the application program is ensured, bottlenecks cannot occur, any iOS application program developed on the basis of Unity can be subjected to the technical scheme so as to avoid the limiting requirements on the code segments, and the scheme is good in universality.
In one example, taking the generation of a game application under an iOS platform as an example, the game application is first developed through a Unity engine, including writing a code of the game application, and adding corresponding resource files and library files; then exporting the Unity project of the game application program as an Xcode project, wherein the Xcode project comprises a Target (called App Target) with the type of the application program; then, the engineering file of the Xcode engineering is analyzed and customized and modified, a Target (called as Library Target) with a type of dynamic Library is created in the Xcode engineering, and Target contents (such as code files except the main function, resource files except the resource file related to the main function and Library files except the Library file related to the main function) in the App Target are moved to the Library Target; and finally, compiling and packaging the Xcode project to generate an installation package of the game application program, wherein the installation package comprises an application program set corresponding to the App Target and a dynamic Library corresponding to the Library Target. Illustratively, after the above processing, the size of the code segment in the application set is only 30 kbytes, which is far smaller than the limit requirement of apple corporation.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Referring to fig. 8, a block diagram of an iOS application generation apparatus according to an embodiment of the present application is shown. The device has the functions of realizing the method examples, and the functions can be realized by hardware or by hardware executing corresponding software. The device may be the computer device described above, or may be provided on a computer device. The apparatus 800 may include: a project creation module 810, a target creation module 820, a content transfer module 830, and a compile package module 840.
The project creating module 810 is configured to create a project corresponding to the target iOS application, where the project includes a first compiled target of which the type is an application.
An object creation module 820 for creating a second compiled object of type dynamic library in the project.
A content transferring module 830, configured to steal the target content in the first compiled target from the first compiled target to the second compiled target, where the target content is a file set including a code file.
And a compiling and packaging module 840, configured to compile and package the project, and generate an installation package of the target iOS application, where the installation package includes an application set corresponding to the first compiled target and a dynamic library corresponding to the second compiled target.
To sum up, in the technical solution provided in this embodiment of the present application, a second compiled object of which the type is a dynamic library is created in a project corresponding to an iOS application, then target content in a first compiled object of which the original type is an application is moved from the first compiled object to the second compiled object, and finally the project is compiled and packaged to generate an installation package of the target iOS application, where the installation package includes an application set corresponding to the first compiled object and a dynamic library corresponding to the second compiled object. Thus, when the installation package of the target iOS application is submitted to the apple application store, the size of the code segments in the application set will not exceed the restriction requirement, since apple will only perform compliance checks on the size of the code segments in the application set, and most of the code segments in the application set have been moved into the dynamic library. According to the technical scheme, the code segments do not need to be deleted, the integrity of the functions of the application program is ensured, the bottleneck can not occur, the technical scheme can be adopted for any iOS application program to avoid the limitation requirement on the code segments, and the universality of the scheme is good.
In an alternative embodiment provided based on the embodiment of figure 8,
the target content comprises a code file; alternatively, the first and second electrodes may be,
the target content comprises a code file and a resource file; alternatively, the first and second electrodes may be,
the target content comprises a code file and a library file; alternatively, the first and second electrodes may be,
the target content includes a code file, a resource file, and a library file.
In another optional embodiment provided based on the embodiment of fig. 8 or any one of the optional embodiments above, the content transfer module 830 is configured to: analyzing the project file of the project; modifying the project file, deleting the target content in the first compiled object from the first compiled object, and adding the target content to the second compiled object.
In another optional embodiment provided based on the embodiment of fig. 8 or any one of the optional embodiments described above, the number of the second compiled targets is n, and n is a positive integer.
In another optional embodiment provided based on the embodiment of fig. 8 or any one of the optional embodiments above, the project creation module 810 is configured to: creating a Unity project corresponding to the target iOS application program; and exporting the Unity project as an Xcode project.
In another optional embodiment provided based on the embodiment of fig. 8 or any one of the optional embodiments above, the apparatus 800 further includes: a compression processing module (not shown in the figure).
And the compression processing module is used for compressing the content in the second compiling target.
It should be noted that, when the apparatus provided in the foregoing embodiment implements the functions thereof, only the division of the functional modules is illustrated, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the apparatus may be divided into different functional modules to implement all or part of the functions described above. In addition, the apparatus and method embodiments provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments for details, which are not described herein again.
Referring to fig. 9, a block diagram of a computer device according to an embodiment of the present application is shown. The computer device may be used to implement the generation method of the iOS application provided in the above-described embodiments. Specifically, the method comprises the following steps:
the computer device 900 includes a Central Processing Unit (CPU)901, a system memory 904 including a Random Access Memory (RAM)902 and a Read Only Memory (ROM)903, and a system bus 905 connecting the system memory 904 and the central processing unit 901. The computer device 900 also includes a basic input/output system (I/O system) 906 for facilitating information transfer between devices within the computer, and a mass storage device 907 for storing an operating system 913, application programs 914, and other program modules 915.
The basic input/output system 906 includes a display 908 for displaying information and an input device 909 such as a mouse, keyboard, etc. for user input of information. Wherein the display 908 and the input device 909 are connected to the central processing unit 901 through an input output controller 910 connected to the system bus 905. The basic input/output system 906 may also include an input/output controller 910 for receiving and processing input from a number of other devices, such as a keyboard, mouse, or electronic stylus. Similarly, input-output controller 910 also provides output to a display screen, a printer, or other type of output device.
The mass storage device 907 is connected to the central processing unit 901 through a mass storage controller (not shown) connected to the system bus 905. The mass storage device 907 and its associated computer-readable media provide non-volatile storage for the computer device 900. That is, the mass storage device 907 may include a computer-readable medium (not shown) such as a hard disk or CD-ROM drive.
Without loss of generality, the computer-readable media may comprise computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes RAM, ROM, EPROM, EEPROM, flash memory or other solid state memory technology, CD-ROM, DVD, or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that the computer storage media is not limited to the foregoing. The system memory 904 and mass storage device 907 described above may be collectively referred to as memory.
According to various embodiments of the present application, the computer device 900 may also operate as a remote computer connected to a network via a network, such as the Internet. That is, the computer device 900 may be connected to the network 912 through the network interface unit 911 coupled to the system bus 905, or the network interface unit 911 may be used to connect to other types of networks or remote computer systems (not shown).
The memory has stored therein at least one instruction, at least one program, a set of codes, or a set of instructions. The at least one instruction, at least one program, set of code, or set of instructions is configured to be executed by one or more processors to implement the generation method of the iOS application provided by the above-described embodiments.
In an exemplary embodiment, there is also provided a computer-readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions which, when executed by a processor of a computer device, implements the method of generating an iOS application provided by the above-described embodiments. Alternatively, the computer-readable storage medium may be a ROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, there is also provided a computer program product for implementing the method for generating an iOS application provided in the above-described embodiments when the computer program product is executed.
It should be understood that reference to "a plurality" herein means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. In addition, the step numbers described herein only exemplarily show one possible execution sequence among the steps, and in some other embodiments, the steps may also be executed out of the numbering sequence, for example, two steps with different numbers are executed simultaneously, or two steps with different numbers are executed in a reverse order to the order shown in the figure, which is not limited by the embodiment of the present application.
It will be understood by those skilled in the art that all or part of the steps of implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only exemplary of the present application and is not intended to limit the present application, and any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (10)

1. A method of generating an iOS application, the method comprising:
creating a project corresponding to a target iOS application program, wherein the project comprises a first compiling target with the type of the application program;
creating a second compiling target with the type of a dynamic library in the engineering;
analyzing the project file of the project;
modifying the engineering file, deleting the target content in the first compiling target from the first compiling target, and adding the target content into the second compiling target, wherein the target content is a file set containing code files;
and compiling and packaging the project to generate an installation package of the target iOS application program, wherein the installation package comprises an application program set corresponding to the first compiled target and a dynamic library corresponding to the second compiled target.
2. The method of claim 1,
the target content comprises the code file; alternatively, the first and second electrodes may be,
the target content comprises the code file and a resource file; alternatively, the first and second electrodes may be,
the target content comprises the code file and a library file; alternatively, the first and second electrodes may be,
the target content includes the code file, the resource file, and the library file.
3. The method of claim 1, wherein the number of second compiled targets is n, and wherein n is a positive integer.
4. The method of claim 3, wherein said adding said target content to said second compiled target comprises:
when n is larger than 1, splitting the target content into n pieces of content;
and adding the n parts of contents into n second compiling targets respectively, wherein each second compiling target is added with one part of the n parts of contents.
5. The method of claim 1, wherein creating a project for the target iOS application comprises:
creating a Unity project corresponding to the target iOS application program;
and exporting the Unity project as an Xcode project.
6. The method of any of claims 1-5, wherein after stealing target content in the first compiled target from the first compiled target to the second compiled target, further comprising:
and compressing the content in the second compiling target.
7. An iOS application generation apparatus, characterized in that the apparatus comprises:
the system comprises a project creating module, a first compiling module and a second compiling module, wherein the project creating module is used for creating a project corresponding to a target iOS application program, and the project comprises a first compiling target with the type of the application program;
the object creating module is used for creating a second compiling object with the type of a dynamic library in the project;
the content transfer module is used for analyzing the project file of the project; modifying the engineering file, deleting the target content in the first compiling target from the first compiling target, and adding the target content into the second compiling target, wherein the target content is a file set containing code files;
and the compiling and packaging module is used for compiling and packaging the project to generate an installation package of the target iOS application program, wherein the installation package comprises an application program set corresponding to the first compiling target and a dynamic library corresponding to the second compiling target.
8. The apparatus of claim 7,
the target content comprises the code file; alternatively, the first and second electrodes may be,
the target content comprises the code file and a resource file; alternatively, the first and second electrodes may be,
the target content comprises the code file and a library file; alternatively, the first and second electrodes may be,
the target content includes the code file, the resource file, and the library file.
9. A computer device comprising a processor and a memory, the memory having stored therein at least one instruction, at least one program, set of codes, or set of instructions, which is loaded and executed by the processor to implement the method of any one of claims 1 to 6.
10. A computer readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by a processor to implement the method according to any one of claims 1 to 6.
CN201811325722.9A 2018-11-08 2018-11-08 iOS application program generation method, device, equipment and storage medium Active CN109491664B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811325722.9A CN109491664B (en) 2018-11-08 2018-11-08 iOS application program generation method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811325722.9A CN109491664B (en) 2018-11-08 2018-11-08 iOS application program generation method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109491664A CN109491664A (en) 2019-03-19
CN109491664B true CN109491664B (en) 2021-03-26

Family

ID=65695340

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811325722.9A Active CN109491664B (en) 2018-11-08 2018-11-08 iOS application program generation method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109491664B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110377290B (en) * 2019-07-22 2023-04-25 创新先进技术有限公司 Method, device and equipment for compiling target engineering
CN112052007A (en) * 2020-09-07 2020-12-08 北京达佳互联信息技术有限公司 Source code debugging method, device, server and storage medium
CN113127000A (en) * 2021-04-23 2021-07-16 北京字节跳动网络技术有限公司 Compiling method, device and equipment of application program assembly and storage medium
CN115658140A (en) * 2022-12-26 2023-01-31 易方信息科技股份有限公司 SDK packaging method, device, terminal and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103955375A (en) * 2014-05-21 2014-07-30 北京安兔兔科技有限公司 Generation method for application installation file and starting method and device for application
CN104714788A (en) * 2013-12-12 2015-06-17 腾讯科技(深圳)有限公司 Method and device for automatically generating software installation package

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101187899B (en) * 2006-11-17 2010-05-12 中兴通讯股份有限公司 Embedded type system storage space optimization method
CN101763269A (en) * 2010-01-27 2010-06-30 中兴通讯股份有限公司 Method for making software installation package
CN103970516B (en) * 2013-01-30 2015-10-07 腾讯科技(深圳)有限公司 Redundancy image deletion method and device
CN106126290B (en) * 2016-06-27 2019-08-13 微梦创科网络科技(中国)有限公司 Application program optimization method, apparatus and system
CN107368536A (en) * 2017-06-22 2017-11-21 深圳市金立通信设备有限公司 The optimization method and terminal of a kind of installation kit

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104714788A (en) * 2013-12-12 2015-06-17 腾讯科技(深圳)有限公司 Method and device for automatically generating software installation package
CN103955375A (en) * 2014-05-21 2014-07-30 北京安兔兔科技有限公司 Generation method for application installation file and starting method and device for application

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
iOS安装包瘦身(下篇);饶梦云;《https://sq.163yun.com/blog/article/200384401846304768》;20180918;第1-6页 *

Also Published As

Publication number Publication date
CN109491664A (en) 2019-03-19

Similar Documents

Publication Publication Date Title
CN109491664B (en) iOS application program generation method, device, equipment and storage medium
US8627303B2 (en) Memory optimization of virtual machine code by partitioning extraneous information
US20200249925A1 (en) On-demand loading of dynamic scripting language code for reduced memory usage
US20110161944A1 (en) Method and apparatus for transforming program code
US10101980B2 (en) Compilation method and information processing apparatus
US20110314459A1 (en) Compiler with user-defined type inference rules
CN111367510A (en) Android function module development method and device
CN111198868A (en) Intelligent sub-database real-time data migration method and device
US11733983B2 (en) Method and apparatus for generating metadata by a compiler
US9116714B2 (en) Methods and systems for file processing
US20230004365A1 (en) Multistage compiler architecture
CN111124872A (en) Branch detection method and device based on difference code analysis and storage medium
WO2015003452A1 (en) Methods and systems for file processing
CN111078279A (en) Processing method, device and equipment of byte code file and storage medium
CN111949312B (en) Packaging method and device for data module, computer equipment and storage medium
CN111352631B (en) Interface compatibility detection method and device
CN111352644A (en) Applet updating method, device, server and storage medium
CN116560621A (en) Baseboard management controller chip adapting method, system, equipment and medium
CN114168151A (en) Container-based program compiling method and device, electronic equipment and storage medium
CN111400396A (en) Method and device for generating data synchronization script and computer readable storage medium
US20240152387A1 (en) Method, apparatus, electronic device and storage medium for application launch
CN111367512A (en) Method and device for creating Android library module dependency relationship in application development
WO2020259020A1 (en) Instruction block processing method and apparatus, storage medium, and electronic device
JP7393404B2 (en) Compiling method, compiling device, electronic device, storage medium and program
CN112558944B (en) App generation method and device, processing equipment and computer readable storage medium

Legal Events

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