CN112558944A - App generation method and device, processing equipment and computer readable storage medium - Google Patents

App generation method and device, processing equipment and computer readable storage medium Download PDF

Info

Publication number
CN112558944A
CN112558944A CN202110214827.2A CN202110214827A CN112558944A CN 112558944 A CN112558944 A CN 112558944A CN 202110214827 A CN202110214827 A CN 202110214827A CN 112558944 A CN112558944 A CN 112558944A
Authority
CN
China
Prior art keywords
target
xcastes
compiling
app
script
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.)
Granted
Application number
CN202110214827.2A
Other languages
Chinese (zh)
Other versions
CN112558944B (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.)
Wuhan Mucang Technology Co ltd
Original Assignee
Wuhan Mucang Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Mucang Information Technology Co ltd filed Critical Wuhan Mucang Information Technology Co ltd
Priority to CN202110214827.2A priority Critical patent/CN112558944B/en
Publication of CN112558944A publication Critical patent/CN112558944A/en
Application granted granted Critical
Publication of CN112558944B publication Critical patent/CN112558944B/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/20Software design
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Abstract

The application provides an app generation method, an app generation device, processing equipment and a computer-readable storage medium, which are used for improving the compiling efficiency in the app generation process to a certain extent, so that the app generation efficiency is improved. The application provides an app generation method, which comprises the following steps: the processing equipment determines a target in the xcode; integrating initial xcastes of the target by the processing equipment in a pod form, and reserving app desktop icons in the initial xcastes to obtain the target xcastes, wherein the initial xcastes are resources managed by asset catalog; the processing equipment compiles and processes the code resources configured by the coco codes and the target xcassets through the scripts configured by the coco codes; and the processing equipment packages and generates the app corresponding to the target according to the compiling result.

Description

