Method for one-key packaging deployment of iOS APP

By automatically configuring the project address, obtaining the latest iOS code, executing pod install and building-packing output iPad files, the problem of time-consuming and error-prone deployment of traditional iOS APPs is solved, and an efficient and accurate automated packaging and distribution process is achieved.

CN119829068APending Publication Date: 2025-04-15BEIJING CHESHANGHUI SOFTWARE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510045232.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-10
Publication Date
2025-04-15

Smart Images

  • Figure CN119829068A_ABST
    Figure CN119829068A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of APP development, and discloses an iOS APP one-key packaging deployment method, which comprises the following steps: S1, configuring a project address, and after confirming an online branch, pulling a current branch code through a git command; s2, after the latest IOS code is obtained, a pod installation operation is executed, and a third-party library framework is added or removed; s3, according to the input parameters, determining a construction type packaging output ipa file; and S4, acquiring the ipa packet, and uploading the ipa packet to a distribution platform for testing and development personnel to download and use. According to the method, the script is executed on the Mac terminal without environmental dependence, and the operation time of each stage is counted; performing automatic Archive, signing, exporting an IPA packet, and deleting an Archive packet; automatically uploading to a preset distribution platform; a simple packaging script is easy to expand; and time is saved, repeated and non-technical-content things are delivered to the system to do, and problems caused by manual packaging are prevented.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of APP development, and specifically relates to a method for one-key packaging and deployment of iOS APP. Background Art

[0002] ipa file: ipa is the abbreviation of iPhone Application. Simply put, the ipa file is essentially a zip compression package, which is the same as the Android apk file. The extension after Xcode packaging is completed is .ipa.

[0003] The traditional one-click packaging and deployment method for iOS APPs has the following shortcomings: the traditional one-click packaging and deployment method for iOS APPs first requires configuring the signature information, then setting multiple packaging parameters, and then waiting for the compilation to complete and manually selecting the output; after exporting the installation package, it is also necessary to manually upload it to the distribution platform and wait for review and release; the whole process is time-consuming and error-prone; therefore, it needs to be improved. Summary of the invention

[0004] The purpose of the present invention is to provide a method for one-click packaging and deployment of iOS APP to solve the problems raised in the above background technology.

[0005] In order to achieve the above object, the present invention provides the following technical solution: a method for one-click packaging and deployment of iOS APP, comprising the following steps:

[0006] S1. Configure the project address, confirm the online branch, and pull the current branch code through the git command;

[0007] S2. After obtaining the latest IOS code, execute the pod install operation to add or remove third-party library frameworks;

[0008] S3. Confirm the build-style packaging output ipa file according to the input parameters;

[0009] S4. Get the ipa package and upload it to the distribution platform for download and use by testers and developers.

[0010] Preferably, in S1:

[0011] If the project involves multiple online branch designs and there is a Flutter module, first pull the latest online code of the Flutter module, execute flutter pub get to download dependencies, and then proceed to the next step.

[0012] Preferably, in S2:

[0013] If the project involves multiple online branch designs, after obtaining the latest iOS code and Flutter code, perform the podinstall operation to add or remove third-party library frameworks.

[0014] Preferably, in S2:

[0015] After executing pod install to obtain running dependencies, if you need to develop a formal package, select the RELEASE mode for exporting the plist file and automatically package the ipa.

[0016] Preferably, in S2: if it is not necessary to develop a formal package, the plist file is exported in DEBUG mode and the ipa is automatically packaged.

[0017] Preferably, in S4:

[0018] Get the ipa package, upload it to the distribution platform, and complete the upload through the Mac notification bar and sound prompts.

[0019] Preferably, the method further comprises the following steps:

[0020] A1. Use the git command to pull the latest code from the development branch;

[0021] A2. Use the xcodebuild command to build the Xcode project;

[0022] A3. Use xcrun command to package.

[0023] A4. Use curl command to upload files to the server;

[0024] A5. Use PlistBuddy command to modify Info.plist file;

