Ios engineering update method and apparatus, electronic device, storage medium, and product

By compiling the source files output by the development tools and converting the resource file format, a description file is generated and packaged into a release package, which solves the problem of version inconsistency in iOS project updates and realizes automated updates and efficient iOS project integration.

CN122431694APending Publication Date: 2026-07-21BEIJING DUYOU INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING DUYOU INFORMATION TECH CO LTD
Filing Date
2026-04-09
Publication Date
2026-07-21

Smart Images

  • Figure CN122431694A_ABST
    Figure CN122431694A_ABST
Patent Text Reader

Abstract

The present disclosure provides an IOS project updating method and device, electronic equipment, storage medium and product, relates to the field of application development, in particular to the field of code automatic integration. The specific implementation scheme is: the source file of the target project output by the development tool is compiled to obtain a compiled file adapted to the IOS platform; the original resource file relied on by the source file in the development tool is format-converted to obtain a target resource file adapted to the IOS platform; a description file is generated, the description file is used at least for describing version information of the target project; the compiled file, the resource file and the description file are packaged into a release package, and the release package is provided to an IOS dependency management tool, so that the IOS dependency management tool updates an IOS module corresponding to the target project in a target IOS project based on the release package, so that the IOS module is consistent with the version information of the target project. The present method helps to improve the development efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of application development, and more particularly to the field of automated code integration. Specifically, this disclosure relates to an iOS engineering update method, apparatus, electronic device, storage medium, and product. Background Technology

[0002] In the field of application development, development tools are often used to write the application's business logic code. For the iOS platform, development tools can generate source files containing executable code, which need to be integrated into the iOS project to enable updates to the iOS project.

[0003] Currently, there is a lack of solutions in related technologies for automatically integrating source files generated by development tools into iOS projects. Summary of the Invention

[0004] This disclosure provides a method, apparatus, electronic device, storage medium, and product for iOS engineering updates, to solve at least one of the above-mentioned technical problems.

[0005] According to one aspect of this disclosure, an iOS engineering update method is provided, comprising: The source files of the target project output by the development tool are compiled to obtain compiled files adapted for the iOS platform; The original resource files that the source file depends on in the development tool are converted into a format to obtain resource files adapted to the iOS platform; Generate a description file, which at least describes the version information of the target project; The compiled file, the resource file, and the description file are packaged into a release package, and the release package is provided to the iOS dependency management tool so that the iOS dependency management tool updates the iOS module corresponding to the target project in the target iOS project based on the release package, thereby making the version information of the iOS module consistent with that of the target project.

[0006] According to another aspect of this disclosure, an iOS engineering update apparatus is provided, comprising: The compilation unit is configured to compile the source files of the target project output by the development tools to obtain compiled files adapted to the iOS platform; The conversion unit is configured to convert the original resource files on which the source file depends in the development tool to obtain resource files adapted to the iOS platform. The generation unit is configured to generate a description file, which at least describes the version information of the target project; The update unit is configured to encapsulate the compiled file, the resource file, and the description file into a release package, and provide the release package to the iOS dependency management tool, so that the iOS dependency management tool updates the iOS module corresponding to the target project in the target iOS project based on the release package, thereby making the version information of the iOS module consistent with that of the target project.

[0007] According to another aspect of this disclosure, an electronic device is provided, comprising: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the methods described in the embodiments of this disclosure.

[0008] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are configured to cause the computer to perform the methods described in embodiments of this disclosure.

[0009] According to another aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the methods described in the embodiments of this disclosure.

[0010] This disclosure allows you to obtain source files output by development tools, compile them into iOS platform-compatible compiled files, convert the original resource files that the source files depend on to obtain iOS platform-compatible resource files, and generate a description file that at least describes the version information of the target project. Then, the compiled files, resource files, and description file are packaged into a distribution package and provided to the iOS dependency management tool, thereby realizing the process of automatically integrating source files into the iOS project, which helps to improve development efficiency.

[0011] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0012] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure.

[0013] Figure 1 This is a flowchart of the iOS project update method provided in this publication.

[0014] Figure 2 This is a schematic diagram illustrating the process of obtaining the compiled file provided in this publication.

[0015] Figure 3 This is a schematic diagram illustrating the process of obtaining resource files provided in this public document.

[0016] Figure 4 This is a schematic diagram illustrating the process of obtaining the release package provided in this public document.

[0017] Figure 5 This is a schematic diagram of a storage method provided in this disclosure.

[0018] Figure 6 This is a schematic block diagram of the iOS engineering update device provided in this disclosure.

