Apple mobile equipment application program generation method and device, equipment and medium
By modifying the parameters of the compiler and linker in Apple mobile device application development, the problem that Apple mobile device applications need to rely on the Mac operating system for compilation is solved, and the executable files are generated on non-MAC systems, which improves development efficiency and reduces costs.
Patent Information
- Application Number
- CN202411872961.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2044-12-18
AI Technical Summary
Apple mobile device applications need to rely on the Mac operating system to compile, resulting in limited development methods, high costs and high time consumption.
By obtaining the source code of Apple mobile device application, compiling and modifying compiler parameters, we obtain an intermediate file; then linking the intermediate file and modifying the linker parameters to generate an executable file. This method does not require dependence on the Mac operating system.
It realizes the direct generation of executable files of Apple mobile device applications on non-MAC systems, which improves development efficiency, reduces development costs, and simplifies the development process.
Smart Images

Figure CN120029626A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of Apple mobile device application programs, and in particular to a method, apparatus, device and medium for generating an Apple mobile device application program. Background Art
[0002] Apple mobile device applications are software designed and developed mainly for Apple mobile devices such as Apple phones, Apple tablets, Apple watches, Apple TVs, and Apple headsets.
[0003] In the field of Apple mobile device application development, application developers can write source code for Apple mobile device applications in different operating systems. However, during the compilation stage, the source code can only be compiled into an executable target program on the Mac operating system, or compiled with the help of virtualization tools on non-MAC operating systems. This leads to limitations in the development method, rigidity, high development costs and time consumption.
[0004] Therefore, there is an urgent need for a new development method that can effectively utilize existing code and solve the compilation method on different platforms without relying on the Mac operating system. Summary of the invention
[0005] The purpose of this application is to provide a method, device, equipment and medium for generating an application program for an Apple mobile device, so as to solve the problem in the related art that the application program for an Apple mobile device needs to rely on a Mac system to be compiled.
[0006] In order to achieve the above objectives, this application provides the following technical solutions:
[0007] In a first aspect, the present application provides a method for generating an Apple mobile device application, comprising: obtaining the source code of the Apple mobile device application; compiling the source code and modifying the parameters of the compiler during the compilation process to obtain a compiled intermediate file; linking the intermediate file and modifying the parameters of the linker during the linking process to obtain an executable file of the Apple mobile device application.
[0008] Furthermore, the source code is compiled and the compiler parameters are modified during the compilation process to obtain a compiled intermediate file, including: modifying the SDK path parameter in the compiler to point the SDK path parameter to the path of the Apple mobile device application SDK; modifying the target device platform parameter in the compiler to set the value of the target device platform parameter to the value of the running device platform of the Apple mobile device application; and compiling the source code through the compiler with modified parameters to obtain an intermediate file after the compilation process.
[0009] Furthermore, the linking process is performed on the intermediate file, and the parameters of the linker are modified during the linking process to obtain the executable file of the Apple mobile device application, including: modifying the SDK path parameter in the linker to point the SDK path parameter to the path of the Apple mobile device application SDK; modifying the target device architecture parameter in the linker to set the target device architecture parameter to the architecture value of the Apple mobile device application running platform; linking the intermediate file through the linker with modified parameters to obtain the executable file of the Apple mobile device application.
[0010] Furthermore, the types of compilers include: one or more; if the compiler includes: a clang compiler or a gcc compiler, then modify the -isysroot parameter and the -target parameter, specifically modifying them as follows: pointing the -isysroot parameter to the path of the Apple mobile device application SDK; setting the -target parameter to the value of the running device platform of the Apple mobile device application; if the compiler includes: a swiftc compiler, then modify the -sdk parameter and the -target parameter, specifically modifying them as follows: pointing the -sdk parameter to the path of the Apple mobile device application SDK; setting the -target parameter to the value of the running device platform of the Apple mobile device application.
[0011] Furthermore, the types of linkers include: one or more; if the linker includes: lld linker or ld64 linker, then modify the -syslibroot parameter and the -arch parameter, specifically modifying: setting the -syslibroot parameter to point to the sdk path of the Apple mobile device application; setting the -arch parameter to the value of the running device platform architecture of the Apple mobile device application.
[0012] Furthermore, the obtaining of the source code of the Apple mobile device application includes: obtaining the SDK of the Apple mobile device application; and developing and generating the source code of the Apple mobile device application according to the SDK of the Apple mobile device application.
[0013] Furthermore, after obtaining the SDK of the Apple mobile device application, the method further includes: preprocessing the SDK, wherein the preprocessing includes: format conversion processing, form line breaking processing, or cross-platform compatibility processing.
[0014] In a second aspect, the present application also provides a device for generating an Apple mobile device application, comprising: an acquisition module for acquiring the source code of the Apple mobile device application; a compilation processing module for compiling the source code and modifying the parameters of the compiler during the compilation process to obtain a compiled intermediate file; a link processing module for linking the intermediate file and modifying the parameters of the linker during the linking process to obtain an executable file of the Apple mobile device application.
[0015] Furthermore, the compilation processing module is specifically used to: modify the SDK path parameter in the compiler, point the SDK path parameter to the path of the Apple mobile device application SDK; modify the target device platform parameter in the compiler, set the value of the target device platform parameter to the value of the running device platform of the Apple mobile device application; compile the source code through the compiler with modified parameters to obtain the intermediate file after the compilation process.
[0016] Furthermore, the link processing module is specifically used to: modify the SDK path parameter in the linker, and point the SDK path parameter in the linker to the path of the Apple mobile device application SDK; modify the target device architecture parameter in the linker, and set the target device architecture parameter in the linker to the architecture value of the Apple mobile device application running platform; link the intermediate file through the linker with modified parameters to obtain the executable file of the Apple mobile device application.
[0017] Furthermore, the acquisition module is specifically used to: acquire the SDK of the Apple mobile device application; and develop and generate the source code of the Apple mobile device application program according to the SDK of the Apple mobile device application.
[0018] Furthermore, the acquisition module is also used to: pre-process the SDK, and the pre-processing includes: format conversion processing or form line breaking processing or cross-platform compatibility processing.
[0019] In a third aspect, the present application also provides a computer electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method for generating an Apple mobile device application described in any one of the above are implemented.
[0020] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for generating an Apple mobile device application described in any one of the above are implemented.
[0021] The present application provides a method, device, equipment and medium for generating an Apple mobile device application. The method obtains the source code of the Apple mobile device application; obtains the source code of the Apple mobile device application; compiles the source code, and modifies the parameters of the compiler during the compilation process to obtain a compiled intermediate file; links the intermediate file, and modifies the parameters of the linker during the link process to obtain an executable file of the Apple mobile device application. Compared with the related art, the present application has the following effects: the present application modifies the relevant parameters in the compiler and linker used in the development process of the Apple mobile device application, so that the source code of the Apple mobile device application can directly generate an executable file of the Apple mobile device on a non-MAC system. The problem that the Apple mobile device application needs to rely on the Mac operating system to be compiled is solved, which not only improves the work efficiency of program developers, but also reduces development costs, and simplifies the development system while optimizing the development process. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a flowchart of a method for generating an application program for an Apple mobile device according to an embodiment of the present application;
[0023] Figure 2 It is a structural schematic diagram of a device for generating an application program for an Apple mobile device according to an embodiment of the present application;
[0024] Figure 3 It is a structural schematic diagram of a computer electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0025] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0026] It should be noted that when an element is referred to as being "fixed to" another element, it may be directly on the other element or there may be a central element. When an element is considered to be "connected to" another element, it may be directly connected to the other element or there may be a central element at the same time. In contrast, when an element is referred to as being "directly on" another element, there is no intermediate element. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are for illustrative purposes only.
[0027] In this application, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0028] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0029] The terms used in one or more embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of the present application. The singular forms "a", "said" and "the" used in one or more embodiments of the present application are also intended to include plural forms, unless the context clearly indicates other meanings.
[0030] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of the template are only for the purpose of describing specific embodiments and are not intended to limit this application. The term "and / or" used herein includes any and all combinations of one or more of the associated listed items.
[0031] It should be understood that, although the terms first, second, etc. may be used to describe various information in one or more embodiments of the present application, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of the present application, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when the time of".
[0032] At present, in the field of Apple mobile device application development, existing cross-platform tools such as Flutter and Xamarin are generally used. These tools can simplify the process by transferring the source code of Apple mobile device applications to a MAC server for compilation. However, the above method still requires a MAC operating system to compile the source code of Apple mobile device applications, and does not solve the problem of dependence on the MAC operating system during the source code compilation process of Apple mobile device applications.
[0033] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes are not repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0034] Please refer to Figure 1 The present application embodiment provides a method for generating an Apple mobile device application, which comprises at least the following steps:
[0035] S10. Obtain source code of Apple mobile device applications.
[0036] Specifically, in this embodiment, it is first necessary to obtain the source code of the Apple mobile device application program written by the developer.
[0037] In a specific embodiment, the step of obtaining the source code of the Apple mobile device application program includes:
[0038] S11. Obtain the SDK for Apple mobile device applications.
[0039] Specifically, the SDK for Apple mobile device applications is a software development kit provided by Apple to developers for developing applications for Apple mobile devices, such as: iphonesdk, iwatchsdk, etc.
[0040] In this embodiment, it can be downloaded from the Apple official website or copied from other electronic devices.
[0041] S12. Develop and generate source code for an Apple mobile device application program based on the SDK for the Apple mobile device application.
[0042] Specifically, after obtaining the software development kit of the Apple mobile device application, the developer can write the source code of the Apple mobile device application according to actual design requirements.
[0043] In one embodiment, after obtaining the SDK of the Apple mobile device application, the process further includes: S111, preprocessing the SDK, wherein the preprocessing includes: format conversion processing, form line break processing, or cross-platform compatibility processing.
[0044] It is understandable that in order to avoid the problem that the SDK cannot be used in certain situations, after obtaining the SDK, the SDK needs to be preprocessed, for example, format conversion processing or form line wrapping processing or cross-platform compatibility processing, etc.
[0045] It should be noted that if the SDK can be used directly, there is no need to preprocess the SDK.
[0046] S20, compiling the source code, and modifying the parameters of the compiler during the compilation process to obtain a compiled intermediate file.
[0047] It is understandable that after the source code is written, it is generally necessary to compile and link the source code to generate an executable file for the target device. Compilation and linking require a compiler and a linker to perform the corresponding compilation and linking processes respectively.
[0048] In this embodiment, it is first necessary to select the corresponding compiler according to the source code. Generally speaking, the corresponding compiler is selected according to the programming language of the source code. For example, the compiler of programming languages such as objective-c, c, c++, etc. can select the clang compiler or the gcc compiler.
[0049] It should be noted that, in the compilation process of this embodiment, it is necessary to first modify the relevant default parameters of the compiler, and then compile the source code through the compiler to obtain a compiled intermediate file.
[0050] In one embodiment, the step S20, compiling the source code and modifying the parameters of the compiler during the compilation process to obtain a compiled intermediate file, includes:
[0051] S21. Modify the SDK path parameter in the compiler to point the SDK path parameter to the path of the Apple mobile device application SDK.
[0052] S22, modifying the target device platform parameter in the compiler, and setting the value of the target device platform parameter to the value of the running device platform of the Apple mobile device application;
[0053] S23, compiling the source code through the compiler with modified parameters to obtain an intermediate file after the compilation process.
[0054] In a specific embodiment, the types of compilers include: one or more types;
[0055] If the compiler includes: a clang compiler or a gcc compiler, modify the -isysroot parameter and the -target parameter, specifically modifying: point the -isysroot parameter to the path of the Apple mobile device application SDK; set the -target parameter to the value of the running device platform of the Apple mobile device application, for example: the IOS setting value is arm64-apple-iosxxx, xxx represents the ios target version number, and xxx is the setting value of the -target parameter;
[0056] If the compiler includes: swiftc compiler, modify the -sdk parameter and the -target parameter, specifically modifying: point the -sdk parameter to the path of the Apple mobile device application SDK; set the -target parameter to the value of the running device platform of the Apple mobile device application.
[0057] It should be noted that if the source code includes other programming languages, it is also necessary to obtain compilers corresponding to other programming languages and make corresponding modifications.
[0058] It should be noted that, in this example, the compilation process can be performed on any non-MAC operating system.
[0059] S30, linking the intermediate file, and modifying the parameters of the linker during the linking process to obtain the executable file of the Apple mobile device application.
[0060] It is understandable that linking is the process of combining multiple target files (and possible library files) generated by compilation into an executable file or a library file. It plays a key role in the program development process, integrating the compiled code units into a complete program that can be run in the operating system.
[0061] In this embodiment, it is first necessary to select the corresponding linker according to the source code. Generally speaking, the corresponding linker is selected according to the programming language of the source code. For example, the linker of programming languages such as objective-c, c, c++, etc. can select the LLVM Linker linker, that is, the lld linker or ld64 and their variants.
[0062] It should be noted that, in the linking process of this embodiment, it is necessary to first modify the relevant default parameters of the linker, and then link the intermediate file through the linker to obtain the executable file of the Apple mobile device application.
[0063] In one embodiment, the step S30, linking the intermediate file and modifying the parameters of the linker during the linking process to obtain the executable file of the Apple mobile device application, includes:
[0064] S31, modifying the SDK path parameter in the linker to point the SDK path parameter in the linker to the path of the Apple mobile device application SDK;
[0065] S32, modifying the target device architecture parameter in the linker, and setting the target device architecture parameter in the linker to the architecture value of the Apple mobile device application running platform;
[0066] S33, linking the intermediate file through a linker with modified parameters to obtain an executable file of the Apple mobile device application.
[0067] In a specific embodiment, the types of linkers include: one or more; if the linker includes: lld linker or ld64 linker, then modify the -syslibroot parameter and the -arch parameter, specifically modifying: setting the -syslibroot parameter to point to the sdk path of the Apple mobile device application; setting the -arch parameter to the value of the running device platform architecture of the Apple mobile device application.
[0068] It should be noted that if the system library is needed during the linking process, the framework path in the system library needs to be set to the library directory under the SDK path of the Apple mobile device application. Taking the ld64.lld linker as an example, set the -F parameter in the ld64.lld linker to the Frameworks directory under the SDK of the Apple mobile device application, and set the -o parameter in the ld64.lld linker to specify the storage location of the compiled binary file.
[0069] It should be further explained that if other linkers are needed during the linking process, the same processing needs to be done on the other linkers.
[0070] In this embodiment, the compiled intermediate file is linked through a linker with modified parameters to finally obtain the executable file of the Apple mobile device application.
[0071] It should be noted that, in this example, the compilation process can be performed on any non-MAC operating system.
[0072] The present application provides a method for generating an Apple mobile device application, the method comprises the following steps: obtaining the source code of the Apple mobile device application; obtaining the source code of the Apple mobile device application; compiling the source code, and modifying the parameters of the compiler during the compilation process to obtain a compiled intermediate file; linking the intermediate file, and modifying the parameters of the linker during the linking process to obtain an executable file of the Apple mobile device application. Compared with the related art, the present application has the following effects: by modifying the relevant parameters in the compiler and linker used in the development process of the Apple mobile device application, the source code of the Apple mobile device application can directly generate an executable file of the Apple mobile device on a non-MAC system. The problem that the Apple mobile device application needs to rely on the Mac operating system to be compiled is solved, which not only improves the work efficiency of program developers, but also reduces the development cost, and simplifies the development system while optimizing the development process.
[0073] See also Figure 2 The embodiment of the present application also provides a device 200 for generating an Apple mobile device application, including:
[0074] An acquisition module 201 is used to acquire source code of an Apple mobile device application;
[0075] A compiling module 202 is used to compile the source code and modify the compiler parameters during the compiling process to obtain a compiled intermediate file.
[0076] The linking module 203 is used to perform linking processing on the intermediate file and modify the parameters of the linker during the linking processing to obtain the executable file of the Apple mobile device application.
[0077] In a certain embodiment, the compilation processing module 202 is specifically used to: modify the SDK path parameter in the compiler, and point the SDK path parameter to the path of the Apple mobile device application SDK; modify the target device platform parameter in the compiler, and set the value of the target device platform parameter to the value of the running device platform of the Apple mobile device application; compile the source code through the compiler with modified parameters to obtain the intermediate file after the compilation process.
[0078] In a certain embodiment, the link processing module 203 is specifically used to: modify the SDK path parameter in the linker, and point the SDK path parameter in the linker to the path of the Apple mobile device application SDK; modify the target device architecture parameter in the linker, and set the target device architecture parameter in the linker to the architecture value of the Apple mobile device application running platform; link the intermediate file through the linker with modified parameters to obtain the executable file of the Apple mobile device application.
[0079] In one embodiment, the acquisition module 201 is specifically used to: acquire the SDK of the Apple mobile device application; and develop and generate the source code of the Apple mobile device application program according to the SDK of the Apple mobile device application.
[0080] In one embodiment of the present application, the acquisition module 201 is further used to pre-process the SDK, and the pre-processing includes format conversion processing, form line break processing, or cross-platform compatibility processing.
[0081] See also Figure 3 The embodiment of the present application further provides a computer electronic device 400, including a memory 403 and a processor 402, wherein the memory 403 stores a computer program, and when the processor executes the computer program, the steps of the method for generating an Apple mobile device application described in any one of the above items are implemented.
[0082] Specifically, the electronic device 400 includes: a transceiver 401, a bus interface and a processor 402, wherein the processor 402 is used to obtain the source code of the Apple mobile device application; compile the source code and modify the parameters of the compiler during the compilation process to obtain a compiled intermediate file; link the intermediate file and modify the parameters of the linker during the link process to obtain the executable file of the Apple mobile device application.
[0083] In the embodiment of the present application, the electronic device 400 further includes a memory 403. Figure 3In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically linking various circuits of one or more processors represented by processor 402 and memory represented by memory 403. The bus architecture may also link various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface. The transceiver 401 may be a plurality of components, i.e., including a transmitter and a receiver, providing a unit for communicating with various other devices on a transmission medium. The processor 402 is responsible for managing the bus architecture and general processing, and the memory 403 may store data used by the processor 402 when performing operations.
[0084] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the method for generating an Apple mobile device application described above are implemented.
[0085] In this embodiment, the computer readable storage medium may be a non-volatile storage medium or a volatile storage medium. For example, the computer storage medium may include but is not limited to: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0086] In all examples shown and described herein, any specific values should be interpreted as merely exemplary and not as limiting, and thus other examples of the exemplary embodiments may have different values.
[0087] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0088] In several embodiments provided by this application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely illustrative. For example, the flowcharts and structure diagrams in the accompanying drawings show the possible architectures, functions, and operations of the devices, methods, and computer program products according to multiple embodiments of this application. In this regard, each block in the flowchart or block diagram can represent a module, a program segment, or a part of code, and the module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in an alternative implementation, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the structure diagram and / or flowchart, as well as the combination of blocks in the structure diagram and / or flowchart, can be implemented by a dedicated hardware-based system that executes the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
[0089] In addition, in each embodiment of this application, the various functional modules or units can be integrated together to form an independent part, or each module can exist alone, or two or more modules can be integrated to form an independent part.
[0090] If the described function is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to enable a terminal device (which can be a smart phone, a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application.
[0091] As described above, the above are only the specific implementation manners of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed by this application can easily think of changes or substitutions, which should all be covered by the protection scope of this application.
Claims
1. A method for generating an application program for an Apple mobile device, characterized in that: include: Get source code for Apple mobile device applications; Compiling the source code, and modifying the parameters of the compiler during the compilation process to obtain a compiled intermediate file; The intermediate file is linked, and the parameters of the linker are modified during the linking process to obtain the executable file of the Apple mobile device application.
2. The method for generating an Apple mobile device application according to claim 1, characterized in that: The source code is compiled and the compiler parameters are modified during the compilation process to obtain a compiled intermediate file, including: Modify the SDK path parameter in the compiler to point the SDK path parameter to the path of the Apple mobile device application SDK; Modify the target device platform parameter in the compiler, and set the value of the target device platform parameter to the value of the running device platform of the Apple mobile device application; The source code is compiled by a compiler with modified parameters to obtain an intermediate file after the compilation process.
3. The method for generating an Apple mobile device application according to claim 1, characterized in that: The linking process is performed on the intermediate file, and during the linking process, the parameters of the linker are modified to obtain the executable file of the Apple mobile device application, including: Modify the SDK path parameter in the linker to point the SDK path parameter to the path of the Apple mobile device application SDK; Modify the target device architecture parameter in the linker, and set the target device architecture parameter to the architecture value of the Apple mobile device application running platform; The intermediate file is linked through a linker with modified parameters to obtain an executable file of the Apple mobile device application.
4. The method for generating an Apple mobile device application according to claim 2, characterized in that: The types of compilers include: one or more; If the compiler includes: a clang compiler or a gcc compiler, modify the -isysroot parameter and the -target parameter, specifically modifying: point the -isysroot parameter to the path of the Apple mobile device application SDK; set the -target parameter to the value of the running device platform of the Apple mobile device application; If the compiler includes: swiftc compiler, modify the -sdk parameter and the -target parameter, specifically modifying: point the -sdk parameter to the path of the Apple mobile device application SDK; set the -target parameter to the value of the running device platform of the Apple mobile device application.
5. The method for generating an Apple mobile device application according to claim 3, characterized in that: The types of linkers include: one or more; If the linker includes: lld linker or ld64 linker, modify the -syslibroot parameter and the -arch parameter, specifically modifying: setting the -syslibroot parameter to point to the SDK path of the Apple mobile device application; setting the -arch parameter to the value of the running device platform architecture of the Apple mobile device application.
6. The method for generating an Apple mobile device application according to claim 1, characterized in that: The method of obtaining the source code of the Apple mobile device application program includes: Get the SDK for Apple mobile device applications; According to the SDK of the Apple mobile device application, the source code of the Apple mobile device application is developed and generated.
7. The method for generating an Apple mobile device application according to claim 6, characterized in that: After obtaining the SDK of Apple mobile device application, it also includes: The SDK is preprocessed, and the preprocessing includes: format conversion processing, form line break processing, or cross-platform compatibility processing.
8. A device for generating an application for an Apple mobile device, characterized in that: include: The acquisition module is used to obtain the source code of Apple mobile device applications; A compiling processing module, used to compile the source code and modify the parameters of the compiler during the compiling process to obtain a compiled intermediate file; The link processing module is used to perform link processing on the intermediate file and modify the parameters of the linker during the link processing to obtain the executable file of the Apple mobile device application.
9. A computer electronic device, characterized in that: The invention comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method for generating an Apple mobile device application according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for generating an Apple mobile device application program according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Software construction method and system based on Flutter
CN112631600A
Compilation data processing method and device, electronic equipment and storage medium
CN113590127A
Transplanting method and device for Wayland embedded graphic application
CN119045882A