realm/realm-cocoa — pull request #876 by tgoyne (2014-09-05 21:10:06+00:00)
Title: Add full support for sized Ints in Swift

And fix some issues with int sizes in obj-c and some Swift initialization stuff in the process.

There's three main changes here:

1. Most of the int property stuff now operates on s, i and q separately, so that the properties can actually act as if they were the correct type. This fixes 64-bit properties sometimes getting truncated to 32 bits, 32-bit properties sometimes *not* getting truncated to 32 bites, and 16-bit properties not working at all.

2. RLMObjectSchema is now more similar for obj-c and Swift types, with only the Swift-specific parts handled by RLMSwiftSupport. This was done to solve the problem of that the actual size of the int property was being lost (with everything being collapsed to a single size), but also fixes things like the object type of array properties not being validated, and makes primary keys work for Swift.

3. There's now a dummy implementation of RLMSwiftSupport for Xcode 5 so that the only `#if REALM_SWIFT` checks are for which header to include, rather than making some of the actual logic a mess.

@alazier @jpsim