[0025] A6. Use the mv command to modify files.

[0026] The beneficial effects of the present invention are as follows:

[0027] 1. The script of the present invention is executed on a Mac terminal without any environment dependency, and the operation time of each stage is counted.

[0028] 2. The present invention automatically Archives, signs, exports IPA packages and deletes Archive packages.

[0029] 3. The present invention automatically uploads to a preset distribution platform.

[0030] 4. The present invention has a simple packaging script and is easy to expand.

[0031] 5. The present invention saves time, leaves repetitive and non-technical tasks to the system, and prevents problems from occurring during manual packaging. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 It is the overall flow chart of the present invention. DETAILED DESCRIPTION

[0033] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0034] like Figure 1 As shown, an embodiment of the present invention provides a method for one-click packaging and deployment of iOS APP.

[0035] The following steps are involved:

[0036] S1. Configure the project address, confirm the online branch, and pull the current branch code through the git command;

[0037] S2. After obtaining the latest IOS code, execute the pod install operation to add or remove third-party library frameworks;

[0038] S3. Confirm the build-style packaging output ipa file according to the input parameters;

[0039] S4. Get the ipa package and upload it to the distribution platform for download and use by testers and developers.

[0040] Putting multiple different commands in the same shell script to automatically package ipa does not rely on the Java environment like Jenkins. It automatically executes the process of building, packaging and exporting ipa, and automatically distributes it to the service platform, thereby improving the work efficiency of R&D personnel; this method can be used in various scenarios, such as continuous integration, automated testing, etc.

[0041] The underlying logic is uniformly encapsulated, which greatly reduces code redundancy and tight business coupling. A set of scripts automatically outputs development test packages and application formal packages based on different parameters. The scripts are highly scalable and can be dynamically added or modified according to business changes.

[0042] By configuring the project address and pulling the latest code from the online branch, you can ensure that the local development environment is consistent with the code in the remote repository. This helps reduce merge conflicts and errors caused by inconsistent versions.

[0043] Using CocoaPods (or other dependency management tools) to perform pod install operations can automatically manage the project's third-party library and framework dependencies; this simplifies the process of adding, updating, or removing dependencies, reduces the possibility of manual configuration errors, and ensures the consistency and correctness of project dependencies.

[0044] Automatically build and package the output ipa file according to the input parameters, realizing the automation of the build process. This improves development efficiency, reduces manual intervention, and reduces the risk of build failure due to human errors; at the same time, the automated build process helps to quickly respond to version iterations and fix urgent problems.

[0045] Uploading the built ipa package to distribution platforms such as TestFlight, Firebase Test Lab, etc. allows testers and developers to easily download and use the latest version of the application; this helps speed up the testing cycle, discover and fix problems in a timely manner, and also facilitates collaboration between developers and testers.

[0046] Among them, in said S1:

[0047] If the project involves multiple online branch designs and there is a Flutter module, first pull the latest online code of the Flutter module, execute flutter pub get to download dependencies, and then proceed to the next step.

[0048] By pulling the latest Flutter module code, you can ensure that the features and fixes of the Flutter module are synchronized with the main project; this helps avoid missing features or errors in the main project due to lagging Flutter module versions.

[0049] Executing flutter pub get can automatically download and update the dependencies required by the Flutter module. This helps ensure that all dependencies are up to date and compatible with each other; at the same time, it can automatically handle conflicts between dependencies and reduce build failures caused by dependency issues.

[0050] During the build process, if the dependencies of the Flutter module are not correctly downloaded or updated, it may cause build failure or runtime errors; by executing flutter pub get first, you can ensure that all necessary dependencies are in place before building, thereby improving build efficiency and stability.

[0051] In a multiple-branch design, each branch may contain specific modifications or updates to the Flutter module. By pulling and updating the Flutter module and its dependencies first, you can ensure that the status of the Flutter module is consistent with the branch requirements when switching to a different branch for development or testing.

