CN111078278A - Automatic packaging method supporting Flutter and iOS mixed editing project - Google Patents
Automatic packaging method supporting Flutter and iOS mixed editing project Download PDFInfo
- Publication number
- CN111078278A CN111078278A CN201911332065.5A CN201911332065A CN111078278A CN 111078278 A CN111078278 A CN 111078278A CN 201911332065 A CN201911332065 A CN 201911332065A CN 111078278 A CN111078278 A CN 111078278A
- Authority
- CN
- China
- Prior art keywords
- flutter
- ios
- engineering
- debug
- release
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The invention provides an automatic packaging method supporting Flutter and iOS mixed editing engineering, which is realized by using a shell script in combination with Jenkins. The method comprises the following steps: remotely accessing Jenkins to select a packaging branch and other optional parameters, and clicking 'construction'; downloading the engineering file and executing the shell script; a Check out code, pulling the latest code; resetting the engineering certificate and the description file according to the bundle ID; resetting the key value of the third party according to debug and release environments; setting a flute end execution environment according to debug and release environment parameters; engineering construction is carried out, packaging is successful, and an ipa file is generated; uploading the ipa package to a third-party platform to obtain an application installation two-dimensional code; and sending the application two-dimensional code to the nail group. The invention supports packaging for the Flutter & iOS mixed editing project.
Description
Technical Field
The invention belongs to the technical field of computer software, and relates to an automatic packaging method supporting Flutter and iOS mixed editing engineering.
Background
The existing iOS automatic packaging technology almost manually executes scripts at a terminal, realizes automatic local packaging scripts of iOS primary engineering, and can successfully export iOS packages (ipa files). But the disadvantages are also more obvious:
(1) the automatic packaging of the mixed editing project cannot be realized;
(2) no remote build packaging is supported;
(3) the method does not support the description file configured according to the bundle ID and the correct third-party platform key values such as alliances, high-level maps and the like and application host addresses to be reset according to debug and release environments;
(4) modular packaging of company business scenarios is not satisfied;
(5) and the two-dimensional code is installed in the nailing office group without supporting automatic uploading application.
Disclosure of Invention
In order to solve the problems, the invention discloses an automatic packaging method supporting Flutter and iOS mixed editing engineering, which is realized by using a shell script in combination with Jenkins.
In order to achieve the purpose, the invention provides the following technical scheme:
the automatic packaging method for supporting the Flutter and iOS mixed editing project comprises the following steps:
step 1, remotely accessing Jenkins, and clicking 'construction' after selecting a packaging branch and other optional parameters on Jekins;
step 2, downloading the engineering file and executing the shell script;
step 3, codes of the Checkout engineering files;
step 4, resetting the engineering certificate and the description file according to the bundle ID;
step 5, resetting the key value and host address of the third party according to debug and release environments;
reading a text which is set with a third party key value and defined by the host address macro circularly line by using a shell script, finding a corresponding line according to a special unique character string defined by each macro, then taking out a defined character string value as string, modifying the text by using a sed command of the shell, and replacing the string with the correct host address character string and the key value;
step 6, setting a flute end execution environment according to debug and release environment parameters;
step 7, engineering construction, wherein the Xcode command is successfully packaged to generate an ipa file;
8, uploading the ipa package to a third-party platform to obtain an application installation two-dimensional code;
and 9, sending the application two-dimensional code to the nail group.
Further, when a package of a releaseclass environment is typed, the flutter end is set as release.
Furthermore, when a test packet of the debug environment is typed, Jenkins exposes an option parameter capable of setting the execution environment of the flutter, the option parameter corresponds to [ flutter built iOS-option parameter ] in the script, and the option comprises debug and release and is used for setting the execution environment of the flutter.
Further, the parameters further include at least one of the following parameters: the system comprises an APP environment, a flutter end execution environment, a custom version number and a service branch.
Compared with the prior art, the invention has the following advantages and beneficial effects:
1. the invention supports the packaging of the Flutter & iOS mixed editing project and supports the construction and packaging of the Jenkins remotely accessed by multiple PC terminals.
2. The invention supports the scene packing of multi-service modules, and can flexibly select parameters such as service branches, debug or release environments and the like to be freely combined to construct the packing.
3. And the exposed option parameters through Jenkins can set the application version number and the execution environment of the flutter end by using shell scripts.
4. The settings of a certificate description file, a bundle ID, an application third-party platform key value, an application host address and the like of the project can be checked and reset by using the shell script.
5. And sending a markdown message for applying and installing the two-dimensional code to the nail group by using the shell script, wherein the message comprises contents such as a display version number, a packaging branch, construction time, an installed mobile phone system type (iOS or Android) and the like besides the two-dimensional code.
Drawings
FIG. 1 is a flow chart of the method of the present invention.
Detailed Description
The technical solutions provided by the present invention will be described in detail below with reference to specific examples, and it should be understood that the following specific embodiments are only illustrative of the present invention and are not intended to limit the scope of the present invention. Additionally, the steps illustrated in the flow charts of the figures may be performed in a computer system such as a set of computer-executable instructions and, although a logical order is illustrated in the flow charts, in some cases, the steps illustrated or described may be performed in an order different than here.
The invention aims at the code packing realized by part of iOS language and part of Flutter language, the whole code is divided into modules to be managed and stored, and different branches can be selected to be packed under different modules during packing. To implement the scheme of the invention, packing branches and selectable parameters are firstly pre-configured on Jenkins, and the Jenkins parameters can be customized.
Based on this, the automatic packaging method supporting the Flutter and iOS mixed editing project provided by the invention, as shown in fig. 1, comprises the following steps:
step 1, remotely accessing Jenkins, and clicking 'construction' after selecting a packaging branch and other optional parameters on Jekins; the packaging types involved in the present invention include: a test pack, a pre-release pack and a production pack;
step 2, downloading the project file (namely the code needing to be packaged), and executing the shell script; different package types correspond to different shell scripts.
Step 3, the Check out engineering file code pulls the latest code to ensure that the code is correct;
step 4, resetting the bundle ID in the project according to the bundle ID in the script statement and the direction of the project to the description file (different bundle IDs correspond to different description files), and ensuring that the correct description file can be applied;
step 5, resetting the key value and host address of the third party according to debug and release environments;
the method comprises the steps of circularly reading third party key values such as member setting, high-resolution maps and the like and texts defined by HOST address macros line by using a shell script, finding a line according to a special unique character string defined by each macro, for example, defining a HOST address under DEBUG environment by the macro, and naming the HOST _ DEBUG, locating the line by using the "HOST _ DEBUG" as a unique character string as a judgment condition, taking a character string value defined by the HOST _ DEBUG as string, modifying the texts by using a shell sed command, replacing the string by using a correct HOST address character string, and resetting the key value of the third party in the same way. Therefore, whether the key value and the host address are set correctly when the code is submitted or not, the effects of resetting the correct third party key value and applying the host each time can be achieved.
When different types of packets are typed, the host address needs to be reset to the corresponding environment.
Step 6, setting a flute end execution environment according to debug and release environment parameters;
generally, under the normal packing execution condition, the environment of the flutter end cannot be kept consistent with the iOS as is, the execution environment of the flutter end is relatively independent, for example, a package of a releasease environment is to be packed (during packing of a pre-release package and a production package), the iOS executes the releasese as is, but the bug is set before the flutter end, when the releasese package is packed, although the packaging is successful, the flutter page is blank, and in order to enable the flutter page to be normally displayed, the flutter end is set as the releasese at this time, and a script is written.
Specifically, in a scene that a test packet of a debug environment needs to be played, because the execution environment of the FLUTTER is relatively independent and can be flexibly set, when the test packet of the debug environment needs to be played, script parameters can be flexibly set by combining a Jenkins tool, Jenkins exposes an option parameter of 'FLUTTER MODE', and two options of debug and release can be selected, so that the execution environment of the FLUTTER is set corresponding to [ fluttebuild iOS-option parameter ] in a script, and when an iOS original end is the debug environment and a FLUTTER end is the release environment, the running performance of the FLUTTER end of the APP can be improved when the test packet is played. In order to be successful and available for each packing, a [ flottebuiied iOS-debug ] or [ flottebuiied iOS-release ] command may be executed to reset the execution environment of the flutter side as debug or release before executing the Xcode compile build command.
Jenkins exposes option variable and can directly use in the shell script, be in same work interval, so we can self-define BUILD _ TYPE, FLUTTER _ MODE, BUILD _ VERSION and each service line's options parameters such as BRANCH to set up APP environment, FLUTTER end execution environment, self-defined VERSION number and service BRANCH, these options parameter all can directly be used as the variable in the script, this is Jenkins's characteristic support, so packing personnel then only need select the APP package of different grade TYPE that each service line can be nimble through easily clicking.
Step 7, engineering construction, wherein the Xcode command is successfully packaged to generate an ipa file;
8, uploading the ipa package to a third-party platform (such as dandelion) to obtain an application installation two-dimensional code;
and 9, sending the application two-dimensional code to the nail group.
According to the invention, after an ipa packet is uploaded to a dandelion platform, a group message with the type of markdown is sent to a specified nail group by using a shell, the markdown message can be set to show the version number, a packaging branch, the construction time, the content of the installed mobile phone system type (iOS or Android) and the like, and an application download and installation two-dimensional code, so that a tester can quickly scan and download codes, and can clearly know which version is required by the packet through the version number and the packaging branch, and the situation of confusion can not be caused. The invention discloses a method for displaying a version number, packaging branches and construction time, wherein a packaging script and Jenkins are combined for use, a packaging worker does not need to manually perform script packaging after locally pulling a code, a computer is used as a packaging special purpose, a Jenkins tool is configured, the packaging worker can remotely access Jenkins by inputting an ip port, then a packaging project is found, a 'construction' button is easily clicked, other work can be removed, the computer can be used for automatically packaging successfully, and a nailing robot can be combined after the packaging is successful, so that an application two-dimensional code is sent to a nailing office group.
The technical means disclosed in the invention scheme are not limited to the technical means disclosed in the above embodiments, but also include the technical scheme formed by any combination of the above technical features. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principle of the present invention, and such improvements and modifications are also considered to be within the scope of the present invention.
Claims (4)
1. An automatic packaging method supporting Flutter and iOS mixed editing engineering is characterized by comprising the following steps:
step 1, remotely accessing Jenkins, and clicking 'construction' after selecting a packaging branch and other optional parameters on Jekins;
step 2, downloading the engineering file and executing the shell script;
step 3, code of the Check out engineering file;
step 4, resetting the engineering certificate and the description file according to the bundle ID;
step 5, resetting the key value and host address of the third party according to debug and release environments;
reading a text which is set with a third party key value and defined by the host address macro circularly line by using a shell script, finding a corresponding line according to a special unique character string defined by each macro, then taking out a defined character string value as string, modifying the text by using a sed command of the shell, and replacing the string with the correct host address character string and the key value;
step 6, setting a flute end execution environment according to debug and release environment parameters;
step 7, engineering construction, wherein the Xcode command is successfully packaged to generate an ipa file;
8, uploading the ipa package to a third-party platform to obtain an application installation two-dimensional code;
and 9, sending the application two-dimensional code to the nail group.
2. The automatic packaging method for supporting Flutter and iOS mixed editing engineering according to claim 1, wherein the Flutter end is set as release when packaging a release environment.
3. The automatic packaging method for supporting Flutter and iOS mixed editing engineering according to claim 1, wherein when a test packet of debug environment is typed, Jenkins exposes an option parameter capable of setting the Flutter execution environment, the option parameter corresponds to [ fluttebuild iOS-option parameter ] in a script, and the option includes debug and release and is used for setting the Flutter execution environment.
4. The automated packaging method for supporting Flutter and iOS mixed editing project according to claim 1 or 3, wherein the parameters further comprise at least one of the following parameters: the system comprises an APP environment, a flutter end execution environment, a custom version number and a service branch.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911332065.5A CN111078278B (en) | 2019-12-21 | 2019-12-21 | Automatic packaging method supporting Flutter and iOS mixed editing project |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911332065.5A CN111078278B (en) | 2019-12-21 | 2019-12-21 | Automatic packaging method supporting Flutter and iOS mixed editing project |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111078278A true CN111078278A (en) | 2020-04-28 |
CN111078278B CN111078278B (en) | 2020-09-08 |
Family
ID=70316579
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911332065.5A Active CN111078278B (en) | 2019-12-21 | 2019-12-21 | Automatic packaging method supporting Flutter and iOS mixed editing project |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111078278B (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111596949A (en) * | 2020-04-09 | 2020-08-28 | 北京五八信息技术有限公司 | Method and device for developing application program |
CN111694564A (en) * | 2020-06-05 | 2020-09-22 | 百度在线网络技术(北京)有限公司 | Compiling method, device, equipment and medium for Flutter mixed mode |
CN111949273A (en) * | 2020-07-31 | 2020-11-17 | 深圳市珍爱云信息技术有限公司 | File extraction method and device based on iOS system |
CN112163231A (en) * | 2020-09-17 | 2021-01-01 | 北京一人一亩田网络科技有限公司 | Method and device for automatically packaging pre-cached data by iOS application, electronic equipment and computer readable medium |
CN112230930A (en) * | 2020-10-22 | 2021-01-15 | 贝壳技术有限公司 | Method and device for constructing and packaging hybrid technology stack and machine-readable storage medium |
CN112631600A (en) * | 2020-12-24 | 2021-04-09 | 上海哔哩哔哩科技有限公司 | Software construction method and system based on Flutter |
CN115509607A (en) * | 2022-11-23 | 2022-12-23 | 易方信息科技股份有限公司 | Method for transmitting instructions from iOS-end packaging project to packaging script across environments |
CN116028377A (en) * | 2023-03-28 | 2023-04-28 | 之江实验室 | Automatic test method, device and medium based on jenkins |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030131139A1 (en) * | 2002-01-07 | 2003-07-10 | International Business Machines Corporation | Data processing system, method, and computer program product for generating a generic compilation interface from object-oriented code |
US20170147314A1 (en) * | 2014-05-02 | 2017-05-25 | Industry-University Cooperation Foundation Hanyang University | Method for distributing, installing, and executing software-defined radio application |
CN108304175A (en) * | 2018-01-29 | 2018-07-20 | 口碑(上海)信息技术有限公司 | Packaging method and device is isolated in code file |
CN109800009A (en) * | 2019-01-15 | 2019-05-24 | 科大国创软件股份有限公司 | The hot update method and system of mixed type App functional module |
CN110069278A (en) * | 2019-03-25 | 2019-07-30 | 福州智永信息科技有限公司 | A kind of automation distributed multi-task packaging method and system |
CN110083360A (en) * | 2019-04-26 | 2019-08-02 | 深圳乐信软件技术有限公司 | A kind of Compilation Method of application code, device, equipment and storage medium |
-
2019
- 2019-12-21 CN CN201911332065.5A patent/CN111078278B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030131139A1 (en) * | 2002-01-07 | 2003-07-10 | International Business Machines Corporation | Data processing system, method, and computer program product for generating a generic compilation interface from object-oriented code |
US20170147314A1 (en) * | 2014-05-02 | 2017-05-25 | Industry-University Cooperation Foundation Hanyang University | Method for distributing, installing, and executing software-defined radio application |
CN108304175A (en) * | 2018-01-29 | 2018-07-20 | 口碑(上海)信息技术有限公司 | Packaging method and device is isolated in code file |
CN109800009A (en) * | 2019-01-15 | 2019-05-24 | 科大国创软件股份有限公司 | The hot update method and system of mixed type App functional module |
CN110069278A (en) * | 2019-03-25 | 2019-07-30 | 福州智永信息科技有限公司 | A kind of automation distributed multi-task packaging method and system |
CN110083360A (en) * | 2019-04-26 | 2019-08-02 | 深圳乐信软件技术有限公司 | A kind of Compilation Method of application code, device, equipment and storage medium |
Non-Patent Citations (5)
Title |
---|
EVIN_QIU: "jenkins自动化构建IOS发布到蒲公英", 《HTTPS://BLOG.CSDN.NET/DESPREDAO/ARTICLE/DETAILS/79971318?UTM_MEDIUM=DISTRIBUTE.PC_RELEVANT.NONE-TASK-BLOG-BLOGCOMMENDFROMMACHINELEARNPAI2-32.NONECASE&DEPTH_1-UTM_SOURCE=DISTRIBUTE.PC_RELEVANT.NONE-TASK-BLOG-BLOGCOMMENDFROMMACHINELEARNPAI2-32.NONECAS * |
TODDATWSU: "Flutter hybrid development: a detailed guide to integrating flutter modules in iOS projects", 《HTTPS://PROGRAMMER.HELP/BLOGS/A-DETAILED-GUIDE-TO-INTEGRATING-FLUTTER-MODULES-IN-IOS-PROJECTS.HTML》 * |
升级之路: "Flutter Jenkins打包", 《HTTPS://JUEJIN.IM/POST/5C18C9F9F265DA612061C26D》 * |
青年别来无恙: "iOS下的flutter混编2:Jenkins自动化生成flutter-release产物", 《HTTPS://WWW.JIANSHU.COM/P/967EE3277B0B》 * |
高家二少爷: "Flutter iOS 混合工程自动化", 《HTTPS://WWW.JIANSHU.COM/P/C7D303CDE221》 * |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111596949A (en) * | 2020-04-09 | 2020-08-28 | 北京五八信息技术有限公司 | Method and device for developing application program |
CN111596949B (en) * | 2020-04-09 | 2021-06-04 | 北京五八信息技术有限公司 | Method and device for developing application program |
CN111694564A (en) * | 2020-06-05 | 2020-09-22 | 百度在线网络技术(北京)有限公司 | Compiling method, device, equipment and medium for Flutter mixed mode |
CN111694564B (en) * | 2020-06-05 | 2023-08-04 | 百度在线网络技术(北京)有限公司 | Method, device, equipment and medium for compiling Flutter mixed mode |
CN111949273A (en) * | 2020-07-31 | 2020-11-17 | 深圳市珍爱云信息技术有限公司 | File extraction method and device based on iOS system |
CN112163231A (en) * | 2020-09-17 | 2021-01-01 | 北京一人一亩田网络科技有限公司 | Method and device for automatically packaging pre-cached data by iOS application, electronic equipment and computer readable medium |
CN112230930A (en) * | 2020-10-22 | 2021-01-15 | 贝壳技术有限公司 | Method and device for constructing and packaging hybrid technology stack and machine-readable storage medium |
CN112631600A (en) * | 2020-12-24 | 2021-04-09 | 上海哔哩哔哩科技有限公司 | Software construction method and system based on Flutter |
CN115509607A (en) * | 2022-11-23 | 2022-12-23 | 易方信息科技股份有限公司 | Method for transmitting instructions from iOS-end packaging project to packaging script across environments |
CN115509607B (en) * | 2022-11-23 | 2023-03-21 | 易方信息科技股份有限公司 | Method for transmitting instructions from iOS (internet operating system) end packaging project to packaging script across environments |
CN116028377A (en) * | 2023-03-28 | 2023-04-28 | 之江实验室 | Automatic test method, device and medium based on jenkins |
CN116028377B (en) * | 2023-03-28 | 2023-08-11 | 之江实验室 | Automatic test method, device and medium based on jenkins |
Also Published As
Publication number | Publication date |
---|---|
CN111078278B (en) | 2020-09-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111078278B (en) | Automatic packaging method supporting Flutter and iOS mixed editing project | |
CN108647028B (en) | Application information processing method and device | |
US7287190B2 (en) | Simultaneous execution of test suites on different platforms | |
CN106933609B (en) | Android application program installation package generation method and device | |
CA2698066A1 (en) | System and method for remotely compiling multi-platform native applications for mobile devices | |
CN104580480A (en) | Remote automatic deployment system and method for client end | |
CN105260315A (en) | Method for debugging log in embedded system process | |
CN111740948B (en) | Data packet issuing method, dynamic updating method, device, equipment and medium | |
CN105335173A (en) | Method, apparatus and system for initializing intelligent terminal device | |
CN109144533A (en) | A kind of method, system and the computer installation of update and the load of application program | |
CN106126423A (en) | The method of testing of game application, Apparatus and system | |
CN104615462A (en) | Cross-platform mobile application generating server side and system | |
CN113050508B (en) | Debugging method and device of control panel, storage medium and debugging equipment | |
US20170262263A1 (en) | Process and system for the generation of an operating program in the form of a mobile application that is capable of operating on a mobile device | |
CN112084008A (en) | Method for rapidly deploying cloud pipe system based on container technology | |
CN103793248A (en) | Method and device for upgrading application program | |
CN112286504A (en) | Method for realizing development and loading of small program based on Reactnative in mobile APP | |
CN114281347A (en) | Method for converting Taro small program code into APP | |
CN110750310B (en) | Binary and source code switching method based on IOS system componentization development | |
CN112732677A (en) | Block link point deployment method, device, equipment and storage medium | |
CN110647349A (en) | Method for realizing continuous delivery of iOS APP | |
CN116126357A (en) | Automatic deployment method and device for test tool, readable storage medium and electronic equipment | |
CN112965697B (en) | Code file generation method and device and electronic equipment | |
CN115658140A (en) | SDK packaging method, device, terminal and storage medium | |
CN112511386B (en) | Vehicle-mounted Ethernet test method and system based on robotframe and Ethernet test equipment |
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: 20220221 Address after: 210000 4th floor, yisituo building, building 6, No. 19, ningshuang Road, Yuhuatai District, Nanjing, Jiangsu Province Patentee after: Start Zhihe (Jiangsu) Digital Technology Co.,Ltd. Address before: Room 801, building C, Nanjing (Yuhua) International Software Outsourcing Industrial Park, 17 tulip Road, Yuhuatai District, Nanjing City, Jiangsu Province, 210000 Patentee before: Joint Digital Technology Co.,Ltd. |
|
TR01 | Transfer of patent right |