CN115495049A - Method and device for constructing project development space required by iOS application - Google Patents

Method and device for constructing project development space required by iOS application Download PDF

Info

Publication number
CN115495049A
CN115495049A CN202211153002.5A CN202211153002A CN115495049A CN 115495049 A CN115495049 A CN 115495049A CN 202211153002 A CN202211153002 A CN 202211153002A CN 115495049 A CN115495049 A CN 115495049A
Authority
CN
China
Prior art keywords
project
application
script
development space
application parameters
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211153002.5A
Other languages
Chinese (zh)
Inventor
陈强
王宁
廖丹
杨自成
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech 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 China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202211153002.5A priority Critical patent/CN115495049A/en
Publication of CN115495049A publication Critical patent/CN115495049A/en
Pending legal-status Critical Current

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/34Graphical or visual programming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons

Abstract

The invention discloses a method and a device for constructing a project development space required by iOS application, and relates to the technical field of mobile interconnection. One embodiment of the method comprises: application parameters required by the project development space can be acquired and displayed in a visual mode; adding the application parameters into one or more scripts according to a predetermined parameter adding strategy; and driving one or more scripts, integrating the project basic templates and the project components related to the application parameters into project data of the application of the iOS system, generating a project development space based on the project data, and binding the project data to the project development space, so that an application developer completes business function development of the application of the iOS system based on the project development space. The project development space is built in a one-click mode in a user-defined visual mode, the iOS application development efficiency is improved, and the consumption of labor and time cost for developing the iOS application is reduced.

Description