[0019] Figure 7 This is a block diagram of an electronic device used to implement the iOS engineering update method of the embodiments of this disclosure. Detailed Implementation

[0020] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0021] The terminology used in the embodiments of this invention is for the purpose of describing particular embodiments only and is not intended to limit the invention. The singular forms “a,” “the,” and “the” as used in the embodiments of this invention and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0022] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0023] Depending on the context, the word "if" as used here can be interpreted as "when," "when," "in response to determination," or "in response to detection." Similarly, depending on the context, the phrase "if determination" or "if detection (of the stated condition or event)" can be interpreted as "when determination," "in response to determination," "when detection (of the stated condition or event)," or "in response to detection (of the stated condition or event)."

[0024] When developing applications, updating an iOS project typically requires manual intervention from developers. Specifically, the developer first obtains the source files of the target project from the development tool, then manually uses a compiler to compile the source files into a build file adapted for the iOS platform, which also generates resource files compatible with the target project. Subsequently, the developer manually drags and drops the compiled files and resource files into the iOS project to update it.

[0025] However, the above solution does not perform ideally when applied to update scenarios requiring frequent iterations. During the integration process from the source files of the target project to the target iOS project, the multiple discrete steps such as compilation, packaging, and configuration rely on manual connection and judgment. This makes it highly susceptible to human error, leading to discrepancies between the compiled file version referenced by the target iOS project and the actual released compiled file version, thus reducing the reliability and efficiency of the update process.

[0026] In view of this, this disclosure provides a new approach. Figure 1 This is a flowchart of an iOS engineering update method provided in an embodiment of this disclosure. This iOS engineering update method can be executed by an iOS engineering update device, which can be located on a server or on a computer terminal with strong computing power. Figure 1 As shown, the iOS engineering update method may include the following steps: Step 101: Compile the source files of the target project output by the development tool to obtain compiled files adapted to the iOS platform.

[0027] Step 102: Convert the original resource files that the source file depends on in the development tool to obtain resource files adapted to the iOS platform.

[0028] Step 103: Generate a description file, which is used to describe at least the version information of the target project.

[0029] Step 104: Package the compiled files, resource files, and description files into a release package, and provide the release package to the iOS dependency management tool so that the iOS dependency management tool can update the iOS module corresponding to the target project in the target iOS project based on the release package, thereby making the version information of the iOS module consistent with that of the target project.

[0030] As can be seen from the above process, this disclosure can obtain the source files output by the development tool, compile the source files into compiled files adapted to the iOS platform, convert the original resource files that the source files depend on into resource files adapted to the iOS platform, and generate a description file that at least describes the version information of the target project. Then, the compiled files, resource files and description files are packaged into a release package and provided to the iOS dependency management tool, thereby realizing the process of automatically integrating the source files into the iOS project, which helps to improve development efficiency.

[0031] The following describes in detail each step of the above process and the effects that can be further produced, with reference to the embodiments.

[0032] First, the above step 101, namely "compiling the source files of the target project output by the development tool to obtain compiled files adapted to the iOS platform", will be described in detail with reference to the embodiments.

[0033] In the embodiments of this disclosure, the source files of the target project output by the development tool are first obtained. Specifically, the development tool can listen for events, and when a new commit event is detected under the target project, all files corresponding to that commit event are automatically retrieved, including the source files and their dependent original resource files.

[0034] In this context, "development tools" refers to development frameworks, tools, or technology platforms used to write the business logic code of applications. For the iOS platform, development tools can produce source files containing executable code, which need to be integrated into the iOS project to enable updates to the iOS project. The development tools in this disclosure may include KMP (Kotlin Multiplatform), and may also include other similar or related development frameworks, tools, and technology platforms.

[0035] A target project is a delivery unit developed in the development tool for specific business logic. An application can contain multiple target projects, each of which is used to implement one or more functional modules in the application.

[0036] After obtaining the source files of the target project, such as Figure 2 As shown, the source files of the target project are compiled. Here, "compiled files" refers to computer files that are converted from source code and can be executed directly or indirectly on the iOS platform as machine instructions. Their specific form is not limited to ".xcframework" format files; they can also be ".framework" format files, ".a" format files, or any other file format that the iOS platform can recognize.

[0037] For example, if the development tool is KMP, the Gradle plugin of the development tool is triggered first, which then calls the Kotlin / Native compiler to compile the source code into machine code suitable for the iOS platform, i.e., the compiled file mentioned above (such as a file in the ".xcframework" format).