App generation method and device, processing equipment and computer readable storage medium
Technical Field
The application relates to the field of applications, in particular to an app generation method, an app generation device, processing equipment and a computer-readable storage medium.
Background
In the development process of an Application (APP), compiling processing is involved, source files such as codes are compiled, and the source files can be packaged to obtain an installation package of the APP.
While the compilation process is generally adapted according to the operating system of the app, some adaptations may be adapted according to files such as different operating systems, functions of the app, and the code behind the app, for example, in ios and android operating systems, the same application function is realized for the application user to perceive, but the code behind the application function is also different.
In the research process of the related art, the inventor finds that when the app is compiled for the ios operating system, the compiling efficiency is slow, and in the development process of the app, the app needs to be adjusted and corrected for a plurality of times, which means that a plurality of times of compiling processing are involved.
Disclosure of Invention
The application provides an app generation method, an app generation device, processing equipment and a computer-readable storage medium, which are used for improving the compiling efficiency in the app generation process to a certain extent, so that the app generation efficiency is improved.
In a first aspect, the present application provides an app generating method, including:
the processing equipment determines a target in the xcode;
integrating initial xcastes of the target by the processing equipment in a pod form, and reserving app desktop icons in the initial xcastes to obtain the target xcastes, wherein the initial xcastes are resources managed by asset catalog;
the processing equipment compiles and processes the code resources configured by the coco codes and the target xcassets through the scripts configured by the coco codes;
and the processing equipment packages and generates the app corresponding to the target according to the compiling result.
With reference to the first aspect of the present application, in a first possible implementation manner of the first aspect of the present application, the integrating, by a processing device, initial xcessets of a target in pod form includes:
the processing equipment integrates initial xcastes of a target in a pod form through a custom plug-in configured by coco objects, and generates a script and a buildphase after the integration is completed, wherein the custom plug-in is declared in a podfile;
the processing device compiles the code resource blocks configured by the coco codes and the target xcassets through the script configured by the coco codes, and the compiling processing comprises the following steps:
the processing device separates the code resources and xcastes resources configured by the coco-adods through the script and the buildphase, and compiles the resources, wherein the code resources comprise xib resources and storyboard resources.
With reference to the first possible implementation manner of the first aspect of the present application, in a second possible implementation manner of the first aspect of the present application, the generating and processing of the script corresponding to the target xcastes and the first build hash includes:
the processing equipment acquires a first path of the target xcastes, wherein the first path comprises paths of different xcastes under different configurations in the target xcastes;
recording the first path into a first file by the processing equipment, wherein the first file is used for determining an xcastes path managed by coco objects;
the processing equipment generates a script for dynamically acquiring the xcastes, wherein the script for dynamically acquiring the xcastes is used for acquiring all xcastes paths in the current target by using xcodeproxoj during compiling;
the processing equipment generates a first target compiling script, wherein the first target compiling script is used for compiling target xcastes;
the processing device adds the first target compilation script to the first buildphase through the xcodeprox.
With reference to the second possible implementation manner of the first aspect of the present application, in a third possible implementation manner of the first aspect of the present application, the first build hash is further configured with:
recording a first modification time of first xcasts participating in compilation and caching the first xcasts as assets.car;
when compiling next time, determining second xcessets participating in compiling, and comparing the first modification time with the second modification time of the second xcessets;
car to app compiled product directory if consistent.
With reference to the first possible implementation manner of the first aspect of the present application, in a fourth possible implementation manner of the first aspect of the present application, the generating and processing of the script corresponding to the code resource and the second build hash includes:
the processing equipment acquires a second path of the xib resource and the storyboard resource;
recording the second path into a second file by the processing equipment, wherein the second file is used for determining an xib resource path and a storyboard resource path managed by the coco-codes;
the processing equipment generates a second target compiling script, wherein the second target compiling script is used for compiling the xib resource and the storyboard resource in parallel;
and the processing equipment adds the second target compiling script to the second buildphase through the xcodeprox and sets corresponding inputpath and outputpath.
With reference to the first possible implementation manner of the first aspect of the present application, in a fifth possible implementation manner of the first aspect of the present application, the method further includes:
the processing device removes the resources related to the script in the original build dhase of the coco objects, and adjusts the corresponding inputpath and outputpath.
With reference to the first possible implementation manner of the first aspect of the present application, in a sixth possible implementation manner of the first aspect of the present application, in the build hash, the ordering of the build hash corresponding to the target xcastees is after copy bundle resource.
In a second aspect, the present application provides an app generating apparatus, comprising:
a determining unit, configured to determine a target in the xcode;
the integration unit is used for integrating the initial xcastes of the target in a pod form, and reserving the app desktop icons in the initial xcastes to obtain the target xcastes, wherein the initial xcastes are resources managed by asset catalog;
the compiling unit is used for compiling the code resources configured by the coco codes and the target xcastes through the scripts configured by the coco codes;
and the packaging unit is used for packaging and generating the app corresponding to the target according to the compiling result.
With reference to the second aspect of the present application, in a first possible implementation manner of the second aspect of the present application, the integration unit is specifically configured to:
integrating initial xcessets of the target in a pod form through a custom plug-in configured by coco objects;
the device also comprises a generating unit, a generating unit and a setting unit, wherein the generating unit is used for generating a script and a buildphase after the integration is completed, and the custom plug-in is declared in the podfile;
a compiling unit, specifically configured to:
separating the code resources and the xcastes resources configured by the coco-audio through the script and the buildphase, and compiling the resources, wherein the code resources comprise the xib resources and the storyboard resources.
With reference to the first possible implementation manner of the second aspect of the present application, in a second possible implementation manner of the second aspect of the present application, the generating unit is specifically configured to execute a script corresponding to the target xcastes and a generation process of the first buildphase, and includes:
acquiring a first path of target xcasts, wherein the first path comprises paths of different xcasts in the target xcasts under different configurations;
recording the first path into a first file, wherein the first file is used for determining an xcastes path managed by coco objects;
generating a script for dynamically acquiring xcastes, wherein the script for dynamically acquiring xcastes is used for acquiring all xcastes paths in the current target by using xcodeprox during compiling;
generating a first target compiling script, wherein the first target compiling script is used for compiling target xcastes;
adding the first target compiling script to the first buildphase through the xcodeprox.
With reference to the second possible implementation manner of the second aspect of the present application, in a third possible implementation manner of the second aspect of the present application, the first build hash is further configured with:
recording a first modification time of first xcasts participating in compilation and caching the first xcasts as assets.car;
when compiling next time, determining second xcessets participating in compiling, and comparing the first modification time with the second modification time of the second xcessets;
car to app compiled product directory if consistent.
With reference to the first possible implementation manner of the second aspect of the present application, in a fourth possible implementation manner of the second aspect of the present application, the generating unit is specifically configured to execute a script corresponding to a code resource and a second build hash generating process, and the generating process includes:
acquiring a second path of the xib resource and the storyboard resource;
recording the second path into a second file, wherein the second file is used for determining an xib resource path and a storyboard resource path managed by coco codes;
generating a second target compiling script, wherein the second target compiling script is used for compiling the xib resource and the storyboard resource in parallel;
and adding the second target compiling script to the second buildphase through the xcodeprox, and setting corresponding inputpath and outputpath.
With reference to the first possible implementation manner of the second aspect of the present application, in a fifth possible implementation manner of the second aspect of the present application, the apparatus further includes a removing unit, configured to:
in the original build hashes of coco apods, the resources related to the script are removed, and the corresponding inputpath and outputpath are adjusted.
With reference to the first possible implementation manner of the second aspect of the present application, in a sixth possible implementation manner of the second aspect of the present application, in the buildphase, the sequence of the buildphase corresponding to the target xcastes is after copy bundle resource.
In a third aspect, the present application provides a processing device, including a processor and a memory, where the memory stores a computer program, and the processor executes the method provided in the first aspect of the present application or any one of the possible implementation manners of the first aspect of the present application when calling the computer program in the memory.
In a fourth aspect, the present application provides a computer-readable storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the method provided in the first aspect of the present application or any one of the possible implementations of the first aspect of the present application.
From the above, the present application has the following advantageous effects:
aiming at the generation processing of the app of the ios operating system, the target corresponding to the app is determined in the xcode, then the initial xcessets of the target are integrated in the pod form, and the app desktop icons in the initial xcastes are reserved to obtain target xcastes, and then scripts configured by coco-ods, compiling the code resources configured by the coco objects and the target xcastes, so as to generate the app corresponding to the target by packaging according to the compiling result, in the compilation process involved, since the initial xcastes are integrated in pod form, when scripts configured as such coco objects compile integrated target xcastes as well as code resources, can reduce the situations that coco objects uniformly process xcastes and code resources, and repeatedly compile xcastes and code resources in the prior art to a certain extent, obviously reduce the resources of repeated compiling processing, therefore, the time consumption of compiling processing is reduced, and the compiling efficiency in the app generating process is improved, so that the app generating efficiency is improved.
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 schematic flowchart of an app generation method according to the present application;
FIG. 2 is a flow chart illustrating incremental compilation of the present application;
FIG. 3 is a schematic structural diagram of an app generation apparatus according to the present application;
FIG. 4 is a schematic diagram of a processing apparatus according to the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," and the like in the description and in the claims of the present application and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Moreover, the terms "comprises," "comprising," and any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or modules is not necessarily limited to those steps or modules explicitly listed, but may include other steps or modules not expressly listed or inherent to such process, method, article, or apparatus. The naming or numbering of the steps appearing in the present application does not mean that the steps in the method flow have to be executed in the chronological/logical order indicated by the naming or numbering, and the named or numbered process steps may be executed in a modified order depending on the technical purpose to be achieved, as long as the same or similar technical effects are achieved.
The division of the modules presented in this application is a logical division, and in practical applications, there may be another division, for example, multiple modules may be combined or integrated into another system, or some features may be omitted, or not executed, and in addition, the shown or discussed coupling or direct coupling or communication connection between each other may be through some interfaces, and the indirect coupling or communication connection between the modules may be in an electrical or other similar form, which is not limited in this application. The modules or sub-modules described as separate components may or may not be physically separated, may or may not be physical modules, or may be distributed in a plurality of circuit modules, and some or all of the modules may be selected according to actual needs to achieve the purpose of the present disclosure.
Before describing the app generation method provided by the present application, the background related to the present application will be described first.
The app generation method, the app generation device and the computer-readable storage medium can be applied to processing equipment and are used for improving the compiling efficiency in the app generation process to a certain extent, so that the app generation efficiency is improved.
In the app generating method, an execution subject may be an app generating apparatus, or different types of processing devices such as a server, a physical host, or a User Equipment (UE) integrated with the app generating apparatus. The app generation device may be implemented in a hardware or software manner, the UE may specifically be a terminal device such as a smart phone, a tablet computer, a notebook computer, a desktop computer, or a Personal Digital Assistant (PDA), and the processing device may be set in a device cluster manner.
Next, the app generation method provided by the present application is described.
First, referring to fig. 1, fig. 1 shows a schematic flow diagram of an app generating method according to the present application, where the app generating method provided by the present application may specifically include the following steps:
step S101, the processing equipment determines a target in the xcode;
step S102, integrating initial xcastes of the target by the processing device in a pod form, and reserving app desktop icons in the initial xcastes to obtain a target xcastes text, wherein the initial xcastes are resources managed by asset catalog;
step S103, the processing equipment compiles the code resources configured by the coco codes and the target xcastes through the scripts configured by the coco codes;
and step S104, the processing equipment packages and generates the app corresponding to the target according to the compiling result.
As can be seen from the embodiment shown in fig. 1, for the generation processing of apps of an ios operating system, in the present application, a target corresponding to an app is determined in an xcode, then initial xcesses of the target are integrated in a pod form, and app desktop icons in the initial xcesses are retained to obtain target xcesses, and then a script configured by the coco-ads is used to compile the code resources configured by the coco-ads and the target xcesses, so that the apps corresponding to the target are generated by packaging according to the compilation result, in the related compilation processing, since the initial xcesses are integrated in the pod form, when the script configured by the coco compiles the integrated target xcesses and code resources, time consumption for the coco-ads to uniformly process the xcesses and the code resources, and the code resources to be compiled repeatedly can be reduced to a certain extent, resources for the repeated compilation processing can be significantly reduced, so that resources for the generation processing of apps in the generation processing can be improved, and the compilation efficiency in the compilation process, thereby improving the generation efficiency of apps.
The steps of the embodiment shown in fig. 1 and the possible implementation manner thereof in practical applications are described in detail below.
First, it can be understood that the app generation method is proposed for an ios operating system, an ios platform, or an ios application environment, where an app that is desired to be generated is executed in the ios operating system, and similarly, a generation item of the app is executed for the ios operating system.
The generation item of the app is implemented in the development environment of ios in the present application, for example, xcode, and the following description briefly describes related components or programs related to the development environment of ios in the following of the present application.
cocoapods: an open source package management tool for module integration;
pod: the code package managed by coco apods is called pod;
podfile: description files used when integrating the pod, may declare plug-ins, and the pod to be integrated;
and (2) xcode: a code editor used by ios development;
asset catalog: a way to manage picture resources in ios development;
xcastes: assets catalog managed files are stored in files (directories) suffixed with xcasts, such as image.
Car: compilation products of asset catalog;
xib, storyboard: interface resources in the ios development can be graphically edited;
nib, storyboardc: the corresponding compiled products of xib and storyboard;
buildphase: the abstract compiling stage in the xcode can be modified in the xcode and executed during compiling, belongs to a configurable part of an xcode engineering file, is used for specifying a compiling task, and can perform additional data processing in the compiling process by adding a custom buildephase;
inputpath, outputpath: setting in the buildPhase, determining a dependency relationship between buildphases, and controlling whether the buildPhase to which the buildPhase belongs needs to be compiled or not, or whether the path to which the buildPhase belongs is changed or not, wherein the xcode can determine whether to execute script contents in the custom buildPhase or not through whether the configured path is changed or not;
actool: tools used for compiling asset catalog, provided by apple Inc.;
ibtool: tools for compiling xib, storyboard, available from apple Inc.;
xcodeprox: a tool for modifying ios engineering files, the engineering files being represented by xcodeprox for distinction from the engineering files;
target: and integrating the targets.
It can be seen that the app generation method provided by the present application is implemented based on the component, program or tool related to the xcode, and at the same time, it should be understood that the method is essentially an adjustment performed on the working manner of the component, program or tool according to the application principle of the component, program or tool, in combination with the actual requirements, and the content of the adjustment is not the original working form of the component, program or tool, and therefore, the technical scheme involved in the method cannot be simply regarded as the original application scheme of the component, program or tool, and in the application environment formed by the component, program or tool, the component, program or tool can be better utilized by the method, and the compiling process can be completed faster, so that the app generation efficiency is improved.
Starting from the development requirement of the app, when a development company has a development requirement of some app, for example, initial establishment of the app or update of the app, the target project of this time may be determined, in the xcode, the project may serve as a target, and relevant configuration files of the project of this time are prepared, for example, initial code and resource files are provided by staff, and the configuration files may be configured into the xcode and trigger the app generation method of the application.
Generally, for ios projects, code is generally managed by coco, and there may be resources other than code within each code resource (or also called code module, code file, etc.), the processing of the resources in these modules is determined by the scripts generated by the coco when integrating the modules, and the compilation of code resources and xcassets is also performed by the coco.
In the prior art, because the resources of the integrated target and each integrated module are all processed by coco objects in a unified manner, because the xcastes of the integrated target itself should be processed once in the compiling process, that is, the part of resources will be processed twice, the problem that the more the resources are, the more the time is consumed occurs.
In view of the problem, the application proposes that the corresponding code resources of xcastes of the target are integrated by pod, and only app desktop icons are reserved, especially only app desktop icons which are considered to be necessary to be reserved are reserved, so that under the setting, when cocoapods are compiled, resources repeatedly processed by scripts of xcode and cocoapods can be obviously reduced, even the resources are reduced to the minimum, and the effect of reducing the processing resources and reducing time consumption is achieved.
Furthermore, it has been found that the time required for the compilation process can be reduced further during the application process.
As an implementation manner suitable for application, the compiling process performed by the coco modules and the script called by the coco modules may specifically be implemented by a custom plug-in configured by the coco modules, and it can be understood that the coco modules may open a plug-in entry to a worker, and the worker configures the relevant custom plug-in to implement the work control of the customized coco modules.
Thus, in the present application, the processing device integrates the initial xcastes of the target in the pod form, and may specifically generate a script related to coco applications and buildphase through a custom plug-in configured by the coco applications after the integration, where the custom plug-in may specifically be declared (or described) in the podfile.
Specifically, coco apps write xib and xcastes in the component (or called library) managed by the coco apps into a shell script and add the xib and xcastes to buildphase, in which case the plug-in can add and modify the shell script and buildphase generated by the plug-in.
In addition, the present application further provides another optimized implementation scheme, that is, a resource separation policy is added to the above-mentioned custom plug-in, so that, when performing compilation processing, the cocoaps can separate resources in both code resources configured by the cocoaps and target xcastes, and perform compilation processing on the resources, which can reduce processing scale, avoid the situation that compilation processing is repeatedly performed before the resources are not separated, and improve compilation efficiency.
Wherein, the code resource comprises xib resource and storyboard resource.
Specifically, the resource separation strategy can be realized in a script splitting manner, and compared with different types of resources in the prior art, for example, xcessets and xib are processed in the same script, if one picture in the xcessets needs to be modified, the situation that more than 1000 xib need to be recompiled may occur.
Illustratively, as an embodiment of a separation policy, the resource separation processing in the present application may be implemented by buildphase, and the builphase partition may be specifically performed corresponding to code resources and xcassets.
First, the generation processing of the script and the buildphase corresponding to the target xcasts may include:
the processing device acquires paths of target xcastes, wherein the paths include paths of different xcastes under different configurations (which can be understood as configuration environments in xcode, such as debug and release) in the target xcastes;
recording the first path into a file by the processing equipment, wherein the file is used for determining an xcastes path managed by coco objects;
the processing equipment generates a script for dynamically acquiring the xcastes, wherein the script for dynamically acquiring the xcastes is used for acquiring all xcastes paths in the current target by using xcodeproxoj during compiling;
the processing equipment generates a target compiling script, wherein the target compiling script is used for compiling target xcastes;
the processing device adds the target compilation script to the buildphase through the xcodeprox.
Here, recorded in the script is xcastes paths (recorded in different configurations) included in components (libraries, pod) managed by the coco-ods.
In addition, aiming at the compilation of xcassets, the application also provides an incremental compilation scheme so as to improve the compilation efficiency again.
Referring to fig. 2, a flow chart of incremental compilation of the present application is shown, and regarding incremental compilation of xcastes, the method may include the following steps:
step S201, recording first modification time of first xcessets participating in compiling and caching the first xcessets as assets.car;
step S202, when compiling next time, determining second xcessets participating in compiling, comparing the first modification time with the second modification time of the second xcessets, and if the first modification time is consistent with the second modification time of the second xcessets, triggering step S203;
car to the compiled product directory of app, step S203.
It can be understood that, in practical applications, when multiple build hashes generate assets under the new build system, the incremental compilation of xcases by the xcode originally cannot work normally.
Specifically, scripts integrating targets and coco applications can generate the same compilation product, when a new build system behind xcode 10 detects that the situation is reported incorrectly during preprocessing, the compilation cannot be performed, a migration scheme suggested in advance by the coco applications is a resource build scheme provided by the coco applications, but the modification cost brought by the migration scheme is not low, and if the coco applications are not migrated to the resource build scheme, an outputpath declared by the buildphase where the coco applications scripts are located can be modified, so that the new build system is prevented from detecting repeated compilation products, but incremental compilation cannot be performed due to the mode, and the development efficiency is low.
For the adjacent xcassets, the proposed cache multiplexing mechanism of xcassets adds the target compilation script to the target xcassets related to buildphase when the xcassets is compiled, and if cached assets is not detected, cache processing and cache multiplexing are performed, obviously, detection of repetition of a compiled product can be avoided, so that implementation of incremental compilation can be promoted, and the compiling efficiency can be improved.
Corresponding to the code resource, the building process of build hash may include:
the processing equipment acquires paths of the xib resource and the storyboard resource;
recording the path into a file by the processing equipment, wherein the file is used for determining an xib resource path and a storyboard resource path managed by the cocoadods;
the processing equipment generates an object compiling script, wherein the object compiling script is used for compiling the xib resource and the storyboard resource in parallel;
and the processing equipment adds the target compiling script to buildphase through the xcodeprox and sets corresponding inputpath and outputpath.
It can be understood that, in the prior art, when the coco objects process resources such as the xib resource and the storyboard resource, the coco objects are compiled one by one in sequence, obviously, the serial execution mode cannot fully exert the performance of the machine, but the multi-process parallel execution mode introduced by the application is easy to understand, can fully utilize the performance of the machine, better realizes incremental compilation, and further improves the compiling efficiency.
Further, in practical application, for the original build dhase of the coco, the application may also remove the resource related to the script in the original build phase of the coco, and adjust the corresponding inputpath and outputpath.
Therefore, compared with the situation that any resource in the components is modified in the prior art, the resource processing scripts of the Cooapods are completely executed during compiling, and the development efficiency is slowed down when the resources are too many, all the resources of the corresponding types are recompiled only when the resources are modified.
For the above, the build hashes generated by the coco custom plug-ins for compiling target xcastes need to be executed after copy bundle resource, so as to be suitable for the application.
And after the compiling processing is finished, the compiling result can be packaged to generate the app.
The above is an introduction of the app generating method provided by the present application, and in order to better implement the app generating method provided by the present application, the present application also provides an app generating device.
Referring to fig. 3, fig. 3 is a schematic structural diagram of an app generating device according to the present application, in which the app generating device 300 specifically includes the following structure:
a determining unit 301, configured to determine a target in the xcode;
an integrating unit 302, configured to integrate initial xcastes of the target in a pod form, and retain app desktop icons in the initial xcastes to obtain the target xcastes, where the initial xcastes are resources managed by an asset catalog;
a compiling unit 303, configured to compile the code resources configured by the coco objects and the target xcastes through the scripts set by the coco objects;
and a packing unit 304, configured to pack and generate an app corresponding to the target according to the compiling result.
In an exemplary implementation, the integration unit 302 is specifically configured to:
integrating initial xcessets of the target in a pod form through a custom plug-in configured by coco objects;
the device further comprises a generating unit 305, configured to generate a script and a buildphase after the integration is completed, where the custom plug-in is declared in the podfile;
the compiling unit 303 is specifically configured to:
separating the resources in the code resources configured by the coco-audio and the target xcastes through the script and the buildphase, and compiling the resources, wherein the code resources comprise xib resources and storyboard resources.
In another exemplary implementation manner, the generating unit 305 is specifically configured to execute generation processing of a script corresponding to the target xcastes and the first buildphase, and includes:
acquiring a first path of target xcasts, wherein the first path comprises paths of different xcasts in the target xcasts under different configurations;
recording the first path into a first file, wherein the first file is used for determining an xcastes path managed by coco objects;
generating a script for dynamically acquiring xcastes, wherein the script for dynamically acquiring xcastes is used for acquiring all xcastes paths in the current target by using xcodeprox during compiling;
generating a first target compiling script, wherein the first target compiling script is used for compiling target xcastes;
adding the first target compiling script to the first buildphase through the xcodeprox.
In another exemplary implementation manner, the first build platform is further configured with:
recording a first modification time of first xcasts participating in compilation and caching the first xcasts as assets.car;
when compiling next time, determining second xcessets participating in compiling, and comparing the first modification time with the second modification time of the second xcessets;
car to app compiled product directory if consistent.
In another exemplary implementation manner, the generating unit 305 is specifically configured to execute the generation processing of the script corresponding to the code resource and the second build hash, and includes:
acquiring a second path of the xib resource and the storyboard resource;
recording the second path into a second file, wherein the second file is used for determining an xib resource path and a storyboard resource path managed by coco codes;
generating a second target compiling script, wherein the second target compiling script is used for compiling the xib resource and the storyboard resource;
and adding the second target compiling script to the second buildphase through the xcodeprox, and setting corresponding inputpath and outputpath.
In yet another exemplary implementation, the apparatus further includes a removing unit 306 configured to:
in the original build hashes of coco apods, the resources related to the script are removed, and the corresponding inputpath and outputpath are adjusted.
In yet another exemplary implementation manner, in the buildphase, the sequence of buildphase corresponding to the target xcastes is after copy bundle resource.
The present application further provides a processing device, and referring to fig. 4, fig. 4 shows a schematic structural diagram of the processing device of the present application, specifically, the processing device of the present application may include a processor 401, a memory 402, and an input/output device 403, where the processor 401 is configured to implement the steps of the app generating method in the corresponding embodiment of fig. 1 or fig. 2 when executing the computer program stored in the memory 402; alternatively, the processor 401 is configured to implement the functions of the units in the embodiment corresponding to fig. 3 when executing the computer program stored in the memory 402, and the memory 402 is configured to store the computer program required by the processor 401 to execute the app generating method in the embodiment corresponding to fig. 1 or fig. 2.
Illustratively, a computer program may be partitioned into one or more modules/units, which are stored in memory 402 and executed by processor 401 to accomplish the present application. One or more modules/units may be a series of computer program instruction segments capable of performing certain functions, the instruction segments being used to describe the execution of a computer program in a computer device.
The processing devices may include, but are not limited to, a processor 401, a memory 402, and input-output devices 403. Those skilled in the art will appreciate that the illustration is merely an example of a processing device and does not constitute a limitation of the processing device and may include more or less components than those illustrated, or combine certain components, or different components, for example, the processing device may also include a network access device, bus, etc. through which the processor 401, memory 402, input output device 403, and network access device, etc. are connected.
The Processor 401 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, the processor being the control center for the processing device and the various interfaces and lines connecting the various parts of the overall device.
The memory 402 may be used to store computer programs and/or modules, and the processor 401 may implement various functions of the computer device by running or executing the computer programs and/or modules stored in the memory 402 and invoking data stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the processing apparatus, and the like. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
The processor 401, when executing the computer program stored in the memory 402, may specifically implement the following functions:
determining a target in the xcode;
integrating initial xcastes of the target in a pod form, and reserving app desktop icons in the initial xcastes to obtain the target xcastes, wherein the initial xcastes are resources managed by asset catalog;
compiling the code resources and the target xcastes configured by the coco through the scripts configured by the coco;
and according to the compiling result, packaging and generating the app corresponding to the target.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the app generating apparatus, the processing device and the corresponding units thereof described above may refer to the description of the app generating method in the embodiment corresponding to fig. 1 or fig. 2, and are not described herein again in detail.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
For this reason, the present application provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute steps in the app generation method in the embodiment corresponding to fig. 1 or fig. 2 in the present application, and specific operations may refer to the description of the app generation method in the embodiment corresponding to fig. 1 or fig. 2, which is not repeated herein.
Wherein the computer-readable storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the computer-readable storage medium can execute the steps in the app generation method in the embodiment corresponding to fig. 1 or fig. 2, the beneficial effects that can be achieved by the app generation method in the embodiment corresponding to fig. 1 or fig. 2 can be achieved, which are detailed in the foregoing description and are not repeated herein.
The app generating method, apparatus, processing device and computer-readable storage medium provided by the present application are described in detail above, and a specific example is applied in the present application to explain the principles and embodiments of the present application, and the description of the above embodiment is only used to help understand the method and core ideas of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. An app generation method, the method comprising:
the processing equipment determines a target in the xcode;
the processing device integrates the initial xcastes of the target in a pod form, and reserves app desktop icons in the initial xcastes to obtain the target xcastes, wherein the initial xcastes are resources managed by asset catalog;
the processing equipment compiles the code resources configured by the coco objects and the target xcastes through the scripts configured by the coco objects;
and the processing equipment generates the app corresponding to the target by packaging according to the compiling result.
2. The method according to claim 1, wherein the processing device integrates the initial xcastes of the target in pod form, comprising:
the processing equipment integrates the initial xcastes of the target in a pod form, and generates the script and the buildphase after the integration is completed through a custom plug-in configured by the cocoapods, wherein the custom plug-in is declared in the podfile;
the processing device compiles the code resources configured by the coco objects and the target xcastes through the scripts configured by the coco objects, and the compiling processing comprises the following steps:
and the processing equipment separates the code resources configured by the coco apods and the resources in the target xcastes through the script and the buildphase, and compiles the resources, wherein the code resources comprise xib resources and storyboard resources.
3. The method according to claim 2, wherein the generating process of the script corresponding to the target xcastes and the first buildphase comprises:
the processing device acquires a first path of target xcasts, wherein the first path comprises paths of different xcasts under different configurations in the target xcasts;
recording the first path into a first file by the processing device, wherein the first file is used for determining an xcesses path managed by the coco objects;
the processing equipment generates a script for dynamically acquiring the xcastes, wherein the script for dynamically acquiring the xcastes is used for acquiring all xcastes paths in the current target by using xcodeproxoj during compiling;
generating a first target compiling script by the processing equipment, wherein the first target compiling script is used for compiling the target xcastes;
and the processing equipment adds the first target compiling script to the first buildphase through the xcodeprox.
4. The method according to claim 3, wherein the first build profile is further configured with:
recording first modification time of first xcasts participating in compilation and caching the first xcasts as assets.car;
when compiling next time, determining second xcessets participating in compiling, and comparing the first modification time with the second modification time of the second xcessets;
if so, copying the assets.car to the compiled product catalog of the app.
5. The method according to claim 2, wherein the generation processing of the script corresponding to the code resource and the second build dhase includes:
the processing device obtaining a second path for both the xib resource and the storyboard resource;
recording the second path into a second file by the processing device, wherein the second file is used for determining an xib resource path and a storyboard resource path managed by the coco objects;
generating a second target compiling script by the processing equipment, wherein the second target compiling script is used for compiling the xib resource and the storyboard resource in parallel;
and the processing equipment adds the second target compiling script to the second buildphase through the xcodeprox, and sets corresponding inputpath and outputpath.
6. The method of claim 2, further comprising:
and the processing equipment removes the resources related to the script in the original buildphase of the cocoapods, and adjusts the corresponding inputpath and outputpath.
7. The method according to claim 2, wherein in the buildphase, the sequence of buildphase corresponding to the target xcastes is after copy bundle resource.
8. An app generation apparatus, the apparatus comprising:
a determining unit, configured to determine a target in the xcode;
the integration unit is used for integrating the initial xcastes of the target in a pod form, and reserving app desktop icons in the initial xcastes to obtain the target xcastes, wherein the initial xcastes are resources managed by asset catalog;
the compiling unit is used for compiling the code resources configured by the coco objects and the target xcastes through the scripts configured by the coco objects;
and the packaging unit is used for packaging and generating the app corresponding to the target according to the compiling result.
9. A processing device comprising a processor and a memory, a computer program being stored in the memory, the processor performing the method according to any of claims 1 to 7 when calling the computer program in the memory.
10. A computer-readable storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the method of any one of claims 1 to 7.
CN202110214827.2A 2021-02-26 2021-02-26 App generation method and device, processing equipment and computer readable storage medium Active CN112558944B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110214827.2A CN112558944B (en) 2021-02-26 2021-02-26 App generation method and device, processing equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110214827.2A CN112558944B (en) 2021-02-26 2021-02-26 App generation method and device, processing equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN112558944A true CN112558944A (en) 2021-03-26
CN112558944B CN112558944B (en) 2021-05-18