Method and device for constructing project development space required by iOS application
Technical Field
The invention relates to the technical field of mobile interconnection, in particular to a method and a device for constructing a project development space required by iOS application.
Background
In application development for an iOS system, it is generally necessary to create an original project space in a development tool and then add business codes based on the created original project space. The generic raw project space may contain the underlying project information of the application or the underlying components related to the application, such as libraries provided by third parties for handling network requests, pictures, databases, user interfaces, etc.
At present, a method for constructing an original project space generally includes that a developer configures application information contained in the original project space and manually drives an instruction to acquire a basic component, and the like, and there are many steps to be manually executed, so that the efficiency of constructing the original project space is low, the problems of manpower cost and time cost waste exist, and the efficiency of developing and applying is influenced.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for constructing a project development space required by an iOS application, which can acquire and display application parameters required by the project development space in a visual manner; adding the application parameters into one or more scripts according to a predetermined parameter adding strategy; and driving one or more scripts, integrating the project basic templates and the project components related to the application parameters into project data of the application of the iOS system, generating a project development space based on the project data, and binding the project data to the project development space, so that an application developer completes business function development of the application of the iOS system based on the project development space. The project development space is built in a one-click mode in a user-defined visual mode, the efficiency of developing the iOS application is improved, and the consumption of labor and time cost for developing the iOS application is reduced.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a method for constructing a project development space required by an iOS application, including: responding to a project development space required by the generation of an application for developing the iOS system, and acquiring and displaying application parameters required by the project development space in a visual mode; adding the application parameters into one or more scripts according to a predetermined parameter adding strategy; and driving one or more scripts, integrating the project basic templates and the project components related to the application parameters into project data of the application of the iOS system, generating a project development space based on the project data, and binding the project data to the project development space, so that an application developer completes business function development of the application of the iOS system based on the project development space.
Optionally, the acquiring and displaying the application parameters required by the project development space in a visualization manner includes: displaying an editable page comprising a plurality of editable items in a visual mode, and receiving application parameters which are input or selected by an application developer and do not appear in other editable items through each editable item; the application parameters comprise any one or more of project information, project basic template identification and project component identification.
Optionally, the method for constructing a project development space required by the iOS application further includes: displaying a plurality of self-defined component identifications corresponding to one or more editable items in a visual mode; the receiving, by each of the editable items, the application parameter selected by the application developer and not appearing in the other editable items includes: and receiving the selection operation of the application developer on any one or more unselected user-defined component identifications corresponding to any editable item, and acquiring and displaying the application parameters of the user-defined component identifications aimed at by the selection operation.
Optionally, the integrating the project components associated with the application parameters into project data of an application of the iOS system includes: acquiring a preset module configuration file aiming at the condition that the project component corresponds to the user-defined component identifier, wherein the preset module configuration file is configured with one or more universal component identifiers; adding the self-defined component identification selected by one or more editable items into the preset module configuration file through a first script; and reading the general component identification and the user-defined component identification in the module configuration file through a second script, and pulling the general component corresponding to the general component identification and the user-defined component corresponding to the user-defined component identification into project data by using an instruction.
Optionally, driving one or more scripts to integrate the project base templates associated with the application parameters into project data of an application of the iOS system, including: under the condition that the application parameters comprise project basic template identifications, determining a code base indicated by the project basic template identifications, and driving a third script to pull project basic codes corresponding to the project basic template identifications from the code base; and integrating the project base code into the project data.
Optionally, the driving one or more scripts to integrate the project base templates associated with the application parameters into project data of an application of the iOS system, further includes: under the condition that the application parameters comprise a plurality of application version types, wherein each application version type indicates a test version or an online version; obtaining the plurality of application version types by using the third script; for each acquired application version type, executing: adding version configuration information of the application version type to the project base code, and integrating the project base code added with the version configuration information into the project data.
Optionally, in a case that the application has a plurality of application version types, for any one of the application version types, performing: and generating a matched target version for the application version type based on the project development space corresponding to the application and the code corresponding to the application version type.
Optionally, the adding the application parameters to one or more scripts according to a predetermined parameter adding policy includes: reading a script corresponding to the script identification by using a preset first calling interface and the script identification; acquiring one or more application parameters associated with the script, and adding the one or more application parameters to the script by using a preset second calling interface so as to enable the script to execute the operation associated with the one or more application parameters.
Optionally, one or more of the scripts comprises tool instructions of one or more preset tools; driving one or more scripts to integrate the project basic templates and the project components associated with the application parameters into project data of an application of the iOS system, wherein the project data comprises: and detecting whether one or more preset tools are installed or not by using the script, and if so, executing a step of integrating project basic templates and project components related to the application parameters into project data of the application of the iOS system by using tool instructions of the one or more preset tools contained in the script.
To achieve the above object, according to a second aspect of an embodiment of the present invention, there is provided an apparatus for constructing a project development space required for an iOS application, including: acquiring a parameter module, a configuration script module and a construction space module; wherein the content of the first and second substances,
the parameter acquisition module is used for responding to a project development space required by the generation of the application for developing the iOS system, and acquiring and displaying application parameters required by the project development space in a visual mode;
the configuration script module is used for adding the application parameters into one or more scripts according to a predetermined parameter adding strategy;
the construction space module is used for driving one or more scripts, integrating the project basic templates and the project components related to the application parameters into project data of the application of the iOS system, generating a project development space based on the project data, and binding the project data to the project development space, so that an application developer can complete the business function development of the application of the iOS system based on the project development space.
Optionally, the acquiring parameter module acquires and displays the application parameters required by the project development space in a visualization manner, and includes: displaying an editable page comprising a plurality of editable items in a visual mode, and receiving application parameters which are input or selected by an application developer and do not appear in other editable items through each editable item; the application parameters comprise any one or more of project information, project basic template identification and project component identification.
Optionally, the parameter obtaining module is further configured to display, in a visual manner, a plurality of custom component identifiers corresponding to one or more of the editable items; the receiving, by each of the editable items, the application parameter selected by the application developer and not appearing in the other editable items includes: and receiving the selection operation of the application developer on any one or more unselected user-defined component identifications corresponding to any editable item, and acquiring and displaying the application parameters of the user-defined component identifications aimed at by the selection operation.
Optionally, the integrating the project components associated with the application parameters into project data of an application of the iOS system includes: acquiring a preset module configuration file aiming at the condition that the project component corresponds to the user-defined component identifier, wherein the preset module configuration file is configured with one or more universal component identifiers; adding the self-defined component identification selected by one or more editable items into the preset module configuration file through a first script; and reading the general component identification and the user-defined component identification in the module configuration file through a second script, and pulling the general component corresponding to the general component identification and the user-defined component corresponding to the user-defined component identification into project data by using an instruction.
Optionally, the building space module drives one or more scripts to integrate the project base templates associated with the application parameters into project data of an application of the iOS system, including: under the condition that the application parameters comprise project basic template identifications, determining a code base indicated by the project basic template identifications, and driving a third script to pull project basic codes corresponding to the project basic template identifications from the code base; and integrating the project base code into the project data.
Optionally, the build space module drives one or more scripts to integrate the project base templates associated with the application parameters into project data of an application of the iOS system, and further includes: under the condition that the application parameters comprise a plurality of application version types, wherein each application version type indicates a test version or an online version; obtaining the plurality of application version types by using the third script; for each acquired application version type, executing: adding version configuration information of the application version type to the project base code, and integrating the project base code added with the version configuration information into the project data.
Optionally, the build space module, when there are multiple application version types for the application, performs, for any one of the application version types: and generating a matched target version for the application version type based on the project development space corresponding to the application and the code corresponding to the application version type.
Optionally, the adding the application parameter to one or more scripts by the configuration script module according to a predetermined parameter adding policy includes: reading a script corresponding to the script identification by using a preset first calling interface and the script identification; acquiring one or more application parameters associated with the script, and adding the one or more application parameters to the script by using a preset second calling interface so as to enable the script to execute the operation associated with the one or more application parameters.
Optionally, the build space module comprises tool instructions of one or more preset tools contained in one or more scripts; driving one or more scripts to integrate the project basic templates and the project components associated with the application parameters into project data of an application of the iOS system, wherein the project data comprises: and detecting whether one or more preset tools are installed or not by using the script, and if so, executing a step of integrating the project basic template and the project component associated with the application parameter into project data of the application of the iOS system by using tool instructions of the one or more preset tools contained in the script.
To achieve the above object, according to a third aspect of embodiments of the present invention, there is provided a build electronic device of a project development space required for an iOS application, comprising: one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the method as any one of the methods of constructing a project development space as required by an iOS application as described above.
To achieve the above object, according to a fourth aspect of embodiments of the present invention, there is provided a computer-readable medium on which a computer program is stored, characterized in that the program, when executed by a processor, implements the method as any one of the above-described construction methods of a project development space required for an iOS application.
To achieve the above object, according to a fifth aspect of embodiments of the present invention, there is provided a computer program product including a computer program, characterized in that the program, when executed by a processor, implements the method as any one of the above-described methods of constructing a project development space required for an iOS application.
One embodiment of the above invention has the following advantages or benefits: application parameters required by the project development space can be acquired and displayed in a visual mode; adding the application parameters into one or more scripts according to a predetermined parameter adding strategy; and driving one or more scripts, integrating the project basic templates and the project components related to the application parameters into project data of the application of the iOS system, generating a project development space based on the project data, and binding the project data to the project development space so that an application developer perfects the business function development of the application of the iOS system based on the project development space. The project development space is built in a one-click mode in a user-defined visual mode, the efficiency of developing the iOS application is improved, and the consumption of labor and time cost for developing the iOS application is reduced.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a flowchart illustrating a method for constructing a project development space required by an iOS application according to an embodiment of the present invention;
FIG. 2 is a flow diagram illustrating the construction of a project development space required for an iOS application according to an embodiment of the present invention;
FIG. 3 is a flow diagram illustrating the construction of a project development space using visual plug-ins according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a device for constructing a project development space required by an iOS application according to an embodiment of the present invention;
FIG. 5 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 6 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In the existing iOS system application development project engineering, the integration of a general component (for example, a third party library, etc.) and a custom component can be managed through a CocoaPods tool, the existing method requires a developer to manually write configuration information (for example, dependency relationship of a plurality of components, etc.) about the general component (for example, the third party library, etc.) and the component in a configuration file Podfile corresponding to the CocoaPods tool, and the integration of a basic function, a tool class, a general resource file, a basic project frame, etc. is also processed in a manner that the developer manually processes the integration. Typically when creating a new project development space (. Xcworks space) using the Xcode tool, the manual operations are all for a single project, a single target, a single project scheme; in the application scenarios, project development can be distinguished between a test environment and a production environment through a plurality of targets, corresponding schemes corresponding to the plurality of targets are configured, and the conventional method for creating the targets also needs manual processing; therefore, a plurality of steps and operations of the existing construction project development space (. Xcworks space) need to be completed manually by developers; the problems of low efficiency of project development space construction and waste of labor cost and time cost exist.
In view of this, as shown in fig. 1, an embodiment of the present invention provides a method for constructing a project development space required by an iOS application, where the method may include the following steps:
step S101: and responding to the generation of a project development space required by the application of the iOS system, and acquiring and displaying application parameters required by the project development space in a visual mode.
Specifically, an embodiment of the present invention is to implement automatic construction of a project development space required for developing an iOS application through a visualization plug-in, and includes acquiring and displaying application parameters required for the project development space through a visualization manner, thereby improving the efficiency of constructing the project development space to a greater extent and thus improving the efficiency of developing the iOS application.
The visual plug-in provides a user page and a function of automatically constructing a project development space by business logic.
Further, the visualization plug-in provides a user interface to enable an application developer (i.e., the party using the visualization plug-in) to input (edit information or select options, etc.) desired application parameters via the user interface; acquiring and displaying application parameters required by the project development space in a visualization mode; the application parameters comprise any one or more of project information (such as project name: proj name, project identification bundle id: bundle id, development language: language, engineering file directory: proj path, organization name: orgName, organization identification: orgIdName, etc.), project basic template identification (such as git warehouse address: template girtrepourl corresponding to the project basic template), project component identification (such as custom component string name: moduleNamesStr, general component identification (such as name: openModuleNames corresponding to the third-party library, third-party library name string: openModuleNasStr, etc.).
Further, the application developer can directly input the project information (such as project name: projName) through a text box (i.e. editable item) provided by the editable page, and can also provide a list of component identifiers (i.e. editable items) through the editable page to allow the application developer to perform checking and the like. Namely, the acquiring and displaying the application parameters required by the project development space in a visualization manner includes: displaying an editable page comprising a plurality of editable items in a visual mode, and receiving application parameters which are input or selected by an application developer and do not appear in other editable items through each editable item; the application parameters comprise any one or more of project information, project basic template identification and project component identification. For example, for a plurality of component identifications displayed on the visualization page, the component identification that has been selected (checked) may be set to a "non-editable" state (e.g., a method of graying out the option, etc.), that is, the selected application parameter that has not appeared in other editable items.
Further, displaying various custom component identifications corresponding to one or more editable items in a visual mode aiming at the custom components; the receiving, by each of the editable items, the application parameter selected by the application developer and not appearing in the other editable items includes: and receiving the selection operation of the application developer on any one or more unselected user-defined component identifications corresponding to any editable item, and acquiring and displaying the application parameters of the user-defined component identifications aimed at by the selection operation. The user-defined component may be a component that the application developer correspondingly defines according to the functional requirements of the application, for example: the invention relates to a network service module, a routing module, a message bus module, a network service module, a screen adapting module and the like. Preferably, the page may show an association relationship (e.g., a dependency relationship) between the multiple custom components, so that the application developer may determine the association relationship between the multiple custom components through the page, and may select the multiple components according to the association relationship in addition to the custom component required by the selection service; therefore, the user-defined component identifications are displayed through the page, the application developer can select the required user-defined component through the page, and information such as the identification and the incidence relation of the user-defined component does not need to be manually configured into the configuration file podfile. The development efficiency of the iOS application is improved. The method comprises the steps of acquiring a preset module configuration file, wherein the preset module configuration file is configured with one or more universal component identifiers; and adding the self-defined component identification selected by one or more editable items into the preset module configuration file through a first script. The preset module configuration file can be a podfile contained in a Cooapods tool, and a first script (such as Ruby or Shell script) is used for adding a component identifier selected by an application developer acquired from a visual page into the podfile; it can be understood that information such as the general component identifier, the custom component identifier, and/or the association relationship between the component identifiers may be configured by using the podfile, so that the component corresponding to the component identifier is further acquired by using a coco tools through the information configured by the podfile.
Step S102: and adding the application parameters into one or more scripts according to a predetermined parameter adding strategy.
Specifically, according to the description in step S101, a plurality of application parameters are obtained in a visualization manner, and further, a visualization plug-in an embodiment of the visualization manner is used to add the obtained application parameters to one or more scripts. Wherein the one or more scripts are used to perform various operations including subsequent integration of components, building of project development space, and the like. Scripts may be written in Ruby (an object oriented programming scripting language) or shell scripting programs.
In one embodiment of the present invention, adding the application parameters to one or more scripts according to a predetermined parameter addition policy includes: reading a script corresponding to the script identification by using a preset first calling interface and the script identification; and acquiring one or more application parameters related to the script, and adding the one or more application parameters to the script by using a preset second calling interface so as to enable the script to execute the operation related to the one or more application parameters. The preset first calling interface may be: bundle, main, path (forResource: "script identification", ofType: "rb"); ofType, 'rb' represents that the type of the script is Ruby script; reading a script corresponding to the script identification by using a preset first calling interface and the script identification; further, the async (i.e., a preset second call interface) may be utilized to add one or more of the application parameters to the script; for example: the async contains information where a number of required application parameters can be imported through definitions [ String ] and added to the script.
static func async(envPath:String?=nil,scriptPath:String,arguments:[String]?=nil,……){DispatchQueue.global().async}
In one embodiment of the present invention, the visualization plug-in is divided into two parts, one part being the user page part as described in step S101; the second part is a business logic part, and the business logic part can utilize the environment variables and parameters required by the business functions of the Process class incoming visualization plug-in, so as to execute shell or ruby scripts. Preferably, a script containing multiple functions is written in advance, added to project data (for example, the project data may be a preset file directory), read the script by a bundle.main.path (for resource: "script identifier", of type: "rb") method, and after reading, the script can be executed asynchronously using a Process encapsulation based type CommandRunner, wherein the CommandRunner provides a script loading synchronous and asynchronous methods, internally encapsulates system environment variables on which the Process and Pipe scripts depend, and since the environment of a tool (for example, coco points, git, pipe, etc.) called by the script is generally installed in the preset directory, it is also necessary to add preset directory (for example, system directory, etc.) information and script application parameters to a corresponding sync by using a preset second call interface. The application parameters associated with the plurality of scripts include, for example: item name: projName, item identification bundle id: bundleId, development language: langage, project base template xcodeproxoj file directory: projPath, organization name: orgName, organization id name: orgIdName, custom component name: moduleNames, generic component name: openModuleNames, third party library name string: openmodulenamstr, template engineering git warehouse address: templateGitRoUrl, and the like.
Step S103: and driving one or more scripts, integrating the project basic templates and the project components related to the application parameters into project data of the application of the iOS system, generating a project development space based on the project data, and binding the project data to the project development space, so that an application developer completes business function development of the application of the iOS system based on the project development space.
In one embodiment of the present invention, preferably, a plurality of scripts are constructed, and different functions are realized by different scripts. The modularization management and the easy maintenance of the visual plug-in are improved.
For example: adding the self-defined component identification selected by one or more editable items into the preset module configuration file through a first script; and reading the general component identification and the user-defined component identification in the module configuration file through a second script, and pulling the general component corresponding to the general component identification and the user-defined component corresponding to the user-defined component identification into project data by using an instruction. Pulling the project basic code corresponding to the project basic template identification from the code library through a third script; a project development space can also be constructed using a fourth script. It can be understood that the first script, the second script, the third script and the fourth script may belong to the same script file according to the application scenario.
Further, the preset module configuration file is configured with one or more common component identifiers (e.g., file identifiers of multiple third-party library files, etc.); the preset module configuration file can be a podfile contained in a CocoaPods tool, information such as a general component identifier, a user-defined component identifier and/or an association relation between component identifiers can be configured by using the podfile, and a component corresponding to the component identifier is acquired by using the CocoaPods tool through the information configured by the podfile. Further, the user-defined component identification selected by one or more editable items is added to the preset module configuration file through the first script. The method and the device have the advantages that the user-defined component identification of the user-defined component selected by the user and/or the incidence relation among the components received from the page are added into the podfile through the first script, and the problems of low efficiency and low accuracy caused by the fact that information such as the general component identification, the user-defined component identification and/or the incidence relation among the component identifications need to be configured manually are solved.
Further, reading the general component identifier and the custom component identifier in the module configuration file through a second script, and pulling the general component corresponding to the general component identifier and the custom component corresponding to the custom component identifier into project data by using an instruction, wherein the second script can contain a pod instruction of a CocoaPods tool, and pulling the general component corresponding to the general component identifier and the custom component corresponding to the custom component identifier into the project data according to the association relation among the general component identifier, the custom component identifier and/or the component identifier so as to complete the introduction of the general component and the custom component required by the project. The integration of the general components and the custom components is automatically realized through the script, and the problem of low efficiency caused by the need of manually executing tool instructions is solved.
Further, driving one or more scripts to integrate the project basic templates associated with the application parameters into project data of an application of the iOS system, including: under the condition that the application parameters comprise project basic template identifications, determining a code base indicated by the project basic template identifications, and driving a third script to pull project basic codes corresponding to the project basic template identifications from the code base; and integrating the project base code into the project data. The project basic template may include basic function classes, tool classes, universal resources, project basic frameworks and the like associated with the iOS application to be developed, and detailed content (for example, codes) associated with the project basic template may be obtained by downloading from a code repository, for example, a git code library; therefore, the item base template identifier is transmitted to the third script to determine that the third script executes the git instruction to obtain the corresponding item base code, for example, the git instruction is git clone template GitRepoUrl; the template girtrepourl is an example of an item base template identifier, and further integrates the item base code into the item data (item data such as a preset folder). The Xcodeprox engineering file of the project can be re-edited according to a syntactic format by using a Ruby script by using an Xcodeprox tool contained in a CocoaPods tool, so that information corresponding to a basic code of the project is added to the project engineering file to generate a new Xcodeprox.
Further, under the condition that the application parameters include a plurality of application version types, each application version type indicates a test version or an online version; obtaining the plurality of application version types by using the third script; for each acquired application version type, executing: adding version configuration information of the application version type to the project base code, and integrating the project base code added with the version configuration information into the project data. In application development, a plurality of version types are often required to be configured to meet requirements of different development stages, for example, test versions and online versions (for example, production versions and the like) corresponding to the different development stages, further, a third script is driven to obtain the plurality of application version types, and version configuration information of the different application version types is added to an xcodeprox engineering file included in the project basic code by using an xcodeprox tool, and the project basic code (including the xcodeprox engineering file) added with the version configuration information is integrated into the project data. It can be understood that codes corresponding to different application version types are different, and therefore, codes matched with versions can be correspondingly managed for different application version types through the project development space constructed by the embodiment of the invention.
Further, in a case where there are a plurality of application version types for the application, for any one of the application version types, performing: and generating a matched target version for the application version type based on the project development space corresponding to the application and the code corresponding to the application version type. For example, based on the project development space and the code of multiple test versions, multiple test versions may be generated; and generating an online version and the like based on the project development space and the codes of the online version.
As shown in fig. 2, an embodiment of the present invention provides a method for constructing a project development space required by an iOS application, where the method may include the following steps:
step S201: the script is used to detect whether one or more preset tools are installed.
Specifically, in an embodiment of the present invention, the required preset tools include git, coco pods, and the like, and then whether the tools such as git, coco pods are installed or not may be detected through a script, and the detection method may obtain installation information and the like through a call interface in the script or from a system; it can be understood that, since the script needs to execute the preset instructions included in the preset tool to perform various operations, for example: the method comprises the steps of obtaining project basic codes from a git code library by utilizing a git clone testlateGitRepoUrl instruction, and constructing xcworks space files (project development spaces) of projects by utilizing pod install, so that the reliability of scripts is improved by detecting whether one or more preset tools are installed, and the efficiency of constructing the project development spaces is improved.
Step S202: and utilizing tool instructions of one or more preset tools contained in the script to execute the project basic template and the project component which are associated with the application parameters to be integrated into project data of the application of the iOS system.
Specifically, the description of the project data for executing the application integrating the project basic template and the project component associated with the application parameter into the iOS system by using the tool instruction of the preset tool or tools included in the script is consistent with the description of the part in step S103, and is not repeated here. For example: a podfile configuration file is created and written, and project components (general components, custom components) are all configured into the podfile file, so that the step of integrating the project components into project data of an application of the iOS system is performed based on the podfile configuration file through a coco pods tool.
Step S203: obtaining the plurality of application version types; for each acquired application version type, executing: adding version configuration information of the application version type to the project base framework, and integrating the project base framework added with the version configuration information into the project data.
Specifically, the description about adding the version configuration information of the application version type to the project base framework and integrating the project base framework added with the version configuration information into the project data is consistent with the description about the part in step S103, and is not repeated here. For example: the application version types comprise a test version and an online version, and the application version types can be created through an Xcodeprox script.
Step S204: and generating a project development space based on the project data.
Specifically, a pod install instruction can be used to execute the step of generating the xcworks space file corresponding to the project development space, and the application developer can further develop the xcworks space file according to the business logic of the application by opening the xcworks space file. Therefore, the method and the device for generating the project development space of the application in one-click mode through the visual plug-in overcome the problems that the manual configuration of an application developer is needed and the project development space is generated, so that the efficiency is low, and the efficiency of developing the iOS application is improved.
The description of step S201 to step S204 is: tool instructions of one or more preset tools contained in one or more scripts; driving one or more scripts to integrate the project basic templates and the project components associated with the application parameters into project data of an application of the iOS system, wherein the project data comprises: and detecting whether one or more preset tools are installed or not by using the script, and if so, executing a step of integrating the project basic template and the project component associated with the application parameter into project data of the application of the iOS system by using tool instructions of the one or more preset tools contained in the script.
As shown in FIG. 3, an embodiment of the present invention provides a method for building an iOS application project development space through a visual plug-in, which may include the following steps;
step S301: and integrating the general components, the custom components, the project basic template and the configuration information required for constructing various application version types into project data through the visual plug-in.
Step S302: and constructing an iOS application project development space based on the project data.
Specifically, the detailed description about step S301 to step S302 is consistent with the description about step S101 to step S103, and is not repeated here.
Further, in one embodiment of the present invention, the visualization plug-in may be utilized as a stand-alone application, or a functional module integrated into other applications; in the following, a visual plug-in is taken as an independent application as an example, the visual plug-in is taken as a starting entry, and another application is opened for editing. When the Xcode is used for creating the application engineering of the visual plug-in, two classes, namely SourceEditorExtension and SourceEditorCommand, are automatically generated; wherein the SourceEditorExtension class is used to control the lifecycle of the extension; the Source editorCommand class is used for acquiring the content being edited by the Xcode and performing corresponding content replacement, and comprises a performCommand WithInvitation method which is used for acquiring the code of the content being edited. Thus, the business logic of the visualization plug-in may include: creating an XCSourceEditorCommand class, rewriting the performCo mmondwithinvocation method in the custom class, specifically, the visual plug-in may be implemented as an independent application, for example, in a URLScheme manner, and may define the scheme as xxplug in n://, where a new project command transmitted according to the Xcode tool menu corresponds to the url of the custom scheme, for example: and xxplugin,// new _ app, then opening the application where the visual plug-in is located by using an application program interface NSWr okspace.
Furthermore, the service of the visual plug-in comprises two parts, namely a user interface and service logic, wherein the functions of interface interaction, interface rendering and the like of the user interface part can be written by utilizing the Swift language which has the advantages of simple interface design and easy maintenance. The business logic may utilize the Process class to implement the environment variables needed for incoming business functions, perform operations for one or more Shell and Ruby scripts, and so on.
Further, with respect to the installation and use of the visualization plug-in, the following steps may be employed: 1) And acquiring an installation package of the visual plug-in XXPlugin. 2) Detecting whether the installation environment meets the requirements of visual plug-ins, such as detecting Xcode versions and macOS versions; 3) And detecting the installation condition of the preset tool depended by the visual plug-in, for example, detecting the version of CocoaPods, the authority of git, the running environment of Ruby/shell and the like. 4) Installation of the visual plug-in is performed.
As shown in fig. 4, an embodiment of the present invention provides a device 400 for building a project development space required by an iOS application, including: a parameter acquisition module 401, a configuration script module 402 and a space construction module 403; wherein the content of the first and second substances,
the parameter acquiring module 401 is configured to respond to a project development space required for generating an application for developing an iOS system, and acquire and display application parameters required by the project development space in a visual manner;
the configuration script module 402 is configured to add the application parameters to one or more scripts according to a predetermined parameter addition policy;
the build space module 403 is configured to drive one or more scripts, integrate the project basic templates and the project components associated with the application parameters into project data of an application of the iOS system, generate a project development space based on the project data, and bind the project data to the project development space, so that an application developer completes business function development of the application of the iOS system based on the project development space.
Optionally, the parameter obtaining module 401 obtains and displays the application parameters required by the project development space in a visualization manner, where the application parameters include: displaying an editable page comprising a plurality of editable items in a visual mode, and receiving application parameters which are input or selected by an application developer and do not appear in other editable items through each editable item; the application parameters comprise any one or more of project information, project basic template identification and project component identification.
Optionally, the configuration script module 402 adds the application parameters to one or more scripts according to a predetermined parameter addition policy, including: reading a script corresponding to the script identification by using a preset first calling interface and the script identification; acquiring one or more application parameters associated with the script, and adding the one or more application parameters to the script by using a preset second calling interface so as to enable the script to execute the operation associated with the one or more application parameters.
An embodiment of the present invention further provides an electronic device for constructing a project development space required by an iOS application, including: one or more processors; the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are enabled to realize the method provided by any one of the above embodiments.
Embodiments of the present invention further provide a computer-readable medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method provided in any of the above embodiments.
An embodiment of the present invention further provides a computer program product, including a computer program, where the program is executed by a processor to implement the method provided in any of the above embodiments.
Fig. 5 illustrates an exemplary system architecture 500 to which a method of constructing a project development space required for an iOS application or a device for constructing a project development space required for an iOS application of the embodiment of the present invention can be applied.
As shown in fig. 5, the system architecture 500 may include terminal devices 501, 502, 503, a network 504, and a server 505. The network 504 is the medium used to provide communication links between terminal devices 501, 502, 503 and the server 505. Network 504 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 501, 502, 503 to interact with a server 505 over a network 504 to receive or send messages or the like. The terminal devices 501, 502, 503 may have various client applications installed thereon, such as an e-mall client application, a web browser application, a search-type application, an instant messaging tool, a mailbox client, and the like.
The terminal devices 501, 502, 503 may be various electronic devices having display screens and supporting various client applications, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 505 may be a server providing various services, such as a background management server providing support for client applications used by users with the terminal devices 501, 502, 503. The background management server may process the received request for one or more project data needed to build the project development space and feed back project data (e.g., project component data, project base code, etc.) corresponding to the request to the terminal device.
It should be noted that the method for constructing the project development space required by the iOS application provided in the embodiment of the present invention is generally executed by the terminal devices 501, 502, and 503, and accordingly, the means for constructing the project development space required by the iOS application is generally disposed in the terminal devices 501, 502, and 503.
It should be understood that the number of terminal devices, networks, and servers in fig. 5 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for an implementation.
Referring now to FIG. 6, a block diagram of a computer system 600 suitable for use with a terminal device implementing an embodiment of the invention is shown. The terminal device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU) 601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. A driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that the computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 601.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules and/or units described in the embodiments of the present invention may be implemented by software, and may also be implemented by hardware. The described modules and/or units may also be provided in a processor, and may be described as: a processor includes a get parameter module, a configuration script module, and a build space module. Where the names of these modules do not in some cases constitute a limitation on the module itself, for example, a configuration script module may also be described as a "module that adds the application parameters to one or more scripts according to a predetermined parameter addition policy".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: responding to a project development space required by the generation of an application for developing the iOS system, and acquiring and displaying application parameters required by the project development space in a visual mode; adding the application parameters into one or more scripts according to a predetermined parameter adding strategy; and driving one or more scripts, integrating the project basic templates and the project components related to the application parameters into project data of the application of the iOS system, generating a project development space based on the project data, and binding the project data to the project development space so that an application developer perfects the business function development of the application of the iOS system based on the project development space.
According to the embodiment of the invention, the application parameters required by the project development space are acquired and displayed in a visual mode; adding the application parameters into one or more scripts according to a predetermined parameter adding strategy; and driving one or more scripts, integrating the project basic templates and the project components related to the application parameters into project data of the application of the iOS system, generating a project development space based on the project data, and binding the project data to the project development space so that an application developer perfects the business function development of the application of the iOS system based on the project development space. The project development space is built in a one-click mode in a user-defined visual mode, the efficiency of developing the iOS application is improved, and the consumption of labor and time cost for developing the iOS application is reduced.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (15)