[0038] Compiled files adapted for the iOS platform are those that can be linked and executed by iOS projects in iOS dependency management tools. The compilation process can involve generating single dynamic or static libraries in ".framework" format, static library files in ".a" format, or binary targets compatible with the iOS platform's Swift Package Manager. All these solutions can achieve the function of converting the source files of the target project into compiled files that can be linked and executed by the iOS project.

[0039] The following describes in detail step 102, namely "converting the original resource files that the source file depends on in the development tool to obtain resource files adapted to the iOS platform," with reference to the embodiments.

[0040] First, such as Figure 3 As shown, the system can identify and collect the original resource files that the source files depend on during the compilation process. These original resource files are then converted to iOS platform specifications to obtain resource files adapted for the iOS platform. Specifically, the original resource files that the source files depend on in the development tool are copied, and the directory structure of the copied original resource files is converted to a directory structure adapted for the iOS platform to obtain the resource files.

[0041] By copying and reorganizing the directory structure of the original resource files to convert them into a resource organization form that conforms to the iOS platform specifications, the problem of iOS platform being unable to correctly identify and load resources due to differences in file directory structure during resource integration is solved, realizing automated and platform-adaptive processing of resource files.

[0042] As an example, the original resource files (such as images, fonts, JSON configuration files, and localized string files) that the source files depend on are usually stored in their original format in the "commonMain / resources" directory and its subdirectories. However, iOS applications typically access these original resource files at runtime through the "Bundle" class, and there are certain requirements for the directory structure of these original resource files. Directly integrating these original resource files into an iOS project may result in resource loading failures.

[0043] Therefore, the original resource files can be directly extracted from the "commonMain / resources" directory. Then, all the original resource files can be copied to the "Assets" directory, and the directory structure of the original resource files can be converted to a directory structure adapted to the iOS platform to match iOS resource access logic. In addition, the images in the original resource files can be converted from ".png" format to ".xcassets" format, and the fonts can be converted from ".json" format to ".strings" format. Finally, the entire "Assets" directory can be packaged into a single ".bundle" format file (such as "MyKmpSDK.bundle"). This ".bundle" format file is the resource file.

[0044] The following describes step 103, namely "generating a description file, the description file being used to describe at least the version information of the target project," in detail with reference to an embodiment.

[0045] In this embodiment of the application, a description file is generated. This description file is the key data that connects the target project with the iOS dependency management tool. The iOS dependency management tool can refer to software or system used to manage the dependencies of iOS projects. For example, it may include, but is not limited to, CocoaPods, Swift Package Manager, etc.

[0046] In an iOS scenario, a description file can refer to a file in ".podspec" format. This description file can be copied and modified from a pre-set template file, or it can be dynamically created. The description file is used to at least describe the version information of the target project. When the target project is subsequently integrated into the corresponding iOS module within the target iOS project, this ensures that the version information of the iOS module is consistent with the version information of the target project, thereby ensuring consistent releases.

[0047] One feasible approach is to obtain the current version information of the target project from the development tools, use this current version information as the target version information, and generate a description file based on the target version information. For example, read "version=1.2.3" from the target project's "build.gradle.kts" file; "1.2.3" is the current version information of the target project. Then, write the current version information "1.2.3" into the "s.version" field of the generated description file, i.e., "s.version=1.2.3".

[0048] As another possible approach, obtain the latest version information of the target project from the iOS dependency management tool, determine the target version information based on the latest version information, for example, if the latest version information is 1.0.0, then the target version information can be 1.0.1, and then generate a description file based on the target version information.

[0049] As another feasible approach, the latest version information of the target project in the iOS dependency management tool and the current version information of the target project in the development tool are obtained. Based on the latest version information and the current version information in the development tool, the target version information is determined, and a description file is generated based on the target version information.

[0050] By obtaining the latest version information of the target project from the iOS dependency management tool and comparing it with the current version information in the development tool, the target version information for this release is determined automatically. This not only avoids conflicts between the released version and existing versions and improves the accuracy of the target version information, but also reduces manual intervention and improves the efficiency of generating description files.

[0051] More specifically, both the latest version information and the current version information contain version representation information to indicate the development branch to which they belong. Based on the version representation information, it is determined whether the latest version information and the current version information represent the same development branch of the target project. Within the same development branch, the version representation information of the latest version information and the current version information is the same. Within different development branches, the version representation information of the latest version information and the current version information is different. For example, if both the latest version information and the current version information contain three-digit values ​​(such as 1.3.0), then the first two digits can refer to the version representation information (such as 1.3). As another example, if both the latest version information and the current version information contain four-digit values ​​(such as 1.3.0.1), then the first three digits can refer to the version representation information (such as 1.3.0).

