Obtain the MailCore framework from reMail

Source: Internet
Author: User
Tags mercurial

If you download MailCore, you may be troubled by compiling MailCore.
After Google acquired reMail, it was finally open-source. Although it will also cause errors (CRASHES) during running, after a simple process, it can still be compiled. Because reMail uses the MailCore framework, we can obtain a compiled MailCore framework from reMail.

According to the reMail Installation Guide, reMail needs to install Mercurial and Git. If you have not installed these two items on your machine, you can download them here:

Mercurial: http://mercurial.selenic.com/

Git: http://code.google.com/p/git-osx-installer/

Then, we can download the reMail project:

Hg clone https://remail-iphone.googlecode.com/hg/remail-iphone

Go to the download directory remail-iphone and run the script:

Sh pull_dependencies.sh

This command automatically downloads the two main frameworks three20 and MailCore on which the reMail project depends. The two processes will take a long time (more than one hour) and everyone is prepared.

After executing the pull_dependencies.sh script, you can view two newly added directories: three20 and MailCore under the same directory of remail-iphone, which contain the source files of the two frameworks.

1. Compile Remail

Open ReMailIPhone. xcodeproj, select "ReMail" for Scheme, and Build.

Due to a bug in Xcode4.2, the compiler reports an error when compiling to the CTCoreFolder. m file:

Implicit declaration of function 'uid _ list_to_env_list 'is invalid in C99

This is because when the compiler sees the definition of the function 'uid _ list_to_env_list ', no prototype of the function is found. The solution is to add the function prototype declaration before the function definition.

 

Note: To solve this error, you can insert the function prototype into the interface declaration of the class (. h header file), you can also insert the function prototype before the implementation statement of the class (. m file ).

 

Open the CTCoreFolder. h header file and insert the function prototype declaration before the @ end statement to solve this error.

Build and ReMail can be run in the simulator.

Ii. Copy the MailCore Project

Now, you can port the MailCore project to your Xcode project.

Create an Xcode project (the project name in this example is not TestApp) and copy the entire MailCore directory to the folder of the new project (operate in the Finder), as shown in:

-- TestApp

---- MailCore

---- TestApp

---- TestApp. xodeproj


Drag the MailCore folder from the Finder window to the Xcode exit of TestApp.

. Open the Build Phases window of TestApp and add the MailCore project to the dependent Project (sub-project) of TestApp, as shown in:


Add the following frameworks and Libraries in parallel binary With Libraries:

 


Go to the Build Settings window and add the following Header file path in Header Search Paths:

 

 


Note: Select Recursive.

Compile TestApp. If there are no errors, the MailCore framework is successfully added.

 

Related Article

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.