[0052] In a team development environment, different developers may be responsible for different branches or modules; by ensuring that the Flutter module and its dependencies are always up to date, you can promote collaboration among team members and reduce merge conflicts and errors caused by inconsistent versions.

[0053] Pulling Flutter module code and executing flutter pub get as part of the automated build process complies with the best practices of continuous integration and continuous deployment (CI / CD); this helps achieve frequent code submission, automatic testing, and rapid deployment, improving the speed and quality of software delivery.

[0054] Automating the code pull and dependency download of Flutter modules can reduce manual intervention and human errors; developers can focus on business logic and function implementation without spending too much time on dependency management and version control.

[0055] Among them, in said S2:

[0056] If the project involves multiple online branch designs, after obtaining the latest iOS code and Flutter code, perform the podinstall operation to add or remove third-party library frameworks.

[0057] Through pod install, CocoaPods ensures that all third-party library frameworks used in the project are installed according to the versions and dependencies specified in the Podfile file; this helps maintain the consistency of dependencies between different branches and reduces build problems or runtime errors caused by different dependency versions.

[0058] Manually managing the addition, update, and removal of third-party library frameworks is a tedious and error-prone task; using CocoaPods can greatly simplify this process, and automatic management of dependencies can be achieved through simple commands; this reduces the workload of developers and reduces the risk of errors caused by manual operations.

[0059] In a design with multiple online branches, each branch may require a different third-party library framework or a different version of the library. Through pod install, you can ensure that each branch has the correct version of the dependency installed, thus supporting the needs of multi-branch development.

[0060] During the build process, if necessary third-party library frameworks are missing or the library version is incorrect, the build may fail. Ensuring that all dependencies are correctly installed through pod install can improve build efficiency and reduce the number of build failures and rebuilds caused by dependency issues.

[0061] In a team development environment, different developers may be responsible for different branches or modules; by ensuring that each branch has the correct version of the third-party library framework installed, collaboration between team members can be promoted and merge conflicts and errors caused by inconsistent versions can be reduced.

[0062] Using pod install as part of the automated build process makes it easier to integrate it into the continuous integration and continuous deployment (CI / CD) process; this helps achieve frequent code submission, automatic testing, and rapid deployment, improving the speed and quality of software delivery.

[0063] Automating the addition, update, and removal of third-party library frameworks can reduce manual intervention and human errors; developers can focus on business logic and function implementation without spending too much time on dependency management and version control.

[0064] Among them, in said S2:

[0065] After executing pod install to obtain running dependencies, if you need to develop a formal package, select the RELEASE mode for exporting the plist file and automatically package the ipa.

[0066] The RELEASE mode usually performs more code optimization, including code compression, removal of debugging information, etc., to reduce the size of the final application and improve runtime performance; this helps to improve the user experience, especially on resource-constrained devices.

[0067] Compared to DEBUG mode, RELEASE mode usually reduces or turns off log output, which helps prevent sensitive information (such as user data, API keys, etc.) from being leaked in logs.

[0068] In RELEASE mode, many features used during debugging (such as assertions, breakpoints, etc.) are disabled, which helps reduce application crashes or instability caused by these features; in addition, RELEASE mode also performs more rigorous checks on the code to ensure its robustness and stability.

[0069] Most app stores and distribution platforms require that submitted apps must be RELEASE mode builds; this is because RELEASE mode apps have undergone more rigorous testing and optimization and are more suitable for public release and use.

[0070] By exporting the plist file in RELEASE mode and automatically packaging it into an ipa file, you can automate the entire build and packaging process; this not only reduces the workload of manual operations, but also improves build efficiency and accuracy, and reduces problems caused by human errors.

[0071] Integrating this process into a continuous integration and continuous deployment (CI / CD) system can further automate the software build, test, and release process; this helps speed up software delivery and improve software quality and reliability.

[0072] The generated ipa file can be uploaded directly to distribution platforms (such as App Store, TestFlight, etc.) for testers and end users to download and use; this helps to quickly collect feedback and fix problems, accelerating product iteration and upgrades.

