際際滷

際際滷Share a Scribd company logo
NHN	NEXT	Eunjoo	Im
iOS
Ream.io
database
NHN NEXT

iOS Advanced
NHN	NEXT	Eunjoo	Im
Realm企?
 觜襯願 煙ロ 覈覦 一危磯伎 (ろ)

 http://realm.io/kr

 SQLite  CoreData襯 豌危 
襦  一危磯伎
豢豌: LetSwift 2016 Realm.io 語
NHN	NEXT	Eunjoo	Im
Realm 
豢豌: https://realm.io/kr/
2014 7 15 螻糾
2 讌 讌蠍 Realm  蠍一
NHN	NEXT	Eunjoo	Im
C++ 蠍磯

襦


豢豌: LetSwift 2016 Realm.io 語
SQLite 蠍磯  螻 C++ 貊企ゼ 螳讌
NHN	NEXT	Eunjoo	Im
Realm

レ
豢豌: https://realm.io/kr/
 觜襯 

 覈覦殊 伎 襷れ伎蠍 覓語,
一危襯 ロ螻 覿る 蟆 觜襯願 

 覿 蠍磯

 襷願係伎, 蠏碁 貎朱Μ, 誤 磯 煙 
 蠍磯レ 讌

  

 Object襯
NHN	NEXT	Eunjoo	Im
觜襯 (1)

: v.s. SQLite
豢豌: http://static.realm.io/downloads/java/android-benchmark.zip
NHN	NEXT	Eunjoo	Im
觜襯 (2)

: Zero-copy
 蠍一ヾ ORM Copy螳 

 Realm Copy螳 覿

 memory mapped file 

 In-memory 豌 disk 

 曙 一危一 offset 螻

 mapped file 曙伎

 property access伎 覲瑚 覦

 Results  一危
豢豌: LetSwift 2016 Realm.io 語
NHN	NEXT	Eunjoo	Im
 (1)

: 螳蟆壱 貊
 RLMObject襯  覈 

 煙 property襦  

 蟯螻 襭蟲譟磯 蟆  煙企 RLMArray 螳豌
襴ろ碁ゼ  螳蟆 
豢豌: https://realm.io/kr/
NHN	NEXT	Eunjoo	Im
 (1)

: 螳蟆壱 貊
豢豌: http://stackoverflow.com/questions/20649350/updating-object-with-core-data-inserts-a-new-record
Entity * entityInstance = nil;

entityInstance = [self fetchEntityForID:entityInstanceID
inContext:context];

if (entityInstance == nil) {

entityInstance = [NSEntityDescription
insertNewObjectForEntityForName:@"Entity"
inManagedObjectContext:context];

}

- (Entity *)fetchEntityForID:(NSNumber *) articleID inContext:
(NSManagedObjectContext *) writeContext {

NSFetchRequest *fetchRequest = [NSFetchRequest
fetchRequestWithEntityName:@"Entity"];

NSPredicate * predicate = [NSPredicate
predicateWithFormat:@"articleID == %@",articleID];

[fetchRequest setPredicate:predicate];

NSArray *fetchedArray = [writeContext
executeFetchRequest:fetchRequest error:nil];

if ([fetchedArray count] > 0)

return [fetchedArray objectAtIndex:0];

return nil;

}
Core data襦 insert or update
NHN	NEXT	Eunjoo	Im
 (1)

: 螳蟆壱 貊
Realm朱 insert or update
豢豌: https://realm.io/kr/
NHN	NEXT	Eunjoo	Im
 (2)

: れ 貎朱Μ
 Chaining 螳ロ れ 貎朱Μ 讌 e.g. 磯

    螳 煙朱  蠍一企  れ
豢豌: https://realm.io/kr/
NHN	NEXT	Eunjoo	Im
覿 蠍磯
(1)

: 誤
豢豌: https://realm.io/kr/
   64 覦危 誤 るゼ 螻牛覃
AES-256+SHA2 覦朱
ろ  一危磯伎 殊 誤襯 讌
NHN	NEXT	Eunjoo	Im
覿 蠍磯
(2)

: notification
豢豌: https://realm.io/kr/
 addNotificationBlock 覃襯 語伎 RLMRealm,
RLMResults, RLMArray, RLMLinkingObjects螳 一
碁 襷 旧襯 覦襦 焔

  RLMObject 覲襯 螳讌蠍  Key-Value
Observation  螳

 Realm 螳豌企 郁鍵 碁 貉る襷 襴殊 覲企伎
NHN	NEXT	Eunjoo	Im
覿 蠍磯
(3)

