SDK (Software Development Kit) integration method and device, computer equipment, readable storage medium and program product
By displaying the selection interface for SDK controls and platform controls, a release package adapted to the target platform is automatically generated, solving the problems of time-consuming, labor-intensive, and error-prone traditional SDK integration, and realizing an efficient and error-free SDK integration process.
Patent Information
- Application Number
- CN202511078494.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-01
- Publication Date
- 2025-11-11
AI Technical Summary
Traditional SDK integration methods are time-consuming, labor-intensive, error-prone, and inefficient.
By selecting the platform to be published and the SDK control to be integrated through the display selection interface, the library files and configuration files are obtained, and a release package adapted to the target platform is automatically generated, including permission declarations, service declarations and initialization parameters, and library conflicts are automatically handled.
It improves SDK integration efficiency, reduces manual configuration workload, lowers the risk of configuration errors, and enables convenient cross-platform development.
Smart Images

Figure CN120929068A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to an SDK integration method, apparatus, computer device, readable storage medium, and program product. Background Technology
[0002] An SDK (Software Development Kit) is a collection of development tools used by developers to create application software for specific software packages, software frameworks, hardware platforms, operating systems, etc.
[0003] In traditional technologies, when developing application software (such as game applications) or integrating with external services (such as advertising, login, and payment), development engineers manually complete the integration operations such as downloading, configuring, and integrating multiple SDKs. This SDK integration method is not only time-consuming and labor-intensive, but also prone to errors, and in short, it is relatively inefficient. Summary of the Invention
[0004] Therefore, it is necessary to provide an SDK integration method, apparatus, computer device, readable storage medium, and program product that can improve efficiency in response to the above-mentioned technical problems.
[0005] In a first aspect, this application provides an SDK integration method, which includes: displaying a selection interface, the selection interface displaying platform controls corresponding to multiple platforms to be published and SDK controls corresponding to multiple SDKs to be integrated; in response to the selection operation of each target SDK control among the multiple SDK controls, obtaining the library file of the target SDK corresponding to each target SDK control; in response to the selection operation of the target platform control among the multiple platform controls, generating a configuration file adapted to the target platform; and obtaining a target release package that can be published on the target platform based on the library file and configuration file of each target SDK.
[0006] In one embodiment, in response to a selection operation of a target platform control among multiple platform controls, a configuration file adapted to the target platform is generated, including: in response to a selection operation of a target platform control among multiple platform controls, obtaining an initial configuration file adapted to the target platform; adding configuration items related to each target SDK to the initial configuration file to obtain a configuration file adapted to the target platform; the configuration items include at least one of permission declarations, service declarations, and initialization parameters.
[0007] In one embodiment, obtaining a target release package that can be published on the target platform based on the library files and configuration files of each target SDK includes: adding the library files and configuration files of each target SDK to the project file; adding the target code required by each target SDK to the project file; the target code includes at least one of interface call code, callback handling code, and lifecycle management code; and obtaining a target release package that can be published on the target platform based on the added project file.
[0008] In one embodiment, the project file includes business logic code; the interface in the business logic code that calls the target SDK is a generic interface; the method further includes: when compiling the business logic code, converting the generic interface in the business logic code that calls the target SDK into the target interface corresponding to the target platform.
[0009] In one embodiment, a target release package that can be published on the target platform is obtained based on the added project files, including: performing library conflict detection on the added project files; when a library conflict is detected, adjusting the added project files based on a preset strategy to obtain a target release package that can be published on the target platform.
[0010] In one embodiment, the project file includes a build script and packaging parameters; based on the added project file, a target release package that can be published on the target platform is obtained, including: adjusting the build script and packaging parameters in the added project file based on the target platform to obtain an adjusted project file; and based on the adjusted project file, a target release package that can be published on the target platform is obtained.
[0011] Secondly, this application also provides an SDK integration device, comprising:
[0012] The display module is used to show the selection interface, which displays platform controls for multiple platforms to be released and SDK controls for multiple SDKs to be integrated.
[0013] The acquisition module is used to respond to the selection operation of each target SDK control in multiple SDK controls and to obtain the library file of the target SDK corresponding to each target SDK control;
[0014] The generation module is used to generate a configuration file adapted to the target platform in response to the selection operation of the target platform control among multiple platform controls;
[0015] The determination module is used to determine the target release package that can be published on the target platform based on the library files and configuration files of each target SDK.
[0016] In one embodiment, the generation module is specifically configured to, in response to a selection operation of a target platform control among multiple platform controls, obtain an initial configuration file adapted to the target platform; add configuration items related to each target SDK to the initial configuration file to obtain a configuration file adapted to the target platform; the configuration items include at least one of permission declarations, service declarations, and initialization parameters.
[0017] In one embodiment, the determining module is specifically used to add the library files and configuration files of each target SDK to the project file; add the target code required by each target SDK to the project file; the target code includes at least one of interface call code, callback processing code and lifecycle management code; and based on the added project file, obtain the target release package that can be published on the target platform.
[0018] In one embodiment, the project file includes business logic code; the interface in the business logic code that calls the target SDK is a generic interface; the device further includes a conversion module, used to convert the generic interface in the business logic code that calls the target SDK into the target interface corresponding to the target platform when compiling the business logic code.
[0019] In one embodiment, the determining module is specifically used to perform library conflict detection on the added project files; when a library conflict is detected, the added project files are adjusted based on a preset strategy to obtain a target release package that can be published on the target platform.
[0020] In one embodiment, the project file includes a build script and packaging parameters; a determination module is specifically used to adjust the build script and packaging parameters in the added project file based on the target platform to obtain an adjusted project file; and based on the adjusted project file, a target release package that can be published on the target platform is obtained.
[0021] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method described in any one of the first aspects above.
[0022] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any one of the first aspects above.
[0023] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method described in any of the above claims.
[0024] The aforementioned SDK integration method, apparatus, computer equipment, readable storage medium, and program product, by displaying a selection interface showing platform controls corresponding to multiple platforms to be published and SDK controls corresponding to multiple SDKs to be integrated, can obtain the library files of the target SDKs corresponding to each target SDK control in response to the selection operation of each target SDK control. In response to the selection operation of a target platform control in response to the selection operation of multiple platform controls, a configuration file adapted to the target platform is generated. Based on the library files and configuration files of each target SDK, a target release package that can be published on the target platform is obtained. Thus, developers only need to select the target SDK to be integrated and the target platform to be published on to obtain a target release package that can be published on the target platform, eliminating the need for manual integration and improving SDK integration efficiency. Attached Figure Description
[0025] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0026] Figure 1 This is a flowchart illustrating an SDK integration method in one embodiment;
[0027] Figure 2 This is a flowchart illustrating the SDK integration method in another embodiment;
[0028] Figure 3 This is a flowchart illustrating the SDK integration method in yet another embodiment;
[0029] Figure 4 This is a structural block diagram of an SDK integration device in one embodiment;
[0030] Figure 5 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0031] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0032] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.
[0033] In one exemplary embodiment, such as Figure 1 As shown, an SDK integration method is provided. Taking the application of this method to an SDK integration management platform as an example, the SDK integration management platform is deployed on a computer device. The SDK integration method includes the following steps 101-104, wherein:
[0034] Step 101: Display the selection interface. The selection interface displays platform controls corresponding to multiple platforms to be released and SDK controls corresponding to multiple SDKs to be integrated.
[0035] Among these, several platforms awaiting release include Android, iOS, and various app stores. SDKs to be integrated refer to functional components that can be selected for integration into the application during the current application development process, such as push notification components, login components, payment components, customer service components, and advertising components.
[0036] Both platform controls and SDK controls are visual components used by developers to interact with software. Different platform controls represent different platforms to be released, and different SDK controls represent different SDKs to be integrated.
[0037] In one example, after detecting a startup trigger operation for the SDK integration management platform, the computer device runs the code program corresponding to the SDK integration management platform and displays the selection interface on the computer device.
[0038] Step 102: In response to the selection operation of each target SDK control among multiple SDK controls, obtain the library file of the target SDK corresponding to each target SDK control.
[0039] The selection operation of the target SDK control by the developer includes, but is not limited to, single-click, double-click, and long-press operations. After the developer selects the target SDK control, the computer device performs a download operation on the library file of the target SDK corresponding to the target SDK control, thereby obtaining the library file of the target SDK corresponding to the target SDK control. During the download operation, the latest version of the target SDK library file may be downloaded.
[0040] It's understandable that, in addition to downloading the library files of the target SDK corresponding to each target SDK control, it's also necessary to download the library files of the dependent SDKs of each target SDK. The dependent SDKs of a target SDK can be obtained by querying the target SDK's library files.
[0041] In one example, after detecting that multiple target SDK controls have been selected, the computer device downloads the latest version of the target SDK library file for each target SDK control, as well as the library files of the dependent SDKs corresponding to each target SDK.
[0042] Step 103: In response to the selection operation of the target platform control among multiple platform controls, generate a configuration file adapted to the target platform.
[0043] Among them, the selection operation of the target platform control by the developer includes, but is not limited to, single click, double click and long press. After the developer selects the target platform control, the computer device generates a configuration file adapted to the target platform according to the target platform corresponding to the target platform control.
[0044] For example, if the target platform is Android, the generated configuration files include the Android application's manifest file (AndroidManifest.xml) and Gradle / Maven configuration files; if the target platform is iOS, the generated configuration files include the iOS application's property list file (Info.plist) and Podfile configuration files. These configuration files are used to describe the application's metadata, configure dependencies, define the build process, etc., to ensure that the application can be built, run, and deployed correctly.
[0045] Step 104: Based on the library files and configuration files of each target SDK, obtain the target release package that can be published on the target platform.
[0046] In one example, the library files of each target SDK, the library files of its corresponding dependent SDKs, and configuration files are added to the project file. Then, adjustments are made to the project file to obtain a target release package that can be published on the target platform. These adjustments include, for example, selecting compatible versions or using version isolation techniques if library conflicts exist.
[0047] In the SDK integration method described above, a selection interface is displayed, showing platform controls corresponding to multiple platforms to be published and SDK controls corresponding to multiple SDKs to be integrated. In response to the selection of each target SDK control among the multiple SDK controls, the library files of the target SDK corresponding to each target SDK control are obtained. In response to the selection of a target platform control among the multiple platform controls, a configuration file adapted to the target platform is generated. Based on the library files and configuration files of each target SDK, a target release package that can be published on the target platform is obtained. Thus, developers only need to select the target SDK to be integrated and the target platform to be published on to obtain a target release package that can be published on the target platform, eliminating the need for manual integration and improving SDK integration efficiency.
[0048] In one embodiment, such as Figure 2 As shown, another SDK integration method is provided. In response to a selection operation of a target platform control among multiple platform controls, a configuration file adapted to the target platform is generated, including steps 201 and 202, wherein...
[0049] Step 201: In response to the selection operation of the target platform control among multiple platform controls, obtain the initial configuration file adapted to the target platform.
[0050] The initial configuration file adapted to the target platform is a template configuration file adapted to the target platform.
[0051] In one example, multiple template configuration files for different platforms are pre-created. Each template configuration file contains the most basic structure and content required for that platform. After the developer selects the target platform control, the computer device searches for the corresponding template configuration file from the multiple template configuration files based on the target platform of the control, thus obtaining an initial configuration file adapted to the target platform.
[0052] Step 202: Add configuration items related to each target SDK to the initial configuration file to obtain a configuration file adapted to the target platform. The configuration items include at least one of the following: permission declaration, service declaration, dependency declaration, and initialization parameters. Among them, the dependency declaration explicitly declares other SDKs that the SDK depends on and their version range, thereby realizing dependency management.
[0053] In one example, the system queries the metadata database of each target SDK for corresponding configuration item information, such as permission declarations, service declarations, dependency declarations, and initialization parameters. The retrieved configuration item information is then formatted into a string, and this formatted string is appended to the string in the initial configuration file. For example, the permission declaration string can be appended to... <manifest>At the end of the tag, you'll find the configuration file adapted to the target platform.
[0054] In this embodiment, configuration files are automatically generated, which greatly reduces the workload of developers in manually configuring them, improves development efficiency, and reduces the risk of configuration errors.
[0055] In one embodiment, such as Figure 3 As shown, another SDK integration method is provided. Based on the library files and configuration files of each target SDK, a target distribution package capable of being published on the target platform is obtained, including the following steps 301-303, wherein:
[0056] Step 301: Add the library files and configuration files of each target SDK to the project file.
[0057] The project file is a collection of files used to build the application, which includes business logic code, build scripts, resource files, dependency library files, project management files, etc.
[0058] In one example, the library files of each target SDK, the library files of the corresponding dependent SDKs of each target SDK, and the configuration files are copied or linked to the corresponding directories in the project file.
[0059] Step 302: Add the target code required by each target SDK to the project file; the target code includes at least one of interface call code, callback handling code, and lifecycle management code.
[0060] The API call code is used to call various API interfaces provided by the SDK, such as initializing the SDK, requesting advertisements, and initiating payments. The callback handling code is used to handle the results of asynchronous SDK operations, such as successful advertisement requests, successful payments, and push notifications. The lifecycle management code is used to call the corresponding methods provided by the SDK during application lifecycle events (such as application startup, application exit, Activity creation, and Activity destruction) so that the SDK can correctly initialize and release resources and handle various states.
[0061] In one example, copy the API call code, callback handling code, and lifecycle management code required by each target SDK to the appropriate locations in the project file.
[0062] Step 303: Based on the added project files, obtain the target release package that can be published on the target platform.
[0063] In one example, adjustments are made to the added project files to obtain a target release package that can be published on the target platform. These adjustments include, for example, selecting compatible versions or using version isolation techniques if library conflicts exist.
[0064] In this embodiment, developers only need to add a very small amount of initialization code (such as 1-3 lines) in the key locations of the project file (such as the application startup entry point), and the computer device will automatically add the target code required by the target SDK to the corresponding location in the project file. This avoids developers having to manually write a large amount of code, greatly improves development efficiency, and reduces the risk of errors.
[0065] In one embodiment, the project file includes business logic code; the interface in the business logic code that calls the target SDK is a generic interface; the method further includes: when compiling the business logic code, converting the generic interface in the business logic code that calls the target SDK into the target interface corresponding to the target platform.
[0066] In other words, the SDK integration management platform provides a unified, platform-independent, universal API (Application Programming Interface). Developers only need to call these universal interfaces, and the computer device will automatically map them to the actual calls of the corresponding platform SDK during compilation or runtime, thus shielding platform differences.
[0067] In this embodiment, developers only need to call the general interface. The computer device will automatically convert these general interfaces into specific calls of the corresponding platform's SDK during compilation, thereby achieving the goal of cross-platform development and reducing the learning cost and workload for developers. This also achieves "write once, run on multiple platforms," reducing the complexity of cross-platform development.
[0068] In one embodiment, a target release package that can be published on the target platform is obtained based on the added project files, including: performing library conflict detection on the added project files; when a library conflict is detected, adjusting the added project files based on a preset strategy to obtain a target release package that can be published on the target platform.
[0069] Library conflicts include version conflicts, class name conflicts, and resource conflicts. Version conflicts occur when different SDKs depend on different versions of the same library; for example, SDK_A depends on Library_X1.0, while SDK_B depends on Library_X2.0. Class name conflicts occur when different libraries contain the same class name; resource conflicts occur when different libraries contain resource files with the same name.
[0070] In one example, library conflict detection should encompass all library files in the project files. For instance, it should check for version compatibility of all dependent SDK library files in the project files; if different SDKs depend on different versions of the same library and these versions are incompatible, a version conflict exists. It should also scan all library files in the project files to check for identical class names; if identical class names exist, a class name conflict exists. Furthermore, it should scan all resource files in the project files to check for identical filenames and file paths; if identical filenames and file paths exist, a resource conflict exists. Finally, it should check for duplicate dependent SDK library text.
[0071] Preset strategies include version arbitration, version isolation, library rewriting, and adding different prefixes to resource text for resource conflicts.
[0072] In one embodiment, the project file includes a build script and packaging parameters; based on the added project file, a target release package that can be published on the target platform is obtained, including: adjusting the build script and packaging parameters in the added project file based on the target platform to obtain an adjusted project file; and based on the adjusted project file, a target release package that can be published on the target platform is obtained.
[0073] The build script is a set of instructions used to automate the process of transforming source code, resource files, and other dependencies into an executable application. It defines how to compile, link, process resources, and perform other necessary tasks to create the intermediate artifacts of the application. Packaging parameters are a set of configuration information that specifies how the built application is packaged into a final, releasable file. They define the application's metadata, signing information, permission requirements, component configurations, etc. Different platforms have different requirements for build scripts and packaging parameters; therefore, the build script and packaging parameters need to be adjusted according to the target platform (i.e., the target distribution channel) to meet the channel requirements.
[0074] The project file includes the build script and packaging parameters, which is understandable; the added project file will also include the build script and packaging parameters.
[0075] In this embodiment, the build script and packaging parameters are adjusted based on the target platform to generate a target release package that can be published on the target platform. This achieves automatic adaptation to different release channels, allowing developers to easily publish their applications to various app stores.
[0076] The target SDKs mentioned above come in several forms, as detailed below:
[0077] 1. Basic Operational Components: Provides unified API implementations for in-app sharing (text / image / link), launching the system browser to open a URL, calling the system email client to send emails, and displaying the in-app privacy policy / user agreement page, etc. Unified API design, and encapsulation and integration with the platform's native capabilities.
[0078] 2. Tool Components: Provides a unified API to obtain: application version number, device system version, device local language / region, trigger device vibration feedback, and secure areas for adapting to irregularly shaped screens (notch screens / punch-hole screens), etc. It abstracts device information and encapsulates secure calls to hardware functions (vibration).
[0079] 3. Game Statistics Component: Provides a unified API for reporting in-game events (launch, level, payment, custom events, etc.), automatically handles user identification, session tracking, and data pre-aggregation. The event reporting interface is standardized, and data preprocessing and user identification management are implemented.
[0080] 4. Advertising Components: Integrates with mainstream advertising platforms (such as AdMob, UnityAds, MetaAudienceNetwork, etc.), providing a unified API for loading and displaying interstitial ads, rewarded video ads, and banner ads. Automatically handles ad lifecycle, callbacks, and error handling. Aggregates and abstracts multiple advertising platforms, automating the management of ad loading and display logic.
[0081] 5. In-App Purchase Component: Provides a unified API implementation for product search, purchase initiation, subscription management, and purchase voucher verification (supporting local or server-side verification). Handles payment process and receipt differences across different platforms. Standardizes cross-platform payment interfaces, encapsulates payment processes, and handles receipt verification.
[0082] 6. Advanced Operational Strategy: Provides a backend configuration interface and client SDK to enable: dynamic control of in-game activity on / off / content, real-time adjustment of level difficulty parameters, A / B testing, and hot-updating of configurations. Emphasis is placed on dynamic features and remote configuration capabilities. Remote configuration and hot-updating mechanisms, and interfaces for dynamic adjustment of game parameters are included.
[0083] 7. Push Component: Provides unified API processing: local notification scheduling and triggering, receiving remote push notifications (integrated with FCM / APNs channels, etc.). Handles notification permission requests, token management, and click event callbacks. Unified push message model, underlying integration and management of multiple push channels.
[0084] 8. Login Component: Provides unified API integration for mainstream third-party logins. Manages login status, user information retrieval, and token refresh. Aggregates multiple login methods, encapsulates the authentication process, and standardizes user information.
[0085] 9. Customer Service Component: Provides unified API access to common customer service systems (such as Zendesk, self-built ticket systems, etc.), supporting in-app chat interfaces, help center redirects, and issue submissions. Standardized customer service system interfaces enable rapid integration of the in-app customer service interface.
[0086] 10. Guilds & Leaderboards: Provides a unified API for player guild creation / management / joining / leaving, and the display and updating of leaderboards (friends leaderboard / global leaderboard / guild leaderboard) based on game data. This typically requires backend service support. Social function interfaces are standardized, and leaderboard data management logic is encapsulated.
[0087] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0088] Based on the same inventive concept, this application also provides an SDK integration apparatus for implementing the SDK integration method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more SDK integration apparatus embodiments provided below can be found in the limitations of the SDK integration method described above, and will not be repeated here.
[0089] In one exemplary embodiment, such as Figure 4 As shown, an SDK integration device 400 is provided, comprising: a display module 401, an acquisition module 402, a generation module 403, and a determination module 404, wherein:
[0090] The display module 401 is used to display the selection interface, which displays platform controls corresponding to multiple platforms to be released and SDK controls corresponding to multiple SDKs to be integrated.
[0091] The acquisition module 402 is used to acquire the library file of the target SDK corresponding to each target SDK control in response to the selection operation of each target SDK control among multiple SDK controls;
[0092] The generation module 403 is used to generate a configuration file adapted to the target platform in response to the selection operation of the target platform control among multiple platform controls;
[0093] The determination module 404 is used to obtain the target release package that can be published on the target platform based on the library files and configuration files of each target SDK.
[0094] In one embodiment, the generation module 403 is specifically used to obtain an initial configuration file adapted to the target platform in response to a selection operation of a target platform control among multiple platform controls; add configuration items related to each target SDK to the initial configuration file to obtain a configuration file adapted to the target platform; the configuration items include at least one of permission declarations, service declarations, and initialization parameters.
[0095] In one embodiment, the determining module 404 is specifically used to add the library files and configuration files of each target SDK to the project file; add the target code required by each target SDK to the project file; the target code includes at least one of interface call code, callback processing code and lifecycle management code; and based on the added project file, obtain the target release package that can be published on the target platform.
[0096] In one embodiment, the project file includes business logic code; the interface in the business logic code that calls the target SDK is a generic interface; the device further includes a conversion module, used to convert the generic interface in the business logic code that calls the target SDK into the target interface corresponding to the target platform when compiling the business logic code.
[0097] In one embodiment, the determining module 404 is specifically used to perform library conflict detection on the added project files; when a library conflict is detected, the added project files are adjusted based on a preset strategy to obtain a target release package that can be published on the target platform.
[0098] In one embodiment, the project file includes a build script and packaging parameters; a determination module is specifically used to adjust the build script and packaging parameters in the added project file based on the target platform to obtain an adjusted project file; and based on the adjusted project file, a target release package that can be published on the target platform is obtained.
[0099] Each module in the aforementioned SDK integration device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0100] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 5 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements an SDK integration method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0101] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0102] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0103] The selection interface displays platform controls for multiple platforms to be released and SDK controls for multiple SDKs to be integrated.
[0104] In response to the selection operation of each target SDK control among multiple SDK controls, obtain the library file of the target SDK corresponding to each target SDK control;
[0105] In response to the selection operation of the target platform control among multiple platform controls, a configuration file adapted to the target platform is generated;
[0106] Based on the library files and configuration files of each target SDK, a target release package that can be published on the target platform is obtained.
[0107] In one embodiment, when the processor executes the computer program, it further performs the following steps: adding the library files and configuration files of each target SDK to the project file; adding the target code required by each target SDK to the project file; the target code includes at least one of interface call code, callback handling code, and lifecycle management code; and obtaining a target release package that can be published on the target platform based on the added project file.
[0108] In one embodiment, the project file includes business logic code; the interface in the business logic code that calls the target SDK is a generic interface; when the processor executes the computer program, it also performs the following steps: when compiling the business logic code, the generic interface in the business logic code that calls the target SDK is converted into the target interface corresponding to the target platform.
[0109] In one embodiment, when the processor executes the computer program, it further performs the following steps: performing library conflict detection on the added project file; when a library conflict is detected, adjusting the added project file based on a preset strategy to obtain a target release package that can be published on the target platform.
[0110] In one embodiment, the project file includes a build script and packaging parameters; when the processor executes the computer program, it also performs the following steps: adjusting the build script and packaging parameters in the added project file based on the target platform to obtain an adjusted project file; and based on the adjusted project file, obtaining a target release package that can be published on the target platform.
[0111] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any of the above method embodiments.
[0112] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the method described in any one of the above method embodiments.
[0113] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0114] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0115] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.< / manifest>
Claims
1. An SDK integration method, characterized in that, The method includes: The selection interface displays platform controls for multiple platforms to be released and SDK controls for multiple SDKs to be integrated. In response to a selection operation on each target SDK control among the plurality of SDK controls, the library file of the target SDK corresponding to each target SDK control is obtained; In response to a selection operation of a target platform control among the multiple platform controls, a configuration file adapted to the target platform is generated; Based on the library files of each target SDK and the configuration file, a target release package that can be published on the target platform is obtained.
2. The method according to claim 1, characterized in that, The step of generating a configuration file adapted to the target platform in response to a selection operation of a target platform control among a plurality of platform controls includes: In response to a selection operation of a target platform control among the multiple platform controls, an initial configuration file adapted to the target platform is obtained; Add configuration items related to each target SDK to the initial configuration file to obtain the configuration file adapted to the target platform; the configuration items include at least one of permission declaration, service declaration, and initialization parameters.
3. The method according to claim 1, characterized in that, The step of obtaining a target release package that can be published on the target platform based on the library files of each target SDK and the configuration file includes: Add the library files and configuration files of each target SDK to the project file; Add the target code required for each of the target SDKs to the project file; the target code includes at least one of interface call code, callback handling code, and lifecycle management code; Based on the added project files, a target release package that can be published on the target platform is obtained.
4. The method according to claim 3, characterized in that, The project file includes business logic code; the interface in the business logic code that calls the target SDK is a generic interface; the method further includes: When compiling the business logic code, the general interface that calls the target SDK in the business logic code is converted into the target interface corresponding to the target platform.
5. The method according to claim 3, characterized in that, The process of obtaining a target release package that can be published on the target platform based on the added project files includes: Perform library conflict checks on the added project files; When a library conflict is detected, the added project files are adjusted based on a preset strategy to obtain a target release package that can be published on the target platform.
6. The method according to claim 3, characterized in that, The project file includes a build script and packaging parameters; based on the added project file, the target release package that can be published on the target platform is obtained, including: Based on the target platform, the build script and packaging parameters in the added project file are adjusted to obtain the adjusted project file; Based on the adjusted project files, a target release package that can be published on the target platform is obtained.
7. An SDK integration device, characterized in that, The device includes: The display module is used to display the selection interface, which displays platform controls corresponding to multiple platforms to be released and SDK controls corresponding to multiple SDKs to be integrated. The acquisition module is used to acquire the library file of the target SDK corresponding to each of the multiple target SDK controls in response to the selection operation of each target SDK control; A generation module is used to generate a configuration file adapted to the target platform in response to a selection operation of a target platform control among the multiple platform controls; The determination module is used to obtain a target release package that can be published on the target platform based on the library files of each target SDK and the configuration file.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.