1. A method for constructing a project development space required by an iOS application is characterized by comprising the following steps:
responding to a project development space required by the generation of an application for developing the iOS system, and acquiring and displaying application parameters required by the project development space in a visual mode;
adding the application parameters into one or more scripts according to a predetermined parameter adding strategy;
and driving one or more scripts, integrating the project basic templates and the project components related to the application parameters into project data of the application of the iOS system, generating a project development space based on the project data, and binding the project data to the project development space, so that an application developer completes business function development of the application of the iOS system based on the project development space.
2. The method of claim 1,
the acquiring and displaying of the application parameters required by the project development space in a visualization manner includes:
displaying an editable page comprising a plurality of editable items in a visual mode, and receiving application parameters which are input or selected by an application developer and do not appear in other editable items through each editable item; the application parameters comprise any one or more of project information, project basic template identification and project component identification.
3. The method of claim 2,
further comprising: displaying a plurality of self-defined component identifications corresponding to one or more editable items in a visual mode;
the receiving, by each of the editable items, the application parameter selected by the application developer and not appearing in the other editable items includes:
and receiving the selection operation of the application developer on any one or more unselected user-defined component identifications corresponding to any editable item, and acquiring and displaying the application parameters of the user-defined component identifications aimed at by the selection operation.
4. The method of claim 3,
the integrating the project components associated with the application parameters into project data of the application of the iOS system comprises the following steps:
acquiring a preset module configuration file aiming at the condition that the project component corresponds to the user-defined component identifier, wherein the preset module configuration file is configured with one or more universal component identifiers;
adding the self-defined component identification selected by one or more editable items into the preset module configuration file through a first script;
and reading the general component identification and the user-defined component identification in the module configuration file through a second script, and pulling the general component corresponding to the general component identification and the user-defined component corresponding to the user-defined component identification into project data by using an instruction.
5. The method of claim 1,
the driving one or more scripts integrate the project basic templates associated with the application parameters into project data of an application of the iOS system, and the driving one or more scripts comprise the following steps:
in the case where the application parameters include an item base template identification,
determining a code base indicated by the project basic template identifier, and driving a third script to pull a project basic code corresponding to the project basic template identifier from the code base;
and integrating the project base code into the project data.
6. The method of claim 5,
the driving one or more scripts to integrate the project base templates associated with the application parameters into project data of an application of the iOS system, further comprising:
under the condition that the application parameters comprise a plurality of application version types, wherein each application version type indicates a test version or an online version;
obtaining the plurality of application version types by using the third script;
for each acquired application version type, executing:
adding version configuration information of the application version type to the project base code, and integrating the project base code added with the version configuration information into the project data.
7. The method of claim 6, further comprising:
in the case where there are multiple application version types for the application,
for any one of the application version types, performing:
and generating a matched target version for the application version type based on the project development space corresponding to the application and the code corresponding to the application version type.
8. The method of claim 1,
adding the application parameters into one or more scripts according to a predetermined parameter adding strategy, wherein the adding comprises the following steps:
reading a script corresponding to the script identification by using a preset first calling interface and the script identification;
acquiring one or more application parameters associated with the script, and adding the one or more application parameters to the script by using a preset second calling interface so as to enable the script to execute the operation associated with the one or more application parameters.
9. The method of claim 1,
tool instructions of one or more preset tools contained in one or more scripts;
driving one or more scripts to integrate the project basic templates and the project components associated with the application parameters into project data of an application of the iOS system, wherein the project data comprises:
and detecting whether one or more preset tools are installed or not by using the script, and if so, executing a step of integrating the project basic template and the project component associated with the application parameter into project data of the application of the iOS system by using tool instructions of the one or more preset tools contained in the script.
10. An apparatus for constructing a project development space required for an iOS application, comprising: acquiring a parameter module, a configuration script module and a construction space module; wherein the content of the first and second substances,
the parameter acquisition module is used for responding to a project development space required by the generation of the application of the iOS system and acquiring and displaying the application parameters required by the project development space in a visual mode;
the configuration script module is used for adding the application parameters into one or more scripts according to a predetermined parameter adding strategy;
the construction space module is used for driving one or more scripts, integrating the project basic templates and the project components related to the application parameters into project data of the application of the iOS system, generating a project development space based on the project data, and binding the project data to the project development space, so that an application developer can complete the business function development of the application of the iOS system based on the project development space.
11. The apparatus of claim 10,
the parameter acquiring module acquires and displays the application parameters required by the project development space in a visual mode, and comprises the following steps:
displaying an editable page comprising a plurality of editable items in a visual mode, and receiving application parameters which are input or selected by an application developer and do not appear in other editable items through each editable item; the application parameters comprise any one or more of project information, project basic template identification and project component identification.
12. The apparatus of claim 10,
the configuration script module adds the application parameters to one or more scripts according to a predetermined parameter adding strategy, and the method comprises the following steps:
reading a script corresponding to the script identification by using a preset first calling interface and the script identification;
acquiring one or more application parameters associated with the script, and adding the one or more application parameters to the script by using a preset second calling interface so as to enable the script to execute the operation associated with the one or more application parameters.
13. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-9.
14. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-9.
15. A computer program product comprising a computer program, characterized in that the program, when executed by a processor, implements the method according to any one of claims 1-9.
CN202211153002.5A 2022-09-21 2022-09-21 Method and device for constructing project development space required by iOS application Pending CN115495049A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211153002.5A CN115495049A (en) 2022-09-21 2022-09-21 Method and device for constructing project development space required by iOS application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211153002.5A CN115495049A (en) 2022-09-21 2022-09-21 Method and device for constructing project development space required by iOS application