: browser
豢豌: https://realm.io/kr/
 一危磯伎るゼ 所 ク讌   觚殊一 螻
NHN	NEXT	Eunjoo	Im
覿 蠍磯(4)

: Xcode
蠏語
豢豌: https://realm.io/kr/
  Realm 覈語 所 襷   蠏語 螻
NHN	NEXT	Eunjoo	Im
覿 蠍磯(4)

: Realm
add-ons
豢豌: https://realm.io/kr/
 Realm 蠍磯  螳覦   貉るる
NHN	NEXT	Eunjoo	Im
れ(1)

: Realm れ
 CocoaPods 伎

 Podfile pod Realm  蟆 豢螳螻 pod
Realm/Headers襯 ろ 蟆 豢螳

 貉るЖ殊語 牛 pod install ろ

 Static Framework

 Realm 豕 覯 れ企伎 豢 蠍

 ios/static/ 襴 Realm.framework  
Xcode 襦語 File Navigation j鍵 (Copy items if
needed 豌危)

 Xcode File Navigator 襦 企Ν >
危襴貅伎   > Build Phases > 
Link Binary with Libraries  + 企Ν > libc++.tbd 襯 豢螳
NHN	NEXT	Eunjoo	Im
れ(2)

: 覈 れ
#import <Realm/Realm.h>

@interface EJRealmData : RLMObject

@property NSInteger id;

@property BOOL status;

@property int type;

@property int character;

@property NSString *title;

@property NSDate *date;

@property NSString *start;

@property NSString *end;

@property NSString *current;

@property NSString *unit;

@property NSString *startString;

@property NSString *endString;

@property NSString *now;

@property float percent;

@end

RLM_ARRAY_TYPE(EJRealmData)
#import "EJRealmData.h"

@implementation EJRealmData

+ (NSString *)primaryKey {

return @"id";

}

+ (NSArray *)requiredProperties {

return @[@"id", @"type", @"title"];

}

+ (NSArray *)ignoredProperties {

return @[@"startString", 

@"endString", @"now", @"percent"];
}

+ (NSArray *)indexedProperties {

return @[@"status"];

}

+ (NSDictionary *)defaultPropertyValues {
return @{@"status" : @YES};

}

@end
<EJRealmData.h> <EJRealmData.m>
蠍磯蓋
ロ讌  
碁煙
NHN	NEXT	Eunjoo	Im
れ(3)

: 一危

襷り鍵
EJRealmData *newData;

EJDataManager *dataManager = [EJDataManager sharedInstance];

newData = [[EJRealmData alloc] initWithValue:@{

@"id" : @([dataManager getIdManager]),

@type" : @(0),

@"character" : @(timeCharacterNumber ),

@"title" : @"title",

@"date" : [NSDate date],

@"start" : [NSDate date],

@"end" : [NSDate date] 

}];
<EJDataManager.m>
谿 id 襷り鍵
 data 襷り鍵
- (int)getIdManager {

NSLog(@"idManager: %d", idManager)
return idManager++;

}
int idManager;

+ (EJDataManager *)sharedInstance {

static dispatch_once_t pred;

static EJDataManager *shared = nil;

dispatch_once(&pred, ^{

shared = [[EJDataManager alloc] init];

realm = [RLMRealm defaultRealm];

idManager = [[[EJRealmData allObjects] maxOfProperty:@"id"]
intValue]++;

});



return shared;

}
NHN	NEXT	Eunjoo	Im
れ(4)

: 一危

所鍵/郁鍵
- (void)addData:(EJRealmData *)data {

[realm beginWriteTransaction];

[realm addOrUpdateObject:data];

[realm commitWriteTransaction];

}

- (void)updateData:(int)id {

[realm beginWriteTransaction];

EJRealmData *targetData = [self getData:id];

targetData.status = NO;

[realm commitWriteTransaction];

}

