Monotouch uses a third-party framework Library

Source: Internet
Author: User

I seldom write this thing. Today I write it for the first half of a month.

I just changed my job and ran to IOS from the previous C ++ client, using C # language development. The development platform uses the xcode4.5 monotouch platform.

I have been playing with 91sdk for more than two weeks, but I have found some feelings today.

First, monotouch can only use static libraries, such as A. A file and. dylib file generated in xcode.

Second, when we docked 91, we found that they only gave us one framework file (Framework is a dynamic library, but we found a file of class.)

The third encapsulation framework is a. a library. In this way, we can write an intermediate class in this. A library to call the 91 library. I have not tried it, because monotouch is written in C # And there are too many items to bind. Therefore, it is recommended to write an intermediate class, then bind the open interface of this class to monotouch.

Now, start to work:

1. Find the. A file in the 91framework file.

Mark which file is. A. Do not make any mistake.

Okay. Now we can find this. A file in the framework. Also, the header files should be taken out and put in a folder.

2. Create an xcode Project

3. Add some required Libraries

4. generated version

There are real machines and virtual machines

Real Machine

Virtual Machine

At this time, two. A files will be generated. They can also be merged into a. A file. Specifically, Baidu

Here is a small example: Liop-create "File 1. A path" "file 2. A path"-output "generate path."

View version Liop-Info "file. A path"

I386 armv7 armv6

(To solve the. A file, you can use the AR command in the terminal. nnd said that the AR command is actually tar. I have been studying it for a long time)

1. Tar-X-F file.

Several. O files are generated.

5. Use this.

Create a monotouch binding project in monodevelop

6. Introduction.

This is the bound code, which is written in apidefinition. cs. If it is useful to bind Enum or to bind a struct to structsandenums. CS

7. Create a project to call them. I created an iPhone view project, note: In the project, add-v-gcc_flags = "-lsqlite3-L $ {projectdir}/lib/libsqlite3.dylib" to the options for iPhone build"

This is the database connecting to the system. In addition, it is okay to add the resources shown in the first figure to the project.

After more than half a month of research, many circles are turning back to the starting point. Baidu in China is not powerful, and googole in foreign countries is often unable to open (but Google did not choose the right information). I found it all here, and this is not my research alone, and my colleagues with me. Thanks to them, CCTV, and csdn.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.