[0052] If the latest version information and the current version information are used to represent the same development branch of the target project, then the target version information is determined based on the latest version information. For example, the last digit of the latest version information is incremented to obtain the target version information. If the latest version information and the current version information are not representing the same development branch of the target project, then the target version information is determined based on the current version information.

[0053] As a specific example, if the latest version information of the target project obtained from the iOS dependency management tool is "1.3.4", then the version representation information of the latest version information can be "1.3". If the current version information of the target project obtained from the development tool is "1.3.0-SNAPSHOT", then the version representation information of the current version information can be "1.3". If the version representation information of the latest version information and the current version information are the same, then the latest version information and the current version information are used to represent the same development branch of the target project. Then, the target version information is determined based on the latest version information. For example, the third digit of the latest version information "1.3.4" can be incremented by one to obtain the target version information "1.3.5".

[0054] As another specific example, if the latest version information of the target project obtained from the iOS dependency management tool is "1.3.4.5", then the version representation information of the latest version information can be "1.3.4". If the current version information of the target project obtained from the development tool is "1.4.0-beta", then the version representation information of the current version information can be "1.4.0". Since the version representation information of the latest version information and the current version information are different, the latest version information and the current version information do not represent the same development branch of the target project. Therefore, the target version information can be determined based on the current version information. For example, one more digit can be added to the version representation information of the current version information "1.4.0", that is, the value of the fourth digit is 0, to obtain the target version information "1.4.0.0".

[0055] By analyzing the version representation information in the latest version information and the current version information, the system automatically determines whether the latest version information and the current version information represent the same development branch, and uses different rules to determine the target version information accordingly. This avoids non-compliance issues caused by duplicate or skipped target version information, and improves the flexibility and rationality of the version management strategy.

[0056] In addition to the steps described above for determining the target version information, this disclosure can also maintain a table for recording the target version information of the target project. When generating the description file of the target project, the target version information previously inserted in the table can be queried first, and the target version information required for generating the description file this time can be determined based on the target version information previously inserted. For example, if the target version information determined last time was "1.4.2", the target version information determined this time could be "1.4.3".

[0057] The following describes in detail step 104, namely, "encapsulating the compiled files, resource files, and description files into a distribution package, and providing the distribution package to the iOS dependency management tool so that the iOS dependency management tool can update the iOS module corresponding to the target project in the target iOS project based on the distribution package, thereby making the version information of the iOS module consistent with that of the target project".

[0058] In the embodiments disclosed herein, such as Figure 4 As shown, the compiled files, resource files, and description files are packaged into a distribution package. The distribution package can refer to a distribution unit that packages the compiled files, resource files, and description files into one unit. For example, it can include, but is not limited to, ZIP archives, TAR archives, or any packaging format.

[0059] One feasible approach is to directly obtain the compiled files, resource files, and description files, and then package these three types of files to obtain a distribution package. Another feasible approach is to create a file directory corresponding to the distribution package, store the description files, compiled files, and resource files in this directory, and then package these files to obtain the distribution package. Here, the description file also describes the first file path within the file directory where the compiled files and resource files are stored.

[0060] By creating a file directory with a clear directory structure to store description files, compilation files, and resource files, and recording the paths of compilation files and resource files in the description files before packaging, a release package with a clear internal structure and complete path information is constructed. This ensures that the iOS dependency management tool can accurately parse the location and relationship of each component within the release package, providing the necessary data foundation for subsequent update processes.

[0061] For example, you can create a directory, such as named "MyKmpSDK-1.2.3", and then place the compiled files generated in step 101, the resource files generated in step 102, and the description files generated in step 103 into this directory according to a certain directory structure. Then, use a compression tool to package this directory into a ZIP file, such as "MyKmpSDK-1.2.3.zip". This ZIP file is the distribution package mentioned above.

[0062] After obtaining the release package, provide it to the iOS dependency management tool so that the iOS dependency management tool can update the iOS module corresponding to the target project in the target iOS project based on the release package, thereby making the version information of the iOS module consistent with that of the target project.

[0063] One possible approach is to first parse the description file from the release package, and then, based on the first file path in the file directory where the description file describes the compiled files and resource files, further obtain the compiled files and resource files from the release package, so that the iOS dependency management tool can update the iOS module corresponding to the target project in the target iOS project based on the compiled files and resource files.