Publications (1)

Publication Number Publication Date
CN115495049A true CN115495049A (en) 2022-12-20

Family

ID=84470369

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211153002.5A Pending CN115495049A (en) 2022-09-21 2022-09-21 Method and device for constructing project development space required by iOS application

Country Status (1)

Country Link
CN (1) CN115495049A (en)

Similar Documents

Publication Publication Date Title
WO2018228211A1 (en) Application conversion method, apparatus and device
CN110554876A (en) Method and device for compiling android project
CN110780874B (en) Method and device for generating information
CN111740948B (en) Data packet issuing method, dynamic updating method, device, equipment and medium
CN112631590B (en) Component library generation method, device, electronic equipment and computer readable medium
CN110554874A (en) Method and device for reusing webpage components of SaaS platform
WO2019029451A1 (en) Method for publishing mobile applications and electronic apparatus
CN110895471A (en) Installation package generation method, device, medium and electronic equipment
CN111913889A (en) Test system building method and test system
CN109002282B (en) Method and device for realizing animation effect in web page development
CN112015654A (en) Method and apparatus for testing
CN110221840B (en) Function implementation method and device of application program, equipment and storage medium
CN110489162B (en) Method, device, medium and equipment for simplifying installation package SO (storage and retrieval) file
CN112114789B (en) Service development method and equipment
CN111435328B (en) Application testing method and device, electronic equipment and readable storage medium
CN112835568A (en) Project construction method and device
CN112947912A (en) Method and device for generating code, electronic equipment and storage medium
CN115495049A (en) Method and device for constructing project development space required by iOS application
CN113468067B (en) Application program debugging method and device, electronic equipment and computer readable medium
CN115617420A (en) Application program generation method, device, equipment and storage medium
CN113986258A (en) Service publishing method, device, equipment and storage medium
CN114201174A (en) Construction method and device of hybrid mobile application, electronic equipment and storage medium
CN113110829A (en) Multi-UI component library data processing method and device
CN113535221A (en) Method and device for managing application version
CN113032004A (en) Method, apparatus and program product for managing development jobs in a development environment

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