[0073] Among them, in said S2:

[0074] If you do not need to develop a formal package, select the DEBUG mode for exporting the plist file and automatically package the ipa.

[0075] DEBUG mode includes more detailed debugging information, such as breakpoints, log output, etc. This debugging information in the ipa file (although it may not be as obvious as when running directly in Xcode) may still be helpful to developers when troubleshooting. Especially when analyzing crash logs or behavioral issues collected from users, understanding how the code behaves in DEBUG mode may be a useful reference.

[0076] Among them, in said S4:

[0077] Get the ipa package, upload it to the distribution platform, and complete the upload through the Mac notification bar and sound prompts.

[0078] Use the Mac notification bar and sound prompts to provide users with immediate feedback when the upload is complete. This immediacy allows users to quickly understand the results of the upload operation without having to constantly monitor the upload progress or manually check the upload status.

[0079] The following steps are also included:

[0080] A1. Use the git command to pull the latest code from the development branch;

[0081] A2. Use the xcodebuild command to build the Xcode project;

[0082] A3. Use xcrun command to package.

[0083] A4. Use curl command to upload files to the server;

[0084] A5. Use PlistBuddy command to modify Info.plist file;

[0085] A6. Using the mv command to modify files: Working principle and usage process:

[0086] Make sure your local codebase is in sync with the development branch of the remote repository to get the latest code changes, bug fixes, and new features in a timely manner.

[0087] Automate the build process through command line tools, reduce manual operations and improve build efficiency.

[0088] xcrun is part of Xcode and is specifically used to execute Xcode-related tools and commands, including packaging iOS applications.

[0089] Curl is a cross-platform command line tool that can run on multiple operating systems such as Windows, Linux, and macOS.

[0090] PlistBuddy is a tool that comes with macOS, which is specifically used to read, write and modify plist files. It is easy and accurate to operate.

[0091] Compared with manual operation, using the mv command can reduce errors caused by human factors.

[0092] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0093] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for one-click packaging and deployment of iOS APP, characterized in that: The following steps are involved: S1. Configure the project address, confirm the online branch, and pull the current branch code through the git command; S2. After obtaining the latest IOS code, execute the pod install operation to add or remove third-party library frameworks; S3. Confirm the build-style packaging output ipa file according to the input parameters; S4. Get the ipa package and upload it to the distribution platform for download and use by testers and developers.

2. According to claim 1, a method for one-click packaging and deployment of iOS APP is characterized in that: In S1: If the project involves multiple online branch designs and there is a Flutter module, first pull the latest online code of the Flutter module, execute flutter pub get to download dependencies, and then proceed to the next step.

3. According to claim 1, a method for one-click packaging and deployment of iOS APP, characterized in that: In S2: If the project involves multiple online branch designs, after obtaining the latest iOS code and Flutter code, perform the pod install operation to add or remove third-party library frameworks.

4. According to claim 1, a method for one-click packaging and deployment of iOS APP, characterized in that: In S2: After executing podinstall to obtain running dependencies, if you need to develop a formal package, select the RELEASE mode for exporting the plist file and automatically package the ipa.

5. According to claim 1, a method for one-click packaging and deployment of iOS APP, characterized in that: In S2: If there is no need to develop a formal package, select the DEBUG mode for exporting the plist file and automatically package the ipa.

6. According to claim 1, a method for one-click packaging and deployment of iOS APP, characterized in that: In S4: Get the ipa package, upload it to the distribution platform, and complete the upload through the Mac notification bar and sound prompts.

7. The method for one-click packaging and deployment of iOS APP according to claim 1, characterized in that: The following steps are also included: A1. Use the git command to pull the latest code from the development branch; A2. Use the xcodebuild command to build the Xcode project; A3. Use xcrun command to package. A4. Use curl command to upload files to the server; A5. Use PlistBuddy command to modify Info.plist file; A6. Use the mv command to modify files.