Family

ID=75034735

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110214827.2A Active CN112558944B (en) 2021-02-26 2021-02-26 App generation method and device, processing equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112558944B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106873966A (en) * 2016-12-27 2017-06-20 北京五八信息技术有限公司 A kind of application development method and device
CN109656538A (en) * 2017-10-11 2019-04-19 阿里巴巴集团控股有限公司 Generation method, device, system, equipment and the medium of application program
CN110569063A (en) * 2019-08-30 2019-12-13 五八有限公司 sub-application APP generation method and generation device
CN111381865A (en) * 2020-04-01 2020-07-07 深圳传趣网络技术有限公司 Packaging method, device and equipment of game application and storage medium
CN111399810A (en) * 2020-03-11 2020-07-10 杭州涂鸦信息技术有限公司 iOS application program dynamic componentization development method, system and equipment thereof
CN111580804A (en) * 2020-03-31 2020-08-25 完美世界(北京)软件科技发展有限公司 Software project development method and device
US10824442B2 (en) * 2016-03-01 2020-11-03 650 Industries, Inc. Method and apparatus for loading multiple differing versions of a native library into a native environment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10824442B2 (en) * 2016-03-01 2020-11-03 650 Industries, Inc. Method and apparatus for loading multiple differing versions of a native library into a native environment
CN106873966A (en) * 2016-12-27 2017-06-20 北京五八信息技术有限公司 A kind of application development method and device
CN109656538A (en) * 2017-10-11 2019-04-19 阿里巴巴集团控股有限公司 Generation method, device, system, equipment and the medium of application program
CN110569063A (en) * 2019-08-30 2019-12-13 五八有限公司 sub-application APP generation method and generation device
CN111399810A (en) * 2020-03-11 2020-07-10 杭州涂鸦信息技术有限公司 iOS application program dynamic componentization development method, system and equipment thereof
CN111580804A (en) * 2020-03-31 2020-08-25 完美世界(北京)软件科技发展有限公司 Software project development method and device
CN111381865A (en) * 2020-04-01 2020-07-07 深圳传趣网络技术有限公司 Packaging method, device and equipment of game application and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
ALEX LIN: "记录一次优化Xcode编译的过程", 《HTTPS://CHAOSKY.TECH/2020/04/20/OPTIMIZE-XCODE-BUILD-TIME/》 *
OOOPSCC: "Xcode 10 new build system makes asset catalog invalid specified by podspec"sresource(s)", 《HTTPS://GITHUB.COM/COCOAPODS/COCOAPODS/ISSUES/8122》 *
WEIXIN_39724382: "ios从assets加载图片_020A办公平台:IOS端打包处理", 《HTTPS://ZHUANLAN.ZHIHU.COM/P/143775034》 *