[0064] For example, if the file directory is named "MyKmpSDK-1.2.3", and the compiled file (named A.xcframework) is located in the root directory or subdirectory "Frameworks" of this file directory, then the first file path of the compiled file is "MyKmpSDK-1.2.3 / A.xcframework" or "MyKmpSDK-1.2.3 / Frameworks / A.xcframework". The resource file (named A.bundle) is located in the root directory or subdirectory "Resources" of this file directory, then the first file path of the resource file is "MyKmpSDK-1.2.3 / A.bundle" or "MyKmpSDK-1.2.3 / Resources / A.bundle". Generally, the description file is located in the root directory of this file directory, and the description file records the first file paths of the compiled file and the resource file.

[0065] The existence of the first file path ensures that the internal relative path relationship remains unchanged no matter where the release package is unzipped, and the path pointing in the description file is always valid. That is, the iOS dependency management tool can obtain the compiled files and resource files based on the first file path.

[0066] As another feasible approach, to facilitate the management of distribution packages, such as... Figure 5 As shown, the compiled files and resource files in the release package can be stored in the first storage space provided by the iOS dependency management tool. Next, the first file path in the description file is updated to the second file path of the compiled files and resource files in the first storage space. Then, the description file is stored in the second storage space provided by the iOS dependency management tool.

[0067] In other words, by storing the compiled files and resource files from the release package in the first storage space, updating the description file accordingly, and then storing the updated description file in the second storage space, the system ensures that the second file path in the description file remains consistent with the actual storage location, guaranteeing the correctness of subsequent resolution chains. When multiple updates and iterations of the iOS module are required, it is easier to manage the compiled files, resource files, and description files corresponding to each update version, ensuring the accuracy of the iOS module update process.

[0068] Furthermore, the version information included in the dependency configuration file of the iOS module corresponding to the target project is updated to the target version information. Based on the target version information, the description file corresponding to the target version information is obtained from the second storage space. Based on the second file path in the description file, the compiled file and resource file in the first storage space are obtained. Based on the compiled file and resource file, the iOS module corresponding to the target project in the target iOS project is updated.

[0069] By first updating the version information in the dependency configuration file of the iOS module, then obtaining the corresponding description file based on the updated version information, and finally obtaining the compilation file and resource file based on the second file path in the description file to update the iOS module, an automated process of dependency lookup and integration strictly according to version information is achieved. This not only saves manpower but also effectively improves the reliability of the entire update process. In particular, it ensures that the iOS module of the target iOS project can accurately and automatically switch to the dependency of the target version information, maintaining the consistency of the version information between the iOS module and the target project.

[0070] As another feasible approach, the description file can be extracted from the distribution package first. Then, the distribution package without the description file (i.e., the distribution package only includes compiled files and resource files) is stored in the first storage space provided by the iOS dependency management tool. It should be noted that since this embodiment only extracts the description file and does not change the directory structure of the compiled files and resource files in the distribution package, the first file path in the description file does not need to be updated. When storing the distribution package without the description file in the first storage space, the third file path of the distribution package without the description file in the first storage space can be obtained (e.g., "https: / / XXX.XX / repo / MyKmpSDK / 1.2.3 / MyKmpSDK.zip"), and this third file path is written into the description file. Then, the description file is stored in the second storage space provided by the iOS dependency management tool.

[0071] Furthermore, the version information included in the dependency configuration file of the iOS module corresponding to the target project is updated to the target version information. Based on the target version information, the description file corresponding to the target version information is obtained from the second storage space. Based on the third file path in the description file, the release package in the first storage space is obtained. Then, based on the first file path in the description file, the compiled file and resource file are obtained from the release package. Based on the compiled file and resource file, the iOS module corresponding to the target project in the target iOS project is updated.

[0072] To ensure effective updates and the absence of integration errors, after updating the target iOS project, the corresponding iOS application installation package is generated in response to the packaging command for the target iOS project. For example, after updating the iOS module corresponding to the target project within the iOS project, the "xcodebuild" command (i.e., the packaging command) can be executed to archive the target iOS project, attempting to generate an iOS application installation package in ".xcarchive" and the final ".ipa" format.

[0073] By automatically responding to packaging instructions after dependency updates to generate iOS application installation packages, the build verification process is seamlessly integrated into the automated workflow. This allows for immediate verification of whether the dependency update was successfully integrated, providing real-time quality feedback on the automated update results and improving the integrity of the entire process.

[0074] Next, this disclosure can also obtain the execution result of the packaging command after each execution of the packaging command. If the execution result is packaging failure, the version information included in the dependency configuration file in the iOS dependency management tool will be adjusted to the version information before the target version information is updated.

