Updated realm and added continuous integration script

This commit is contained in:
Pedro 2014-12-25 19:25:31 +01:00
parent a45d44a18d
commit e500b2adf2
9 changed files with 6061 additions and 5996 deletions

View File

@ -1,12 +1,9 @@
language: objective-c
xcode_sdk: iphonesimulator
rvm: 2.0.0
osx_image: xcode61
rvm: 2.1.0
notifications:
email: false
before_install:
- gem install --no-rdoc --no-ri cocoapods -v 0.35
- gem install xcpretty
- cd project
- pod install
podfile: project/Podfile
script:
- xcodebuild -workspace project.xcworkspace -scheme project -configuration Debug -sdk iphonesimulator8.1 ONLY_ACTIVE_ARCH=NO test | xcpretty -tc --no-utf && exit ${PIPESTATUS[0]}
- xctool test -workspace project/project.xcworkspace -scheme project -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO
- xctool build -workspace example/SugarRecordExample.xcworkspace -scheme SugarRecordExample -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO

15
ci.sh Normal file
View File

@ -0,0 +1,15 @@
#!/bin/bash
# Installing xctool
brew install xctool
# Executing tests on the tests project
cd project
pod install
xctool test -workspace project.xcworkspace -scheme project -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO
# Building example project
cd ..
cd example
pod install
xctool build -workspace SugarRecordExample.xcworkspace -scheme SugarRecordExample -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO

File diff suppressed because it is too large Load Diff

View File

@ -93,6 +93,48 @@
*/
+ (instancetype)realmWithPath:(NSString *)path readOnly:(BOOL)readonly error:(NSError **)error;
/**
Obtains an `RLMRealm` instance persisted to an encrypted file.
The on-disk storage for encrypted Realms are encrypted using AES256+HMAC-SHA2,
but otherwise they behave like normal persisted Realms.
Encrypted Realms currently cannot be opened while lldb is attached to the
process due to that lldb does have an option to pass through mach exceptions to
the process being debugged. Attempting to open an encrypted Realm with lldb
attached will result in an EXC_BAD_ACCESS.
@param path Path to the file you want the data saved in.
@param key 64-byte key to use to encrypt the data.
@param readonly BOOL indicating if this Realm is read-only (must use for read-only files)
@param error If an error occurs, upon return contains an `NSError` object
that describes the problem. If you are not interested in
possible errors, pass in `NULL`.
@return An encrypted `RLMRealm` instance.
*/
+ (instancetype)encryptedRealmWithPath:(NSString *)path
key:(NSData *)key
readOnly:(BOOL)readonly
error:(NSError **)error;
/**
Set the encryption key to use when opening Realms at a certain path.
This can be used as an alternative to explicitly passing the key to
`encryptedRealmWithPath:key:readOnly:error:` each time a Realm instance is
needed. The encryption key will be used any time a Realm is opened with
`realmWithPath:` or `defaultRealm`.
If you do not want Realm to hold on to your encryption keys any longer than
needed, then use `encryptedRealmWithPath:key:readOnly:error:` rather than this
method.
@param key 64-byte encryption key to use, or `nil` to unset.
@param path Realm path to set the encryption key for.
*/
+ (void)setEncryptionKey:(NSData *)key forRealmsAtPath:(NSString *)path;
/**
Obtains an `RLMRealm` instance for an un-persisted in-memory Realm. The identifier
used to create this instance can be used to access the same in-memory Realm from
@ -475,6 +517,17 @@ typedef void (^RLMMigrationBlock)(RLMMigration *migration, NSUInteger oldSchemaV
*/
+ (NSError *)migrateRealmAtPath:(NSString *)realmPath;
/**
Performs the registered migration block on an encrypted Realm at the given path.
As `migrateRealmAtPath:`, but for encrypted realms.
@param realmPath The path of the Realm to migrate.
@param key 64-byte encryption key.
@return The error that occurred while applying the migration, if any.
*/
+ (NSError *)migrateEncryptedRealmAtPath:(NSString *)realmPath key:(NSData *)key;
#pragma mark -
//---------------------------------------------------------------------------------------

Binary file not shown.

View File

@ -38,7 +38,7 @@
</data>
<key>Headers/RLMRealm.h</key>
<data>
hwhAiAOtfoVZZ2qfDjM8O1Qa1PA=
JxcuqYjsnduY9ckM1uxG5iGK2S4=
</data>
<key>Headers/RLMResults.h</key>
<data>
@ -58,7 +58,7 @@
</data>
<key>Info.plist</key>
<data>
iE3p9E8HWtBUXz2Xw05jRoXWXgU=
li3Gz2fsXJzXE35XnfmDnOutvS8=
</data>
<key>Modules/module.modulemap</key>
<data>
@ -101,7 +101,7 @@
</data>
<key>Headers/RLMRealm.h</key>
<data>
hwhAiAOtfoVZZ2qfDjM8O1Qa1PA=
JxcuqYjsnduY9ckM1uxG5iGK2S4=
</data>
<key>Headers/RLMResults.h</key>
<data>