Also Published As

Publication number Publication date
CN112558944B (en) 2021-05-18

Similar Documents

Publication Publication Date Title
CN106971098B (en) Method and device for preventing repacking
US20200249925A1 (en) On-demand loading of dynamic scripting language code for reduced memory usage
CN106294113B (en) creation method and device based on programmable test service
CN104714788A (en) Method and device for automatically generating software installation package
CN111258587A (en) Method, device, equipment and storage medium for realizing android application plug-in
CN106897080B (en) Processing method and device of dynamic link library
CN103218428B (en) A kind of dynamic link method and system
CN112379940B (en) Executable file processing method and device, electronic equipment and storage medium
CN110659031A (en) Compiling method and device of application program, electronic equipment and storage medium
CN112256359A (en) Micro-service merging method and device, electronic equipment and readable storage medium
CN113110853A (en) Configuration data online downloading method and device and electronic equipment
CN103645888A (en) System and method for automatically building operation system
CN114706564A (en) Software package manufacturing method and device, electronic equipment and storage medium
CN112230947A (en) Upgrading method and upgrading system of operating system
CN112558944B (en) App generation method and device, processing equipment and computer readable storage medium
US10552135B1 (en) Reducing a size of an application package
CN112230930A (en) Method and device for constructing and packaging hybrid technology stack and machine-readable storage medium
CN110806891A (en) Method and device for generating software version of embedded equipment
CN111198694A (en) Software installation method and device
CN115576560A (en) Hot reloading method, device, equipment and medium for dynamic loader
CN108304184B (en) Compiling method and device
CN111367512B (en) Method and device for creating Android library module dependency relationship in application development
CN114791884A (en) Test environment construction method and device, storage medium and electronic equipment
CN111984299A (en) Data loading method and equipment
CN114416219B (en) System function calling method, device, electronic equipment and readable 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
TR01 Transfer of patent right

Effective date of registration: 20230222

Address after: 430070 No.03, 31st floor, Poly International Center, 332 Guanshan Avenue, Donghu New Technology Development Zone, Wuhan City, Hubei Province

Patentee after: Wuhan mucang Technology Co.,Ltd.

Address before: 430070 No.01, 31st floor, Poly International Center, 332 Guanshan Avenue, Donghu New Technology Development Zone, Wuhan City, Hubei Province

Patentee before: Wuhan mucang Information Technology Co.,Ltd.

TR01 Transfer of patent right