[0075] In other words, if the packaging fails, the version information included in the dependency configuration file can be rolled back to the state before the update. Simultaneously, a notification can be sent to the developers to inform them of the integration failure. This approach enables rapid response and automatic repair of faults, minimizing the impact of faulty versions on the development or testing environment and significantly improving the robustness and reliability of the update process.

[0076] To provide more flexible and robust version management capabilities, in one optional embodiment, the iOS dependency management tool maintains a version change log. This log records changes to the version information of each iOS module within the target iOS project. For example, the version change log records the version information of a specific iOS module and the corresponding update time. Then, in response to a version rollback command in the development tool, the version information in the dependency configuration file is adjusted to the historical version information in the version change log pointed to by the rollback command.

[0077] The version change log here can be a specially maintained database or file. When a rollback is required, in response to a version rollback command (such as specifying to roll back an iOS module to a historical version at a certain point in time or a specific historical version), the historical version information corresponding to the iOS module is determined from the version change log based on the version rollback command. The version information included in the iOS module's dependency configuration file is then updated to the historical version information. Based on the historical version information, the description file corresponding to the historical version information is retrieved from the second storage space. Based on the second file path in the description file, the compiled file and resource file corresponding to the historical version information in the first storage space are retrieved. Based on the compiled file and resource file, the iOS module is updated, that is, the iOS module is rolled back to the version corresponding to the historical version information.

[0078] By maintaining a version change log, each iOS module in the target iOS project can be precisely rolled back to any specified historical version. Compared to rolling back after a packaging failure, this solution provides more flexible and powerful version management capabilities, enhancing the operability of handling complex release scenarios and proactive version management.

[0079] It should be noted that, as an optional embodiment, during the process of uploading the release package, the description file in the release package is first extracted, and the release package without the description file is stored in the first storage space provided by the iOS dependency management tool. Then, the third file path of the release package without the description file in the first storage space is obtained, and the third file path is written into the description file. Then, the description file is stored in the second storage space provided by the iOS dependency management tool.

[0080] During the subsequent generation of the iOS application installation package, the version information in the dependency configuration file of the iOS module corresponding to the target project is updated to the target version information. Based on the target version information, the description file corresponding to the target version information is obtained from the second storage space. Based on the third file path in the description file, the distribution package in the first storage space is obtained and added to the iOS project. When the packaging command is executed on the iOS project later, the Xcode project file of the iOS module is automatically modified based on the second file path in the description file and the distribution package to successfully reference the compiled files and resource files during the packaging process, thereby generating the iOS application installation package.

[0081] Next, a complete embodiment will be used to illustrate this solution: obtain the source files of the target project output by the development tool, compile the source files to obtain compiled files adapted to the iOS platform, and convert the original resource files that the source files depend on in the development tool to obtain resource files adapted to the iOS platform.

[0082] Then, obtain the latest version information of the target project from the iOS dependency management tool and the current version information from the development tool. Based on the latest version information and the current version information, determine the target version information and generate a description file based on the target version information.

[0083] Create a file directory to store the description file, compilation file, and resource file. The description file also describes the first file path in the file directory where the compilation file and resource file are stored.

[0084] The description file, compiled file, and resource file in the file directory are packaged to obtain a release package. The compiled file and resource file in the release package are stored in the first storage space provided by the iOS dependency management tool. The first file path in the description file is updated to the second file path of the compiled file and resource file in the first storage space. Then, the updated description file is stored in the second storage space provided by the iOS dependency management tool.

[0085] When updating the iOS project, the version information in the dependency configuration file of the iOS module corresponding to the target project is updated to the target version information. Based on the target version information, the description file is obtained from the second storage space. Based on the second file path in the description file, the compiled files and resource files in the first storage space are obtained. Based on the compiled files and resource files, the iOS module corresponding to the target project in the target iOS project is updated.

[0086] The iOS project update method disclosed herein can be used for application feature iteration. For example, for feature A of an application, the developer implements a fix for feature A by modifying the corresponding code in the development tool. Next, the development tool can output the source file of feature A. With the source file of feature A, the fixed feature A can be integrated into the iOS project corresponding to the application using the iOS project update method disclosed herein. Then, the iOS project is packaged to obtain the installation package of the application. The installation package can then be uploaded to the App Store so that users can download the installation package to use the application.

[0087] Furthermore, for an application, there can be multiple functional modules (such as multiple iOS modules in a target iOS project). Each iOS module corresponds to a different target project in the development tool. If it is necessary to update multiple iOS modules and package them into an iOS application installation package at the same time, the iOS project update method in this disclosure can be called repeatedly during the update phase. Based on the source files of the target project corresponding to each iOS module that needs to be updated in the target iOS project, each iOS module that needs to be updated is updated to obtain the updated target iOS project. Then, the target iOS project is packaged to finally generate an iOS application installation package.

