Hybrid development method and device, computer program, storage medium and computer equipment
The hybrid development method integrates mobile application development code and engine code through platform-specific bridge files, addressing separate development issues and enhancing efficiency and reliability in mobile application development.
Patent Information
- Application Number
- CN202411757018.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2044-12-03
AI Technical Summary
Existing mobile application development methods require separate development and debugging of mobile application development code and development engine code on different platforms, increasing development cost and debugging difficulty.
A hybrid development method that packages mobile application development code into an embedding package, imports it into a development engine, and constructs a bridge file to establish communication between the development engine and the mobile application development framework, using platform-specific bridge files like Java classes for Android and mm/h files for iOS to enable seamless integration of core and UI functions.
This approach reduces development costs and debugging effort by allowing the development engine to call functions in the mobile application development framework, leveraging high-performance capabilities of both, and ensuring efficient, reliable hybrid development.
Smart Images

Figure CN119225702A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a hybrid development method, apparatus, computer program, storage medium, and computer equipment. Background Art
[0002] In mobile application development, the development engine and the mobile application development framework each play different roles. The development engine is mainly responsible for providing the core functions of software development. The development engine renders graphics to ensure smooth and clear images; it also processes the audio system to ensure that the sound effects in the software are accurate; it also manages various resources in the software, such as models, textures, sounds, scripts, etc., to ensure that these resources can be correctly loaded and used when needed. The mobile application development framework focuses on the design and management of the user interface (UI). The mobile application development framework helps developers create and manage visual elements in the software, such as buttons, menus, text boxes, progress bars, etc.; the mobile application development framework is also responsible for handling user interface interactions, such as clicking, dragging and dropping, scrolling, etc., and linking these interactions with game logic. In existing technologies, developers usually develop and debug mobile application development code and the development engine code separately on different platforms, which increases the cost of software development and the difficulty of debugging. Summary of the invention
[0003] One advantage of the present application is that it provides a hybrid development method, apparatus, computer program, storage medium and computer device, which can call various functions in the mobile application development framework on the development engine to achieve hybrid development based on the development engine and the mobile application development framework.
[0004] Another advantage of the present application is to provide a hybrid development method, apparatus, computer program, storage medium and computer equipment, wherein in order to achieve the above advantages, no expensive materials or complex structures are required in the present application. Therefore, the solution provided by the present application can successfully and effectively solve the above problems, and not only provides a simple hybrid development method, apparatus, computer program, storage medium and computer equipment, but also increases the practicality and reliability of the hybrid development method, apparatus, computer program, storage medium and computer equipment.
[0005] Based on this, in order to achieve at least one of the above advantages or other advantages and purposes of the present application, the present application provides a hybrid development method, which is based on a development engine and a mobile application development framework, and includes the following steps: Packing the mobile application development code into an embedding package, and importing the embedding package into the development engine; Based on the development platform of the mobile application development framework, construct a bridge file, wherein the bridge file is used to establish communication between the development engine and the mobile application development framework; The bridge file is used to enable the development engine to call the function in the embedded package, so as to realize hybrid development based on the development engine and the mobile application development framework.
[0006] In this way, by packaging the mobile application development code into an embedded package and importing it into the development engine, a bridge file matching the development platform is constructed according to the development platform of the mobile application development framework, and communication between the development engine and the mobile application development framework is established through the bridge file, thereby realizing hybrid development based on the development engine and the mobile application development framework. Compared with the existing technology, which separately develops and debugs the mobile application development code and the code of the development engine on different platforms, this solution can call each function in the mobile application development framework on the development engine, thereby simultaneously utilizing the high-performance software development capabilities of the development engine and the high-performance development framework of the mobile application development framework, thereby realizing seamless integration of core functions and UI functions in one project.
[0007] According to one embodiment of the present application, when the mobile application development framework is developed based on the Android platform, the bridge file is a Java class, and based on the development platform of the mobile application development framework, the bridge file is constructed, specifically: according to each function in the embedded package, one or more Java classes are created, and the package name and / or class name of the one or more Java classes matches the name of each function.
[0008] With such a configuration, when the mobile application development framework is developed based on the Android platform, one or more Java classes matching the names of the functions in the embedded package can be created, thereby laying the foundation for the subsequent development engine to indirectly call the functions in the embedded package through the one or more Java classes.
[0009] According to an embodiment of the present application, the bridge file is used to implement the development engine calling the function in the embedded package, specifically: The one or more Java classes call each function in the embedded package through the external interface of the embedded package; The development engine indirectly calls each function in the embedded package through AndroidjavaClass, through one or more java classes whose package names and / or class names match the names of each function.
[0010] In this way, AndroidjavaClass is a class in the development engine, which is mainly used to interact with the java class on the Android platform in the C# script of the development engine. In this solution, the developer can call the static method of the java class through AndroidjavaClass on the engine side to obtain the value of the static field, thereby establishing communication between the engine side and the java class, and then establish communication between the java class and the embedded package through the external interface of the embedded package to achieve indirect communication between the development engine and the embedded package, so that the development engine can indirectly call each function in the embedded package.
[0011] According to one embodiment of the present application, when the mobile application development framework is developed based on the IOS platform, the bridge file is an mm file and an h file, and the mm file includes a first transfer function and a second transfer function. The first transfer function is used to call each function in the embedded package through the external interface of the embedded package, and the first transfer function is also used to implement a cross-language call from the first transfer to the second transfer. The h file is a library file of the mm file.
[0012] With such a configuration, the development engine can indirectly establish communication with the embedded package through the first transfer function and the second transfer function included in the mm file, so that the development engine can indirectly call each function in the embedded package, and when the mobile application development framework is developed based on the IOS platform, the mm file and the h file are set as bridge files. Compared with the solution of setting the java class as the bridge file, because in the IOS platform, Objective-C or Swift language is mainly used to develop IOS applications, the IOS application cannot recognize the java class. Therefore, this solution constructs the mm file and the h file as bridge files, which not only reduces the occurrence of the situation where the development platform of the mobile application development framework cannot recognize the file type of the bridge file, thereby affecting the progress and cost of the overall software development, but also can improve the efficiency of the overall software development and reduce the subsequent labor cost of debugging the code by realizing hybrid development based on the development engine and the mobile application development framework.
[0013] According to one embodiment of the present application, the first transfer function is developed based on the Object-C language, and the second transfer function is developed based on the C++ language.
[0014] With such a configuration, since Objective-C or Swift language is mainly used to develop IOS applications on the IOS platform, the IOS applications cannot recognize Java classes. Therefore, the first transfer function is developed based on the Object-c language, which allows the first transfer function to directly establish communication with the embedded package through the external interface of the embedded package, and can establish communication with the second transfer function developed based on the C++ language through code implementation, so that the subsequent development engine can establish communication with the second transfer function to achieve the purpose of indirectly establishing communication with the mobile application development framework, thereby realizing hybrid development based on the development engine and the mobile application development framework.
[0015] According to an embodiment of the present application, the bridge file is used to implement the development engine calling the function in the embedded package, specifically: The first transfer function calls each function in the embedded package through the external interface of the embedded package, and the first transfer function also implements a cross-language call from the first transfer function to the second transfer function; The development engine establishes communication with the second transfer function through DllImport to indirectly call each function in the embedded package through the first transfer function.
[0016] With such a configuration, the first transfer function and the second transfer function included in the mm file can be used as a bridge to establish communication between the development engine and the mobile application development framework, thereby realizing hybrid development based on the development engine and the mobile application development framework.
[0017] According to another aspect of the present application, the present application further provides a device, including: A packaging and importing component, used to package the mobile application development code into an embedded package and import the embedded package into the development engine; A memory, used to store mobile application development code, the code of the development engine and a bridge file; A building component is used to build a bridge file based on the development platform of the mobile application development framework; And a development component is used to use the bridge file to implement the development engine calling the function in the embedded package to achieve hybrid development based on the development engine and the mobile application development framework.
[0018] With such configuration, the above-mentioned hybrid development method can be implemented through the cooperation of the packaging import component, storage, construction component and development component.
[0019] According to another aspect of the present application, the present application further provides a computer program, and running the computer program can execute the steps of the above-mentioned hybrid development method.
[0020] According to another aspect of the present application, the present application further provides a storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned hybrid development method are implemented.
[0021] With such a configuration, the computer program stored in the storage medium can automatically perform complex tasks, reduce human intervention, thereby improving overall efficiency and ensuring the reliability and trustworthiness of operations. In addition, the computer program is repeatable and extensible, so that the same computer program can be repeatedly executed in different environments and at different times, and is easy to expand to meet new needs, thereby enhancing the adaptability and flexibility of the computer program. In addition, running the computer program can greatly optimize resource utilization and reduce manpower and error costs by automatically processing large amounts of data and tasks. Finally, the computer program also has traceability and security, and can ensure the auditability and security of operations by recording and tracking each step of the computer program execution, thereby reducing the risks brought by human operations.
[0022] According to another aspect of the present application, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned hybrid development method when executing the computer program.
[0023] With such a configuration, the computer program has flexibility and adaptability, so that the execution steps can be adjusted according to different inputs and conditions, thereby adapting to the ever-changing needs and technical environment, and maintaining the advancement and practicality of the computer program. In addition, the architecture of the computer device allows the realization of multiple functions, so that the program in the memory can contain multiple functional modules, and the computer program can be executed by the processor to meet different application needs, thereby improving the function of the computer program and enhancing the integration of the computer device.
[0024] Beneficial effect: By packaging the mobile application development code into an embedded package and importing it into the development engine, a bridge file matching the development platform is constructed according to the development platform of the mobile application development framework, and communication between the development engine and the mobile application development framework is established through the bridge file, thereby achieving hybrid development based on the development engine and the mobile application development framework. Compared with the existing technology, in which the mobile application development code and the code of the development engine are developed and debugged separately on different platforms, the present solution can call each function in the mobile application development framework on the development engine, thereby utilizing the high-performance software development capabilities of the development engine and the rapid application development framework of the mobile application development framework at the same time, thereby realizing seamless integration of core functions and UI functions in one project. Moreover, compared with the solution of constructing different bridge files not according to the development platform of the mobile application development framework, the present solution, by constructing a bridge file that matches the development platform of the mobile application development framework, not only reduces the occurrence of the situation where the development platform of the mobile application development framework cannot recognize the file type of the bridge file, thereby affecting the progress and cost of the overall software development, but also can improve the efficiency of the overall software development and reduce the subsequent manpower cost of debugging the code by realizing hybrid development based on the development engine and the mobile application development framework. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the conventional technology, the drawings required for use in the embodiments or the conventional technology descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0026] Figure 1 A flow chart of a hybrid development method provided for one embodiment of the present application; Figure 2 A schematic diagram of the process of developing a mobile application development framework based on an Android platform in the hybrid development method according to the above embodiment of the present application is shown; Figure 3 A flow chart of the development of a mobile application development framework based on an IOS platform in the hybrid development method according to the above embodiment of the present application is shown. DETAILED DESCRIPTION
[0027] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present application, so the present application is not limited by the specific embodiments disclosed below.
[0028] Considering that although the existing technology can develop mobile applications, developers usually develop and debug the mobile application development code and the development engine code separately on different platforms, this method will increase the cost of software development and the difficulty of debugging. In order to solve this problem, the present application provides a hybrid development method, apparatus, computer program, storage medium and computer equipment, which can call various functions in the mobile application development framework on the development engine to realize hybrid development based on the development engine and the mobile application development framework.
[0029] For details, please refer to the attached Figure 1 An embodiment of the present application provides a hybrid development method, which may include the following steps: Packing the mobile application development code into an embedding package, and importing the embedding package into the development engine; It is worth noting that the embedded package includes but is not limited to a plug-in or library file, and the file format of the embedded package includes but is not limited to a file in AAR format.
[0030] Based on the development platform of the mobile application development framework, construct a bridge file, wherein the bridge file is used to establish communication between the development engine and the mobile application development framework; The bridge file is used to enable the development engine to call the function in the embedded package, so as to realize hybrid development based on the development engine and the mobile application development framework.
[0031] In this embodiment, the development engine Unity and the mobile application development framework Flutter are used as examples for explanation. Unity is a multi-platform game engine that is widely used to create 2D and 3D games, virtual reality (VR), augmented reality (AR), simulators, and other interactive content. Unity supports multiple platforms, including Windows, macOS, Linux, iOS, Android, WebGL, PlayStation, Xbox, and Nintendo Switch. Flutter is an open source UI software development kit developed by Google for building high-performance, high-fidelity mobile, web, and desktop applications. Flutter is mainly developed in the Dart language and supports multiple platforms such as Android, iOS, Web, and desktop (Windows, macOS, Linux).
[0032] It should be noted that by packaging the mobile application development code into an embedded package and importing it into the development engine, a bridge file matching the development platform is constructed according to the development platform of the mobile application development framework, and the communication between the development engine and the mobile application development framework is established through the bridge file, thereby realizing hybrid development based on the development engine and the mobile application development framework. Compared with the solution of constructing different bridge files not according to the development platform of the mobile application development framework, this solution not only reduces the occurrence of the situation that the development platform of the mobile application development framework cannot recognize the file type of the bridge file, thereby affecting the progress and cost of the overall software development, but also can improve the efficiency of the overall software development and reduce the subsequent labor cost of debugging the code by realizing hybrid development based on the development engine and the mobile application development framework.
[0033] It is worth noting that Figure 2 As shown, when the mobile application development framework is developed based on the Android platform, the bridge file is a java class, and based on the development platform of the mobile application development framework, the bridge file is constructed, specifically: according to each function in the embedded package, one or more java classes are created, and the package name and / or class name of the one or more java classes matches the name of each function.
[0034] It should be noted that class is the core concept of object-oriented programming. It defines the structure and behavior of an object and serves as a blueprint for creating an object. A class contains attributes (data members) and methods (behavior members). Attributes are used to store the state of an object, and methods are used to define the operation of an object. Classes hide internal details through encapsulation, implement code reuse through inheritance, and provide flexible behavior changes through polymorphism. Classes are the basis for object instantiation. Each object is an instance of a class and has the attributes and methods defined by the class, thereby achieving modularity, maintainability, and extensibility of the code. Classes enable object-oriented programming to better organize and manage complex systems and improve code reusability and readability.
[0035] In particular, the package name or class name of a class has a specific meaning and role in programming. The package name is used to organize and manage the grouping of classes and interfaces. It defines the logical hierarchy of the class, which usually corresponds to the directory structure of the file system; the class name is the identifier of the class, which is used to reference the class in the code. The first letter of the class name is usually capitalized and follows the camel case naming method.
[0036] It should be noted that when the mobile application development framework is developed based on the Android platform, one or more Java classes matching the names of the functions in the embedded package can be created according to the names of the functions in the embedded package, laying the foundation for the subsequent development engine to indirectly call the functions in the embedded package through the one or more Java classes.
[0037] It is worth noting that the bridge file is used to implement the development engine calling the functions in the embedded package, specifically: the one or more java classes call each function in the embedded package through the external interface of the embedded package; the development engine indirectly calls each function in the embedded package through AndroidjavaClass, through one or more java classes whose package name and / or class name matches the name of each function.
[0038] It should be noted that AndroidjavaClass is a class in the Unity engine, which is mainly used to interact with the Java class on the Android platform in Unity's C# script. The functions and effects of AndroidjavaClass include: cross-platform interaction, access to Java classes and methods, extended functions, and simplified development processes. Specifically: Cross-platform interaction: AndroidjavaClass allows Unity developers to directly call Java code on the Android platform through C# scripts. This allows developers to integrate native functions of the Android platform into Unity games, such as accessing system services, using specific libraries, calling custom Java code, etc.; Access to Java classes and methods: AndroidjavaClass can instantiate Java classes and access their static methods and fields. Developers can call static methods of java classes through AndroidjavaClass objects to obtain the values of static fields, thereby achieving deeper integration with the Android platform; Extended functions: Unity itself does not provide all the functions of the Android platform. AndroidjavaClass allows developers to extend the functions of Unity and implement Android features that Unity itself does not support, such as accessing sensor data and using Android-specific APIs; Simplified development process: AndroidjavaClass simplifies the communication between Unity and the Android platform. Developers do not need to manually handle the complex interactions between java and C#, and can directly implement functions through simple API calls. This greatly reduces the difficulty of development and improves development efficiency.
[0039] It is worth noting that Figure 3 As shown, when the mobile application development framework is developed based on the IOS platform, the bridge file is an mm file and an h file, and the mm file includes a first transfer function and a second transfer function. The first transfer function is used to call each function in the embedded package through the external interface of the embedded package, and the first transfer function is also used to realize the cross-language call of the first transfer to the second transfer, and the h file is the library file of the mm file.
[0040] It should be noted that library files (LibraryFile) are an important part of software development. Library files encapsulate reusable code and resources, providing developers with convenient, efficient and reliable solutions. Through library files, developers can package commonly used functions, classes and methods into independent modules for sharing by multiple projects, thereby reducing the workload of repeated coding and improving development efficiency. The use of library files promotes modular development, allowing complex applications to be decomposed into smaller, more manageable units for easy understanding, maintenance and testing.
[0041] It should be noted that, through the first transfer function and the second transfer function included in the mm file, the development engine can indirectly establish communication with the mobile application development framework, so that the development engine can indirectly call each function in the embedded package, and when the mobile application development framework is developed based on the IOS platform, the mm file and the h file are set as bridge files. Compared with the solution of setting the java class as the bridge file, because in the IOS platform, Objective-C or Swift language is mainly used to develop IOS applications, the IOS application cannot recognize the java class. Therefore, this solution constructs the mm file and the h file as the bridge file, which not only reduces the occurrence of the situation where the development platform of the mobile application development framework cannot recognize the file type of the bridge file, thereby affecting the progress and cost of the overall software development, but also can improve the efficiency of the overall software development and reduce the subsequent manpower cost of debugging the code by realizing hybrid development based on the development engine and the mobile application development framework.
[0042] In particular, the first transfer function is developed based on the Object-c language, and the second transfer function is developed based on the C++ language. Because in the IOS platform, Objective-C or Swift language is mainly used to develop IOS applications, so IOS applications cannot recognize Java classes, so the first transfer function is developed based on the Object-c language, which allows the first transfer function to directly establish communication with the embedded package through the external interface of the embedded package, and can establish communication with the second transfer function developed based on the C++ language through code implementation, so that the subsequent development engine can achieve the purpose of indirectly establishing communication with the embedded package by establishing communication with the second transfer function, thereby realizing hybrid development based on the development engine and the mobile application development framework.
[0043] It should be noted that when the mobile application development framework is developed based on the IOS platform, the bridge file is used to implement the development engine calling the function in the embedded package, specifically: The first transfer function calls each function in the embedded package through the external interface of the embedded package, and the first transfer function also implements a cross-language call from the first transfer function to the second transfer function; The development engine establishes communication with the second transfer function through DllImport to indirectly call each function in the embedded package through the first transfer function.
[0044] It should be noted that in Unity development, the DllImport feature of C# can be used to introduce and call functions written in C++, thereby realizing the interaction between Unity and C++ code. The first transfer function and the second transfer function included in the mm file can be used as a bridge to establish communication between the development engine and the mobile application development framework, thereby realizing hybrid development based on the development engine and the mobile application development framework.
[0045] It should be noted that although the development engine Unity and the mobile application development framework Flutter are used as examples in this embodiment, ordinary technicians in this field should understand that what the present application wants to protect is a hybrid development method. Through the combination of custom modules and native codes in the mobile application development framework, the mobile application development code is packaged into an embedded package, and based on the open platform of the mobile application development framework, a bridge file matching the platform is constructed. The bridge file establishes communication with the mobile application development framework and the development engine respectively through the external interface of the embedded package and one or more of the classes, properties and methods in the development engine for interacting with external code, so that the development engine can indirectly call the functions in the embedded package, thereby realizing hybrid development based on the development engine and the mobile application development framework.
[0046] The development engines include but are not limited to UnrealEngine, GodotEngine, CryEngine, AmazonLumberyard, GameMakerStudio and Cocos2d-x, etc.; the mobile application development frameworks include but are not limited to ReactNative, Xamarin, Ionic, NativeScript and RhinoMobile, etc.
[0047] In another embodiment of the present application, a device is provided, including: a packaging and importing component for packaging mobile application development code into an embedded package and importing the embedded package into the development engine; a memory for storing mobile application development code, the code of the development engine and a bridge file; a construction component for constructing a bridge file based on a development platform of the mobile application development framework; and a development component for using the bridge file to enable the development engine to call a function in the embedded package to achieve hybrid development based on the development engine and the mobile application development framework. The packaging and importing component, the memory, the construction component and the development component can work together to achieve the hybrid development method provided in the above embodiment.
[0048] Another embodiment of the present application further provides a computer program, and running the computer program can execute the steps of the hybrid development method provided in the above embodiment.
[0049] Another embodiment of the present application further provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned hybrid development method are implemented.
[0050] It should be noted that the computer program stored in the storage medium can automatically perform complex tasks, reduce human intervention, thereby improving overall efficiency and ensuring the reliability and trustworthiness of operations. In addition, the computer program is repeatable and extensible, so that the same computer program can be repeatedly executed in different environments and at different times, and is easy to expand to meet new needs, thereby enhancing the adaptability and flexibility of the computer program. In addition, running the computer program can greatly optimize the utilization of resources and reduce manpower and error costs by automatically processing a large amount of data and tasks. Finally, the computer program also has traceability and security, and can ensure the auditability and security of operations by recording and tracking each step of the computer program execution, thereby reducing the risks brought by human operations.
[0051] Another embodiment of the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned hybrid development method when executing the computer program.
[0052] In particular, the computer program is flexible and adaptable, so that the execution steps can be adjusted according to different inputs and conditions, so as to adapt to the ever-changing needs and technical environment, and maintain the advancement and practicality of the computer program. In addition, the architecture of the computer device allows the realization of multiple functions, so that the program in the memory can contain multiple functional modules, and the computer program can be executed by the processor to meet different application needs, thereby improving the function of the computer program and enhancing the integration of the computer device.
[0053] It should be noted that when a component is referred to as being "fixed to" or "disposed on" another component, it may be directly on the other component or there may also be a central component. When a component is considered to be "connected to" another component, it may be directly connected to the other component or there may be a central component at the same time. The terms "vertical", "horizontal", "upper", "lower", "left", "right" and similar expressions used in the specification of this application are for illustrative purposes only and do not represent the only implementation method.
[0054] In addition, the terms "first" and "second" are used only for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present application, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, device, product or equipment that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or equipment.
[0055] In the present application, unless otherwise clearly specified and limited, a first feature being “above” or “below” a second feature may mean that the first feature is directly in contact with the second feature, or the first feature and the second feature are indirectly in contact through an intermediate medium. Moreover, a first feature being “above”, “above” or “above” a second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being “below”, “below” or “below” a second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is lower in level than the second feature.
[0056] Unless otherwise defined, all technical and scientific terms used in the specification of this application have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The term "and / or" used in the specification of this application includes any and all combinations of one or more related listed items.
[0057] The technical features of the above embodiments can be combined without changing the basic principles of the present application. To make the description concise, 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 specification.
[0058] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the patent application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the scope of patent protection of the present application shall be subject to the attached claims.
Claims
1. A hybrid development method, characterized in that: The hybrid development method is based on a development engine and a mobile application development framework, and the hybrid development method includes the following steps: Packing the mobile application development code into an embedding package, and importing the embedding package into the development engine; Based on the development platform of the mobile application development framework, construct a bridge file, wherein the bridge file is used to establish communication between the development engine and the mobile application development framework; The bridge file is used to enable the development engine to call the function in the embedded package, so as to realize hybrid development based on the development engine and the mobile application development framework.
2. The hybrid development method according to claim 1, characterized in that: When the mobile application development framework is developed based on the Android platform, the bridge file is a java class, and based on the development platform of the mobile application development framework, the bridge file is constructed, specifically: according to each function in the embedded package, one or more java classes are created, and the package name and / or class name of the one or more java classes matches the name of each function.
3. The hybrid development method according to claim 2, characterized in that: The bridge file is used to implement the development engine calling the function in the embedded package, specifically: The one or more Java classes call each function in the embedded package through the external interface of the embedded package; The development engine indirectly calls each function in the embedded package through AndroidjavaClass, through one or more java classes whose package names and / or class names match the names of each function.
4. The hybrid development method according to claim 1, characterized in that: When the mobile application development framework is developed based on the IOS platform, the bridge file is an mm file and an h file, the mm file includes a first transfer function and a second transfer function, the first transfer function is used to call each function in the embedded package through the external interface of the embedded package, and the first transfer function is also used to realize the cross-language call of the first transfer to the second transfer, and the h file is the library file of the mm file.
5. The hybrid development method according to claim 4, characterized in that: The first transfer function is developed based on Object-C language, and the second transfer function is developed based on C++ language.
6. The hybrid development method according to claim 5, characterized in that: The bridge file is used to implement the development engine calling the function in the embedded package, specifically: The first transfer function calls each function in the embedded package through the external interface of the embedded package, and the first transfer function also implements a cross-language call from the first transfer function to the second transfer function; The development engine establishes communication with the second transfer function through DllImport to indirectly call each function in the embedded package through the first transfer function.
7. A device, characterized in that: The device comprises: A package import component, used to package the mobile application development code into an embedding package and import the embedding package into the development engine; A memory, used for storing mobile application development code, the code of the development engine and a bridge file; A building component is used to build a bridge file based on the development platform of the mobile application development framework; And a development component is used to use the bridge file to implement the development engine calling the function in the embedded package to achieve hybrid development based on the development engine and the mobile application development framework.
8. A computer program, characterized in that Running the computer program can execute the steps of the hybrid development method according to any one of claims 1 to 6.
9. A storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the steps of the hybrid development method as claimed in any one of claims 1 to 6 are implemented.
10. A computer device, characterized in that: It comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the hybrid development method as claimed in any one of claims 1 to 6 when executing the computer program.
Citation Information
Patent Citations
Cross-platform data processing method and equipment for mobile terminal
CN110908712A
Method and device for developing user interface, medium and electronic equipment
CN111338623A
Socket-based client cross-platform network communication method based and related equipment thereof
CN112671760A
Application development method and device
CN112882690A
Front-end optimization method and device for mixed development of mobile terminals
CN115904341A
Cited By
Debugging method and device of mobile application development framework, computer equipment and storage medium
CN121597546A