- (NSMutableArray *)getAllData {

NSPredicate *pred = [NSPredicate predicateWithFormat:@"status =
%hhd", YES];

RLMResults *allData = [EJRealmData objectsWithPredicate:pred];



NSMutableArray *resultArray = [[NSMutableArray alloc] init];

for (EJRealmData *data in allData) {

[resultArray addObject:[self setProperties:data start:data.start
end:data.end type:data.type]];

}



return resultArray;

}
add or update
update data
get all data whose status is YES
NHN	NEXT	Eunjoo	Im
谿瑚
襭
https://realm.io/kr/
realm.io/kr
http://www.letswift.kr/2016/
LetSwift 2016 

: Realm 語
NHN	NEXT	Eunjoo	Im
Thank	
You

More Related Content

What's hot (20)

れ 焔 危危蠍
れ 焔 危危蠍れ 焔 危危蠍
れ 焔 危危蠍
Yongha Yoo
Jupyter notebok tensorboard ろ蠍_20160706
Jupyter notebok tensorboard ろ蠍_20160706Jupyter notebok tensorboard ろ蠍_20160706
Jupyter notebok tensorboard ろ蠍_20160706
Yong Joon Moon
Javascript
JavascriptJavascript
Javascript
Hong Hyo Sang
0.逮温厩温壊界姻庄沿岳蠍磯蓋(簡3殊姶)
0.逮温厩温壊界姻庄沿岳蠍磯蓋(簡3殊姶)0.逮温厩温壊界姻庄沿岳蠍磯蓋(簡3殊姶)
0.逮温厩温壊界姻庄沿岳蠍磯蓋(簡3殊姶)
Sung-hoon Ma
Do swift: Swift 覓伎 企慨蠍
Do swift: Swift 覓伎 企慨蠍Do swift: Swift 覓伎 企慨蠍
Do swift: Swift 覓伎 企慨蠍
YoonBong Steve Kim
Startup JavaScript 5 - 螳豌(Date, RegExp, Object, Global)
Startup JavaScript 5 - 螳豌(Date, RegExp, Object, Global)Startup JavaScript 5 - 螳豌(Date, RegExp, Object, Global)
Startup JavaScript 5 - 螳豌(Date, RegExp, Object, Global)
Circulus
iOS 求
iOS 求iOS 求
iOS 求
Changwon National University
れ, 貊襴郁骸 覈語伎 轟 (Swift, Kotlin and Modern Languages)
れ, 貊襴郁骸 覈語伎 轟 (Swift, Kotlin and Modern Languages)れ, 貊襴郁骸 覈語伎 轟 (Swift, Kotlin and Modern Languages)
れ, 貊襴郁骸 覈語伎 轟 (Swift, Kotlin and Modern Languages)
Yongha Yoo
6 swift 梶午=戟
6 swift 梶午=戟6 swift 梶午=戟
6 swift 梶午=戟
Changwon National University
Startup JavaScript 4 - 螳豌
Startup JavaScript 4 - 螳豌Startup JavaScript 4 - 螳豌
Startup JavaScript 4 - 螳豌
Circulus
Java 危危蠍 貊 20210405
Java 危危蠍  貊 20210405Java 危危蠍  貊 20210405
Java 危危蠍 貊 20210405
Hyosang Hong
Cpp 企慨 Lambda
Cpp 企慨 LambdaCpp 企慨 Lambda
Cpp 企慨 Lambda
TonyCms
朱 貊襴
朱  貊襴朱  貊襴
朱 貊襴
Park JoongSoo
Java 覲襭
Java 覲襭Java 覲襭
Java 覲襭
Hyosang Hong
Effective cpp
Effective cppEffective cpp
Effective cpp
TonyCms
Javascript 覯 螳企 襴
Javascript 覯 螳企 襴Javascript 覯 螳企 襴
Javascript 覯 螳企 襴
ETRIBE_STG
Startup JavaScript 8 - NPM, Express.JS
Startup JavaScript 8 - NPM, Express.JSStartup JavaScript 8 - NPM, Express.JS
Startup JavaScript 8 - NPM, Express.JS
Circulus
襦語ろ磯 E05 js closure oop
襦語ろ磯 E05 js closure oop襦語ろ磯 E05 js closure oop
襦語ろ磯 E05 js closure oop
Young-Beom Rhee
螻 2
 螻 2 螻 2
螻 2
HyeonSeok Choi
[KGC 2012]Boost.asio襯 伎 ろ語 襦蠏碁覦
[KGC 2012]Boost.asio襯 伎 ろ語 襦蠏碁覦[KGC 2012]Boost.asio襯 伎 ろ語 襦蠏碁覦
[KGC 2012]Boost.asio襯 伎 ろ語 襦蠏碁覦
ル旭 豕
れ 焔 危危蠍
れ 焔 危危蠍れ 焔 危危蠍
れ 焔 危危蠍
Yongha Yoo
Jupyter notebok tensorboard ろ蠍_20160706
Jupyter notebok tensorboard ろ蠍_20160706Jupyter notebok tensorboard ろ蠍_20160706
Jupyter notebok tensorboard ろ蠍_20160706
Yong Joon Moon
0.逮温厩温壊界姻庄沿岳蠍磯蓋(簡3殊姶)
0.逮温厩温壊界姻庄沿岳蠍磯蓋(簡3殊姶)0.逮温厩温壊界姻庄沿岳蠍磯蓋(簡3殊姶)
0.逮温厩温壊界姻庄沿岳蠍磯蓋(簡3殊姶)
Sung-hoon Ma
Do swift: Swift 覓伎 企慨蠍
Do swift: Swift 覓伎 企慨蠍Do swift: Swift 覓伎 企慨蠍
Do swift: Swift 覓伎 企慨蠍
YoonBong Steve Kim
Startup JavaScript 5 - 螳豌(Date, RegExp, Object, Global)
Startup JavaScript 5 - 螳豌(Date, RegExp, Object, Global)Startup JavaScript 5 - 螳豌(Date, RegExp, Object, Global)
Startup JavaScript 5 - 螳豌(Date, RegExp, Object, Global)
Circulus
れ, 貊襴郁骸 覈語伎 轟 (Swift, Kotlin and Modern Languages)
れ, 貊襴郁骸 覈語伎 轟 (Swift, Kotlin and Modern Languages)れ, 貊襴郁骸 覈語伎 轟 (Swift, Kotlin and Modern Languages)
れ, 貊襴郁骸 覈語伎 轟 (Swift, Kotlin and Modern Languages)
Yongha Yoo
Startup JavaScript 4 - 螳豌
Startup JavaScript 4 - 螳豌Startup JavaScript 4 - 螳豌
Startup JavaScript 4 - 螳豌
Circulus
Java 危危蠍 貊 20210405
Java 危危蠍  貊 20210405Java 危危蠍  貊 20210405
Java 危危蠍 貊 20210405
Hyosang Hong
Cpp 企慨 Lambda
Cpp 企慨 LambdaCpp 企慨 Lambda
Cpp 企慨 Lambda
TonyCms
Effective cpp
Effective cppEffective cpp
Effective cpp
TonyCms
Javascript 覯 螳企 襴
Javascript 覯 螳企 襴Javascript 覯 螳企 襴
Javascript 覯 螳企 襴
ETRIBE_STG
Startup JavaScript 8 - NPM, Express.JS
Startup JavaScript 8 - NPM, Express.JSStartup JavaScript 8 - NPM, Express.JS
Startup JavaScript 8 - NPM, Express.JS
Circulus
襦語ろ磯 E05 js closure oop
襦語ろ磯 E05 js closure oop襦語ろ磯 E05 js closure oop
襦語ろ磯 E05 js closure oop
Young-Beom Rhee
[KGC 2012]Boost.asio襯 伎 ろ語 襦蠏碁覦
[KGC 2012]Boost.asio襯 伎 ろ語 襦蠏碁覦[KGC 2012]Boost.asio襯 伎 ろ語 襦蠏碁覦
[KGC 2012]Boost.asio襯 伎 ろ語 襦蠏碁覦
ル旭 豕

Viewers also liked (10)

Realm 貊豺危 - 伎谿
Realm   貊豺危 - 伎谿Realm   貊豺危 - 伎谿
Realm 貊豺危 - 伎谿
Lee-Jong-Chan
Cocoaheads Lille - September 2013
Cocoaheads Lille - September 2013Cocoaheads Lille - September 2013
Cocoaheads Lille - September 2013
Cl辿ment Sauvage
D辿jeuner Technologiques - Introduction to iOS Development & App Marketing
D辿jeuner Technologiques - Introduction to iOS Development & App MarketingD辿jeuner Technologiques - Introduction to iOS Development & App Marketing
D辿jeuner Technologiques - Introduction to iOS Development & App Marketing
Cl辿ment Sauvage
Realm.io par Clement Sauvage
Realm.io par Clement SauvageRealm.io par Clement Sauvage
Realm.io par Clement Sauvage
CocoaHeads France
[1B6]Realm a database for android & ios
[1B6]Realm a database for android & ios[1B6]Realm a database for android & ios
[1B6]Realm a database for android & ios
NAVER D2
覈詞 Realm 蠍
覈詞 Realm 蠍覈詞 Realm 蠍
覈詞 Realm 蠍
Mijeong Jeon
Realm of the Mobile Database: an introduction to Realm
Realm of the Mobile Database: an introduction to RealmRealm of the Mobile Database: an introduction to Realm
Realm of the Mobile Database: an introduction to Realm
Martin Grider
Realm Presentation
Realm PresentationRealm Presentation
Realm Presentation
Ph畉m Kh畉c
02 realm 覈 &amp; 蟯螻
02   realm 覈 &amp; 蟯螻02   realm 覈 &amp; 蟯螻
02 realm 覈 &amp; 蟯螻
Lee-Jong-Chan
檎艶温鉛馨脚製矧蠍
檎艶温鉛馨脚製矧蠍檎艶温鉛馨脚製矧蠍
檎艶温鉛馨脚製矧蠍
Lee-Jong-Chan
Realm 貊豺危 - 伎谿
Realm   貊豺危 - 伎谿Realm   貊豺危 - 伎谿
Realm 貊豺危 - 伎谿
Lee-Jong-Chan
Cocoaheads Lille - September 2013
Cocoaheads Lille - September 2013Cocoaheads Lille - September 2013
Cocoaheads Lille - September 2013
Cl辿ment Sauvage
D辿jeuner Technologiques - Introduction to iOS Development & App Marketing
D辿jeuner Technologiques - Introduction to iOS Development & App MarketingD辿jeuner Technologiques - Introduction to iOS Development & App Marketing
D辿jeuner Technologiques - Introduction to iOS Development & App Marketing
Cl辿ment Sauvage
Realm.io par Clement Sauvage
Realm.io par Clement SauvageRealm.io par Clement Sauvage
Realm.io par Clement Sauvage
CocoaHeads France
[1B6]Realm a database for android & ios
[1B6]Realm a database for android & ios[1B6]Realm a database for android & ios
[1B6]Realm a database for android & ios
NAVER D2
覈詞 Realm 蠍
覈詞 Realm 蠍覈詞 Realm 蠍
覈詞 Realm 蠍
Mijeong Jeon
Realm of the Mobile Database: an introduction to Realm
Realm of the Mobile Database: an introduction to RealmRealm of the Mobile Database: an introduction to Realm
Realm of the Mobile Database: an introduction to Realm
Martin Grider
Realm Presentation
Realm PresentationRealm Presentation
Realm Presentation
Ph畉m Kh畉c
02 realm 覈 &amp; 蟯螻
02   realm 覈 &amp; 蟯螻02   realm 覈 &amp; 蟯螻
02 realm 覈 &amp; 蟯螻
Lee-Jong-Chan
檎艶温鉛馨脚製矧蠍
檎艶温鉛馨脚製矧蠍檎艶温鉛馨脚製矧蠍
檎艶温鉛馨脚製矧蠍
Lee-Jong-Chan

Similar to Realm.io for iOS (20)

OpenStack Swift Debugging
OpenStack Swift DebuggingOpenStack Swift Debugging
OpenStack Swift Debugging
OpenStack Korea Community
Anatomy of Realm
Anatomy of RealmAnatomy of Realm
Anatomy of Realm
Leonardo YongUk Kim
Node.js ろ磯 覦襭.
Node.js  ろ磯 覦襭.Node.js  ろ磯 覦襭.
Node.js ろ磯 覦襭.
SeungWoo Lee
Node.js 蠍磯蓋
Node.js 蠍磯蓋Node.js 蠍磯蓋
Node.js 蠍磯蓋
Han Jung Hyun
KGC 2016 ろ ろ語 讌 Super socket 蠍
KGC 2016 ろ ろ語 讌 Super socket 蠍KGC 2016 ろ ろ語 讌 Super socket 蠍
KGC 2016 ろ ろ語 讌 Super socket 蠍
ル旭 豕
Realm @Android
Realm @Android Realm @Android
Realm @Android
Theodore(Yongbin) Cha
Nodejs, PhantomJS, casperJs, YSlow, expressjs
Nodejs, PhantomJS, casperJs, YSlow, expressjsNodejs, PhantomJS, casperJs, YSlow, expressjs
Nodejs, PhantomJS, casperJs, YSlow, expressjs
蠍磯
Realm, Mobile Database
Realm, Mobile DatabaseRealm, Mobile Database
Realm, Mobile Database
Bongwon Lee
Do IoT Yourself! - 覓 螳 郁屋 Open API
Do IoT Yourself! - 覓 螳 郁屋  Open APIDo IoT Yourself! - 覓 螳 郁屋  Open API
Do IoT Yourself! - 覓 螳 郁屋 Open API
Hyunghun Cho
Golang Project Guide from A to Z: From Feature Development to Enterprise Appl...
Golang Project Guide from A to Z: From Feature Development to Enterprise Appl...Golang Project Guide from A to Z: From Feature Development to Enterprise Appl...
Golang Project Guide from A to Z: From Feature Development to Enterprise Appl...
Kyuhyun Byun
Node.js 豌蟇語
Node.js 豌蟇語Node.js 豌蟇語
Node.js 豌蟇語
SeungHyun Lee
Hight performance java script chapter1, 2
Hight performance java script chapter1, 2Hight performance java script chapter1, 2
Hight performance java script chapter1, 2
YOUNGMIN JUN
C# Game Server
C# Game ServerC# Game Server
C# Game Server
lactrious
Blockchain 2nd ethereum_core
Blockchain 2nd ethereum_coreBlockchain 2nd ethereum_core
Blockchain 2nd ethereum_core
ihpark92
2. klaytn developer meetup #2 univ chain
2. klaytn developer meetup #2 univ chain2. klaytn developer meetup #2 univ chain
2. klaytn developer meetup #2 univ chain
覩手
GKAC 2015 Apr. - Battery, 襦企襯 API 語
GKAC 2015 Apr. - Battery, 襦企襯    API 語GKAC 2015 Apr. - Battery, 襦企襯    API 語
GKAC 2015 Apr. - Battery, 襦企襯 API 語
GDG Korea
Html5 performance
Html5 performanceHtml5 performance
Html5 performance
yongwoo Jeon
Node.js 螻
Node.js 螻 Node.js 螻
Node.js 螻
Jin wook
[AWSKRUG] 覈覦手 企 一広蠍 (2018)
[AWSKRUG] 覈覦手 企 一広蠍 (2018)[AWSKRUG] 覈覦手 企 一広蠍 (2018)
[AWSKRUG] 覈覦手 企 一広蠍 (2018)
覈覦 蟆 企 一広蠍 - 豕
覈覦 蟆 企 一広蠍 - 豕覈覦 蟆 企 一広蠍 - 豕
覈覦 蟆 企 一広蠍 - 豕
Node.js ろ磯 覦襭.
Node.js  ろ磯 覦襭.Node.js  ろ磯 覦襭.
Node.js ろ磯 覦襭.
SeungWoo Lee
Node.js 蠍磯蓋
Node.js 蠍磯蓋Node.js 蠍磯蓋
Node.js 蠍磯蓋
Han Jung Hyun
KGC 2016 ろ ろ語 讌 Super socket 蠍
KGC 2016 ろ ろ語 讌 Super socket 蠍KGC 2016 ろ ろ語 讌 Super socket 蠍
KGC 2016 ろ ろ語 讌 Super socket 蠍
ル旭 豕
Nodejs, PhantomJS, casperJs, YSlow, expressjs
Nodejs, PhantomJS, casperJs, YSlow, expressjsNodejs, PhantomJS, casperJs, YSlow, expressjs
Nodejs, PhantomJS, casperJs, YSlow, expressjs
蠍磯
Realm, Mobile Database
Realm, Mobile DatabaseRealm, Mobile Database
Realm, Mobile Database
Bongwon Lee
Do IoT Yourself! - 覓 螳 郁屋 Open API
Do IoT Yourself! - 覓 螳 郁屋  Open APIDo IoT Yourself! - 覓 螳 郁屋  Open API
Do IoT Yourself! - 覓 螳 郁屋 Open API
Hyunghun Cho
Golang Project Guide from A to Z: From Feature Development to Enterprise Appl...
Golang Project Guide from A to Z: From Feature Development to Enterprise Appl...Golang Project Guide from A to Z: From Feature Development to Enterprise Appl...
Golang Project Guide from A to Z: From Feature Development to Enterprise Appl...
Kyuhyun Byun
Node.js 豌蟇語
Node.js 豌蟇語Node.js 豌蟇語
Node.js 豌蟇語
SeungHyun Lee
Hight performance java script chapter1, 2
Hight performance java script chapter1, 2Hight performance java script chapter1, 2
Hight performance java script chapter1, 2
YOUNGMIN JUN
C# Game Server
C# Game ServerC# Game Server
C# Game Server
lactrious
Blockchain 2nd ethereum_core
Blockchain 2nd ethereum_coreBlockchain 2nd ethereum_core
Blockchain 2nd ethereum_core
ihpark92
2. klaytn developer meetup #2 univ chain
2. klaytn developer meetup #2 univ chain2. klaytn developer meetup #2 univ chain
2. klaytn developer meetup #2 univ chain
覩手
GKAC 2015 Apr. - Battery, 襦企襯 API 語
GKAC 2015 Apr. - Battery, 襦企襯    API 語GKAC 2015 Apr. - Battery, 襦企襯    API 語
GKAC 2015 Apr. - Battery, 襦企襯 API 語
GDG Korea
Html5 performance
Html5 performanceHtml5 performance
Html5 performance
yongwoo Jeon
Node.js 螻
Node.js 螻 Node.js 螻
Node.js 螻
Jin wook
[AWSKRUG] 覈覦手 企 一広蠍 (2018)
[AWSKRUG] 覈覦手 企 一広蠍 (2018)[AWSKRUG] 覈覦手 企 一広蠍 (2018)
[AWSKRUG] 覈覦手 企 一広蠍 (2018)
覈覦 蟆 企 一広蠍 - 豕
覈覦 蟆 企 一広蠍 - 豕覈覦 蟆 企 一広蠍 - 豕
覈覦 蟆 企 一広蠍 - 豕

Realm.io for iOS

  • 2. NHN NEXT Eunjoo Im Realm企? 觜襯願 煙ロ 覈覦 一危磯伎 (ろ) http://realm.io/kr SQLite CoreData襯 豌危 襦 一危磯伎 豢豌: LetSwift 2016 Realm.io 語
  • 3. NHN NEXT Eunjoo Im Realm 豢豌: https://realm.io/kr/ 2014 7 15 螻糾 2 讌 讌蠍 Realm 蠍一
  • 4. NHN NEXT Eunjoo Im C++ 蠍磯 襦 豢豌: LetSwift 2016 Realm.io 語 SQLite 蠍磯 螻 C++ 貊企ゼ 螳讌
  • 5. NHN NEXT Eunjoo Im Realm レ 豢豌: https://realm.io/kr/ 觜襯 覈覦殊 伎 襷れ伎蠍 覓語, 一危襯 ロ螻 覿る 蟆 觜襯願 覿 蠍磯 襷願係伎, 蠏碁 貎朱Μ, 誤 磯 煙 蠍磯レ 讌 Object襯
  • 6. NHN NEXT Eunjoo Im 觜襯 (1) : v.s. SQLite 豢豌: http://static.realm.io/downloads/java/android-benchmark.zip
  • 7. NHN NEXT Eunjoo Im 觜襯 (2) : Zero-copy 蠍一ヾ ORM Copy螳 Realm Copy螳 覿 memory mapped file In-memory 豌 disk 曙 一危一 offset 螻 mapped file 曙伎 property access伎 覲瑚 覦 Results 一危 豢豌: LetSwift 2016 Realm.io 語
  • 8. NHN NEXT Eunjoo Im (1) : 螳蟆壱 貊 RLMObject襯 覈 煙 property襦 蟯螻 襭蟲譟磯 蟆 煙企 RLMArray 螳豌 襴ろ碁ゼ 螳蟆 豢豌: https://realm.io/kr/
  • 9. NHN NEXT Eunjoo Im (1) : 螳蟆壱 貊 豢豌: http://stackoverflow.com/questions/20649350/updating-object-with-core-data-inserts-a-new-record Entity * entityInstance = nil; entityInstance = [self fetchEntityForID:entityInstanceID inContext:context]; if (entityInstance == nil) { entityInstance = [NSEntityDescription insertNewObjectForEntityForName:@"Entity" inManagedObjectContext:context]; } - (Entity *)fetchEntityForID:(NSNumber *) articleID inContext: (NSManagedObjectContext *) writeContext { NSFetchRequest *fetchRequest = [NSFetchRequest fetchRequestWithEntityName:@"Entity"]; NSPredicate * predicate = [NSPredicate predicateWithFormat:@"articleID == %@",articleID]; [fetchRequest setPredicate:predicate]; NSArray *fetchedArray = [writeContext executeFetchRequest:fetchRequest error:nil]; if ([fetchedArray count] > 0) return [fetchedArray objectAtIndex:0]; return nil; } Core data襦 insert or update
  • 10. NHN NEXT Eunjoo Im (1) : 螳蟆壱 貊 Realm朱 insert or update 豢豌: https://realm.io/kr/
  • 11. NHN NEXT Eunjoo Im (2) : れ 貎朱Μ Chaining 螳ロ れ 貎朱Μ 讌 e.g. 磯 螳 煙朱 蠍一企 れ 豢豌: https://realm.io/kr/
  • 12. NHN NEXT Eunjoo Im 覿 蠍磯 (1) : 誤 豢豌: https://realm.io/kr/ 64 覦危 誤 るゼ 螻牛覃 AES-256+SHA2 覦朱 ろ 一危磯伎 殊 誤襯 讌
  • 13. NHN NEXT Eunjoo Im 覿 蠍磯 (2) : notification 豢豌: https://realm.io/kr/ addNotificationBlock 覃襯 語伎 RLMRealm, RLMResults, RLMArray, RLMLinkingObjects螳 一 碁 襷 旧襯 覦襦 焔 RLMObject 覲襯 螳讌蠍 Key-Value Observation 螳 Realm 螳豌企 郁鍵 碁 貉る襷 襴殊 覲企伎
  • 14. NHN NEXT Eunjoo Im 覿 蠍磯 (3) : browser 豢豌: https://realm.io/kr/ 一危磯伎るゼ 所 ク讌 觚殊一 螻
  • 15. NHN NEXT Eunjoo Im 覿 蠍磯(4) : Xcode 蠏語 豢豌: https://realm.io/kr/ Realm 覈語 所 襷 蠏語 螻
  • 16. NHN NEXT Eunjoo Im 覿 蠍磯(4) : Realm add-ons 豢豌: https://realm.io/kr/ Realm 蠍磯 螳覦 貉るる
  • 17. NHN NEXT Eunjoo Im れ(1) : Realm れ CocoaPods 伎 Podfile pod Realm 蟆 豢螳螻 pod Realm/Headers襯 ろ 蟆 豢螳 貉るЖ殊語 牛 pod install ろ Static Framework Realm 豕 覯 れ企伎 豢 蠍 ios/static/ 襴 Realm.framework Xcode 襦語 File Navigation j鍵 (Copy items if needed 豌危) Xcode File Navigator 襦 企Ν > 危襴貅伎 > Build Phases > Link Binary with Libraries + 企Ν > libc++.tbd 襯 豢螳
  • 18. NHN NEXT Eunjoo Im れ(2) : 覈 れ #import <Realm/Realm.h> @interface EJRealmData : RLMObject @property NSInteger id; @property BOOL status; @property int type; @property int character; @property NSString *title; @property NSDate *date; @property NSString *start; @property NSString *end; @property NSString *current; @property NSString *unit; @property NSString *startString; @property NSString *endString; @property NSString *now; @property float percent; @end RLM_ARRAY_TYPE(EJRealmData) #import "EJRealmData.h" @implementation EJRealmData + (NSString *)primaryKey { return @"id"; } + (NSArray *)requiredProperties { return @[@"id", @"type", @"title"]; } + (NSArray *)ignoredProperties { return @[@"startString", @"endString", @"now", @"percent"]; } + (NSArray *)indexedProperties { return @[@"status"]; } + (NSDictionary *)defaultPropertyValues { return @{@"status" : @YES}; } @end <EJRealmData.h> <EJRealmData.m> 蠍磯蓋 ロ讌 碁煙
  • 19. NHN NEXT Eunjoo Im れ(3) : 一危 襷り鍵 EJRealmData *newData; EJDataManager *dataManager = [EJDataManager sharedInstance]; newData = [[EJRealmData alloc] initWithValue:@{ @"id" : @([dataManager getIdManager]), @type" : @(0), @"character" : @(timeCharacterNumber ), @"title" : @"title", @"date" : [NSDate date], @"start" : [NSDate date], @"end" : [NSDate date] }]; <EJDataManager.m> 谿 id 襷り鍵 data 襷り鍵 - (int)getIdManager { NSLog(@"idManager: %d", idManager) return idManager++; } int idManager; + (EJDataManager *)sharedInstance { static dispatch_once_t pred; static EJDataManager *shared = nil; dispatch_once(&pred, ^{ shared = [[EJDataManager alloc] init]; realm = [RLMRealm defaultRealm]; idManager = [[[EJRealmData allObjects] maxOfProperty:@"id"] intValue]++; }); return shared; }
  • 20. NHN NEXT Eunjoo Im れ(4) : 一危 所鍵/郁鍵 - (void)addData:(EJRealmData *)data { [realm beginWriteTransaction]; [realm addOrUpdateObject:data]; [realm commitWriteTransaction]; } - (void)updateData:(int)id { [realm beginWriteTransaction]; EJRealmData *targetData = [self getData:id]; targetData.status = NO; [realm commitWriteTransaction]; } - (NSMutableArray *)getAllData { NSPredicate *pred = [NSPredicate predicateWithFormat:@"status = %hhd", YES]; RLMResults *allData = [EJRealmData objectsWithPredicate:pred]; NSMutableArray *resultArray = [[NSMutableArray alloc] init]; for (EJRealmData *data in allData) { [resultArray addObject:[self setProperties:data start:data.start end:data.end type:data.type]]; } return resultArray; } add or update update data get all data whose status is YES