[0088] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0089] The foregoing has described specific embodiments of this disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0090] According to another embodiment, an iOS engineering update apparatus is provided. Figure 6 A schematic block diagram of the iOS engineering update apparatus according to one embodiment is shown. Figure 6 As shown, the iOS engineering update device 600 includes a compilation unit 601, a conversion unit 602, a generation unit 603, and an update unit 604, and further includes a packaging unit 605 and a rollback unit 606. The main functions of each component are as follows: Compilation unit 601 is configured to compile the source files of the target project output by the development tool to obtain compiled files adapted to the iOS platform.

[0091] The conversion unit 602 is configured to convert the original resource files that the source file depends on in the development tool to obtain resource files adapted to the iOS platform.

[0092] The generation unit 603 is configured to generate a description file, which is used to describe at least the version information of the target project.

[0093] Update unit 604 is configured to encapsulate the compiled files, resource files, and description files into a release package, and provide the release package to the iOS dependency management tool, so that the iOS dependency management tool can update the iOS module in the target iOS project corresponding to the target project based on the release package, thereby making the version information of the iOS module consistent with that of the target project.

[0094] As one possible implementation method, the generation unit 603 can be specifically configured to: obtain the latest version information of the target project in the iOS dependency management tool; determine the target version information based on the latest version information and the current version information in the development tool; and generate the description file based on the target version information.

[0095] One possible approach is to include version representation information in both the latest version information and the current version information to indicate the development branch to which it belongs.

[0096] When determining the target version information based on the latest version information and the current version information in the development tool, the generation unit 603 can be specifically configured as follows: based on the version representation information, determine whether the latest version information and the current version information represent the same development branch of the target project; if so, determine the target version information based on the latest version information; if not, determine the target version information based on the current version information.

[0097] As one possible implementation method, when the update unit 604 encapsulates the compiled files, resource files, and description files into a release package, it can be specifically configured as follows: creating a file directory corresponding to the release package, and storing the description files, compiled files, and resource files in the file directory. The description file is also used to describe the first file path where the compiled files and resource files are stored in the file directory; packaging the description files, compiled files, and resource files in the file directory to obtain the release package.

[0098] As one possible implementation method, after providing the release package to the iOS dependency management tool, the update unit 604 can also be configured to: store the compiled files and resource files in the release package to the first storage space provided by the iOS dependency management tool; update the first file path in the description file to the second file path of the compiled files and resource files in the first storage space; and store the description file to the second storage space provided by the iOS dependency management tool.

[0099] As one possible implementation method, when the iOS dependency management tool updates the iOS module corresponding to the target project in the target iOS project based on the release package, the update unit 604 can be specifically configured to: update the version information included in the dependency configuration file of the iOS module corresponding to the target project to the target version information; obtain the description file from the second storage space based on the target version information; obtain the compiled files and resource files in the first storage space based on the second file path in the description file, and update the iOS module corresponding to the target project in the target iOS project based on the compiled files and resource files.

[0100] Furthermore, after updating the iOS module corresponding to the target project in the target iOS project, the packaging unit 605 can be specifically configured to generate the iOS application installation package corresponding to the target iOS project in response to the packaging instruction for the target iOS project.

[0101] As one possible implementation method, the rollback unit 606 can be specifically configured to: obtain the execution result of the packaging instruction; if the execution result is packaging failure, adjust the version information in the dependency configuration file to the version information before updating based on the target version information.

[0102] As one possible approach, iOS dependency management tools maintain version change logs, which record changes in the version information of each iOS module in the target iOS project.

[0103] Rollback unit 606 can also be configured to: in response to a version rollback command in the development tools, adjust the version information in the dependency configuration file to the historical version information in the version change log pointed to by the version rollback command.

[0104] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0105] Figure 7 A schematic block diagram of an example electronic device 700 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0106] like Figure 7As shown, device 700 includes a computing unit 701, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 702 or a computer program loaded into random access memory (RAM) 703 from storage unit 708. The RAM 703 may also store various programs and data required for the operation of device 700. The computing unit 701, ROM 702, and RAM 703 are interconnected via bus 704. Input / output (I / O) interface 705 is also connected to bus 704.

