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.