Nothing Special   »   [go: up one dir, main page]

How To Build: Path With Spaces

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

3/3/2014

remail-iphone - reMail for iPhone - Google Project Hosting

How to Build
You will need a Mac to do this. Install the following: 1. The latest version of XCode from http://developer.apple.com/ - we have tested reMail with XCode 3.1.3 and 3.2.1 2. git: http://help.github.com/mac-git-installation/ 3. mercurial / hg: http://mercurial.berkwood.com/ Clone the repository:
$h gc l o n eh t t p s : / / c o d e . g o o g l e . c o m / p / r e m a i l i p h o n e /

Note: do this in a path that has no spaces. Some developers have reported they're having trouble building in a path with spaces. Open a terminal, cd into the source directory. Build the dependencies via:
$s hp u l l _ d e p e n d e n c i e s . s h

This can take up to an hour. It will download all the dependencies (three20, Mailcore) and then build all the crypto libraries. Mailcore and three20 will be in directories on the same level as your ReMailIPhone directory, so don't be surprised when you see them there. Open ReMailIPhone.xcodeproject Click "Build and Debug" You should consider following the author, @gabor for occasional reMail updates. If you want to release your own, rebranded version of reMail in the App Store, readRebrandingRemail.

Project ideas
These are inspired by the top recent feature requests. Please contact the author if you want to work on any of these, and I'll try my best to support you. You'll need to find out how to contact me (not very hard). The number in parenthesis is a difficulty rating from 1-5. 1. Landscape mode (3.5/5) 2. Password / lock screen (3/5) 3. Add more account types (Mobile Me, GMX, etc) to config menu (1/5) 4. Autocomplete previous searches, not just names (2/5) 5. Pre-sync headers of all emails, then sync contents (5/5) 6. Download all attachments by default (2/5) 7. Re-scan folders and delete messages that have been deleted on the server (4/5) 8. Localize into more languages: Currently, reMail is localized into German (well) and French (badly). You could help by translating into more languages. (1/5) 9. In search results, see which folder an email is in. (1/5) See ProjectIdeaDetails for more.

Is reMail Rocket Science?


https://code.google.com/p/remail-iphone/ 1/4

3/3/2014

remail-iphone - reMail for iPhone - Google Project Hosting

No. The UI is a UITouch application with some elements from three20 for displaying search snippets with markup. A stack of two libraries - MailCore and libetpan - are used to download emails from the store. Emails are stored in Sqlite3 databases sharded by time slices.

How the Datastore Works


Here's a rough overview of the data flow in reMail:

Emails are stored in sqlite databases named email-X.edb, where X is a number. Each timeslice covers roughly 3 days, as controlled by E m a i l P r o c e s s o r . d b N u m F o r D a t e . There is a central contacts db which is used to autocomplete names. Each contact entry also includes the youngest and oldest time slice in which emails from that contact occur. This way, search results for people are served up almost instantly. There is a UID DB (somewhat misnamed) which stores hashes (not ids) of already downloaded emails so we can avoid downloading them again. The code includes a slightly modified Sqlite3 with better search snippet generation (the snippets generated by sqlite's built-in fts3 module are too short for our purposes, and don't include which of the fields matched).
S y n c M a n a g e ralso kicks off running I m a p S y n c , which in turn uses I m a p F o l d e r W o r k e r to download each each email in

that folder (newest emails first). I m a p F o l d e r W o r k e r calls the S y n c M a n a g e rsingleton with status updates which are then displayed to the user in H o m e S c r e e n V i e w C o n t r o l l e r(somewhat hackie, but oh well). S y n c M a n a g e r also stores the folder state in property list files (.plist). For each folder, it lists the range of sequence numbers that have already
https://code.google.com/p/remail-iphone/ 2/4

3/3/2014

remail-iphone - reMail for iPhone - Google Project Hosting

been synced.
E m a i l P r o c e s s o rtakes the data from I m a p F o l d e r W o r k e r(passed asynchronously via an NSOperationQueue) and

writes it into the databases we mentioned above.


A t t a c h m e n t D o w n l o a d e ris used to download attachments when you first open them.

How the UI works


reMail's UI is a UITouch application. Here's a chart that reflects the control flow in the application. Take the names in the boxes and add ...V i e w C o n t r o l l e r . mto find the source file. Add ".xib" to find the nib with the relevant data.

The Home screen view controller manages the toolbar on the bottom with status information.

Potentially Useful Code for Your Project


Even if you don't want to contribute, you may be able to use this code for your own project: In-App Store : implements an In-App Store. I left the code in there even though it's not used any more. Buchheit Timer: Prints timing information for blocks of code. Named for Paul Buchheit who came to YC and suggested that we time everything in our code.

Dependencies
reMail uses a number of third party dependencies: MailCore, libetpan, three20, etc. These are not included in the project for two reasons: First, we don't want to keep updating these libraries. Second, For US export control reasons, we can't include libetpan's dependencies: OpenSSL and cyrus-sasl.
https://code.google.com/p/remail-iphone/ 3/4

3/3/2014

remail-iphone - reMail for iPhone - Google Project Hosting

Instead, we included a script called p u l l _ d e p e n d e n c i e s . s hto download and build reMail's dependencies.

https://code.google.com/p/remail-iphone/

4/4

You might also like