[0107] Multiple components in device 700 are connected to I / O interface 705, including: input unit 706, such as keyboard, mouse, etc.; output unit 707, such as various types of monitors, speakers, etc.; storage unit 708, such as disk, optical disk, etc.; and communication unit 709, such as network card, modem, wireless transceiver, etc. Communication unit 709 allows device 700 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0108] The computing unit 701 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 701 performs the various methods and processes described above, such as the IOS engineering update method. For example, in some embodiments, the IOS engineering update method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on device 700 via ROM 702 and / or communication unit 709. When the computer program is loaded into RAM 703 and executed by the computing unit 701, one or more steps of the IOS engineering update method described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform the IOS engineering update method by any other suitable means (e.g., by means of firmware).

[0109] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0110] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0111] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0112] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0113] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0114] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.

[0115] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0116] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. An iOS project update method, comprising: The source files of the target project output by the development tool are compiled to obtain compiled files adapted for the iOS platform; The original resource files that the source file depends on in the development tool are converted into a format to obtain resource files adapted to the iOS platform; Generate a description file, which at least describes the version information of the target project; The compiled file, the resource file, and the description file are packaged into a release package, and the release package is provided to the iOS dependency management tool so that the iOS dependency management tool updates the iOS module corresponding to the target project in the target iOS project based on the release package, thereby making the version information of the iOS module consistent with that of the target project.

2. The method according to claim 1, wherein, The generation of the description file includes: Obtain the latest version information of the target project from the iOS dependency management tool; Based on the latest version information and the current version information in the development tool, the target version information is determined; A description file is generated based on the target version information.

3. The method according to claim 2, wherein, Both the latest version information and the current version information contain version representation information indicating the development branch to which they belong. Determining the target version information based on the latest version information and the current version information in the development tool includes: Based on the version representation information, determine whether the latest version information and the current version information represent the same development branch of the target project; If so, the target version information is determined based on the latest version information; If not, the target version information is determined based on the current version information.

4. The method according to claim 1, wherein, The step of encapsulating the compiled file, resource file, and description file into a distribution package includes: Create a file directory corresponding to the release package, and store the description file, the compilation file and the resource file in the file directory. The description file is also used to describe the first file path under the file directory where the compilation file and the resource file are stored. The description file, the compilation file, and the resource file in the file directory are packaged to obtain the release package.

5. The method according to claim 4, further comprising, after providing the release package to the iOS dependency management tool: The compiled files and resource files in the release package are stored in the first storage space provided by the iOS dependency management tool; Update the first file path in the description file to the second file path of the compiled file and the resource file in the first storage space; The description file is stored in the second storage space provided by the IOS dependency management tool.

6. The method according to claim 5, wherein, The iOS dependency management tool updates the iOS modules corresponding to the target project in the target iOS project based on the release package, including: Update the version information included in the dependency configuration file of the IOS module corresponding to the target project to the target version information; The description file is obtained from the second storage space based on the target version information; Based on the second file path in the description file, the compiled file and the resource file in the first storage space are obtained, and based on the compiled file and the resource file, the IOS module corresponding to the target project in the target IOS project is updated.

7. The method according to claim 6, after updating the iOS module corresponding to the target project in the target iOS project, the method further includes: In response to the packaging instruction for the target iOS project, an iOS application installation package corresponding to the target iOS project is generated.

8. The method according to claim 7, further comprising: Obtain the execution result of the packaging instruction. If the execution result is packaging failure, adjust the version information in the dependency configuration file to the version information before the target version information is updated.

9. The method according to any one of claims 1-8, wherein, The iOS dependency management tool maintains a version change log, which records changes in the version information of each iOS module in the target iOS project. The method further includes: In response to the version rollback command in the development tool, the version information in the dependency configuration file is adjusted to the historical version information in the version change log pointed to by the version rollback command.

10. The method according to any one of claims 1-9, wherein, The step of converting the original resource files that the source file depends on in the development tool to obtain target resource files adapted to the iOS platform includes: The source file is copied from the original resource files that the development tool depends on, and the directory structure of the copied original resource files is converted into a directory structure adapted to the iOS platform to obtain the resource file.

11. An iOS engineering update device, comprising: The compilation unit is configured to compile the source files of the target project output by the development tools to obtain compiled files adapted to the iOS platform; The conversion unit is configured to convert the original resource files on which the source file depends in the development tool to obtain resource files adapted to the iOS platform. The generation unit is configured to generate a description file, which at least describes the version information of the target project; The update unit is configured to encapsulate the compiled file, the resource file, and the description file into a release package, and provide the release package to the iOS dependency management tool, so that the iOS dependency management tool updates the iOS module corresponding to the target project in the target iOS project based on the release package, thereby making the version information of the iOS module consistent with that of the target project.

12. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method of any one of claims 1-10.

13. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-10.

14. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-10.