<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>블로그이름영역</title>
    <link>https://somethingjin.tistory.com/</link>
    <description>블로그 설명 영역</description>
    <language>ko</language>
    <pubDate>Mon, 1 Jun 2026 19:17:57 +0900</pubDate>
    <generator>TISTORY</generator>
    <ttl>100</ttl>
    <managingEditor>닉네임영역</managingEditor>
    <image>
      <title>블로그이름영역</title>
      <url>https://tistory1.daumcdn.net/tistory/272690/attach/1de246d75f6d4bc8bad3f584d73e3290</url>
      <link>https://somethingjin.tistory.com</link>
    </image>
    <item>
      <title>closure</title>
      <link>https://somethingjin.tistory.com/165</link>
      <description>&lt;p data-ke-size=&quot;size16&quot;&gt;- 기본 형태&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;{ (매개변수 목록) -&amp;gt; 반환타입 &lt;b&gt;in&lt;/b&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 실행 코드&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;}&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;- 매개변수 없는 경우&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;{ () -&amp;gt; 반환타입&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;in&lt;/b&gt;&lt;/p&gt;
&lt;p style=&quot;color: #333333; text-align: start;&quot; data-ke-size=&quot;size16&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 실행 코드&lt;/p&gt;
&lt;p style=&quot;color: #333333; text-align: start;&quot; data-ke-size=&quot;size16&quot;&gt;}&lt;/p&gt;
&lt;p style=&quot;color: #333333; text-align: start;&quot; data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style=&quot;color: #333333; text-align: start;&quot; data-ke-size=&quot;size16&quot;&gt;- 반환타입 없는 경우&lt;/p&gt;
&lt;p style=&quot;color: #333333; text-align: start;&quot; data-ke-size=&quot;size16&quot;&gt;{ (매개변수 목록) -&amp;gt; Void&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;in&lt;/b&gt;&lt;/p&gt;
&lt;p style=&quot;color: #333333; text-align: start;&quot; data-ke-size=&quot;size16&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 실행 코드&lt;/p&gt;
&lt;p style=&quot;color: #333333; text-align: start;&quot; data-ke-size=&quot;size16&quot;&gt;}&lt;/p&gt;
&lt;p style=&quot;color: #333333; text-align: start;&quot; data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style=&quot;color: #333333; text-align: start;&quot; data-ke-size=&quot;size16&quot;&gt;- 둘 다 없는 경우&lt;/p&gt;
&lt;p style=&quot;color: #333333; text-align: start;&quot; data-ke-size=&quot;size16&quot;&gt;{ () -&amp;gt; Void&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;in&lt;/b&gt;&lt;/p&gt;
&lt;p style=&quot;color: #333333; text-align: start;&quot; data-ke-size=&quot;size16&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 실행 코드&lt;/p&gt;
&lt;p style=&quot;color: #333333; text-align: start;&quot; data-ke-size=&quot;size16&quot;&gt;}&lt;/p&gt;</description>
      <category>Interesting/Swift</category>
      <author>닉네임영역</author>
      <guid isPermaLink="true">https://somethingjin.tistory.com/165</guid>
      <comments>https://somethingjin.tistory.com/165#entry165comment</comments>
      <pubDate>Mon, 28 Aug 2023 16:04:40 +0900</pubDate>
    </item>
    <item>
      <title>기초 정보</title>
      <link>https://somethingjin.tistory.com/163</link>
      <description>&lt;p&gt;선언&lt;/p&gt;&lt;p&gt;변수&amp;nbsp;: var 변수명&lt;/p&gt;&lt;p&gt;상수&amp;nbsp;: let 상수명&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;반 닫힌 범위 연산자(half-closed range operator)&lt;/p&gt;&lt;p&gt;1..&amp;lt;5 = 1,2,3,4&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;루프 상수 생략 : _ 로 대체 가능&lt;/p&gt;&lt;p&gt;for _ in 1...size {&lt;/p&gt;&lt;p&gt;실행문&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;repeat ~ while : do ~ while문 과 동일, 최소 한번 이상 실행 후 조건 체크 후 실행 여부 판단&lt;/p&gt;&lt;p&gt;repeat {&lt;/p&gt;&lt;p&gt;&amp;nbsp;n = n * 2&lt;/p&gt;&lt;p&gt;}&amp;nbsp;&lt;/p&gt;&lt;p&gt;while n &amp;lt; 1000&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;guard : if ~ else 동일 기능, else 필수, 결과가 참일 경우에는 실행되는 블록 없음, 즉 else인 경우에만 실행&lt;/p&gt;&lt;p&gt;guard 조건 else {&lt;/p&gt;&lt;p&gt;실행문&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>Interesting/Swift</category>
      <author>닉네임영역</author>
      <guid isPermaLink="true">https://somethingjin.tistory.com/163</guid>
      <comments>https://somethingjin.tistory.com/163#entry163comment</comments>
      <pubDate>Thu, 20 Apr 2017 18:02:48 +0900</pubDate>
    </item>
    <item>
      <title>How to use svn in Terminal</title>
      <link>https://somethingjin.tistory.com/161</link>
      <description>&lt;p&gt;- svn ls svn_url&lt;/p&gt;&lt;p&gt;&amp;nbsp;: svn 내 파일 보기&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;- svn checkout svn_url local_url&lt;/p&gt;&lt;p&gt;&amp;nbsp;: checkout&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;- svn commit local_url -m &quot;comment&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp;: commit&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;- svn import import_path svn_url&lt;/p&gt;&lt;p&gt;&amp;nbsp;: import&lt;/p&gt;&lt;p&gt;&amp;nbsp;: &quot;*.a&quot; 같은 파일은 추가 안될 수 있음. 이때 사용 가능한 옵션 --no-ignore&lt;/p&gt;</description>
      <category>Interesting/ETC</category>
      <category>checkout</category>
      <category>comment</category>
      <category>commit</category>
      <category>import_path</category>
      <category>no-ignore</category>
      <category>SVN</category>
      <author>닉네임영역</author>
      <guid isPermaLink="true">https://somethingjin.tistory.com/161</guid>
      <comments>https://somethingjin.tistory.com/161#entry161comment</comments>
      <pubDate>Thu, 19 Jan 2017 10:55:28 +0900</pubDate>
    </item>
    <item>
      <title>cocoapods 사용법</title>
      <link>https://somethingjin.tistory.com/158</link>
      <description>&lt;p&gt;1. terminal 실행&lt;/p&gt;&lt;p style=&quot;margin-left: 2em;&quot;&gt;- sudo gem install cocoapods(시간 좀 걸림)&lt;/p&gt;&lt;p style=&quot;margin-left: 2em;&quot;&gt;- pod setup(시간 좀 걸림)&lt;/p&gt;&lt;p style=&quot;margin-left: 2em;&quot;&gt;- Performing a deep fetch of the 'master' specs repo to improve performance 나오면 rm -fr ./cocoapods/repos/master 후 다시 pod setup&lt;/p&gt;&lt;p&gt;2. workspace create&lt;/p&gt;&lt;p&gt;3. project create&lt;/p&gt;&lt;p&gt;4. workspace에 3번 생성한 project add&lt;/p&gt;&lt;p&gt;5. terminal에서 workspace와 proect가 있는 폴더로 이동&lt;/p&gt;&lt;p&gt;6. pod init(Podfile 생성 확인)&lt;/p&gt;&lt;p&gt;7. Podfine 수정 (라이브러리 소스로 추가)&lt;/p&gt;&lt;p&gt;8. terminal에서 pod install(다운로드 확인)&lt;/p&gt;&lt;p&gt;9. #import &amp;lt;&amp;gt;&lt;/p&gt;&lt;p&gt;10. swift인 경우 use_framework! 추가&lt;/p&gt;</description>
      <category>Interesting/Swift</category>
      <author>닉네임영역</author>
      <guid isPermaLink="true">https://somethingjin.tistory.com/158</guid>
      <comments>https://somethingjin.tistory.com/158#entry158comment</comments>
      <pubDate>Tue, 2 Aug 2016 14:10:35 +0900</pubDate>
    </item>
    <item>
      <title>WWDC 2014 swift</title>
      <link>https://somethingjin.tistory.com/149</link>
      <description>&lt;p&gt;따따디씨에서 새로운 언어(?)를 발표했다.&amp;nbsp;&lt;/p&gt;&lt;p&gt;스위프트란다.&lt;/p&gt;&lt;p&gt;기존 코드들에 대해 확 줄어들게 코딩할 수 있다던데&amp;nbsp;&lt;/p&gt;&lt;p&gt;오늘 맛좀 봤다.&lt;/p&gt;&lt;p&gt;머든지 그렇겠지만 익숙해지면 편할듯&lt;/p&gt;&lt;p&gt;유니코드 지원으로 변수명 한글이 된다.&lt;/p&gt;&lt;p&gt;변수명을 변수라고 해봤다. 잘된다...ㅋㅋㅋ&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;다만 아직은 xcode6 - beta라서 자동완성 기능이 원활하지 않다.&lt;/p&gt;&lt;p&gt;스토리보드도 해야 하는데 스위프트까지 ;;;;&lt;/p&gt;&lt;p&gt;간단한 tutorial을 링크를 참조 하시길&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;http://text.youknowone.org/post/87652586691/swift-list&lt;/p&gt;&lt;p&gt;https://www.penflip.com/jjuakim/swift-korean&lt;/p&gt;</description>
      <category>Interesting/Swift</category>
      <category>swift</category>
      <category>WWDC 2014</category>
      <category>xcode6</category>
      <author>닉네임영역</author>
      <guid isPermaLink="true">https://somethingjin.tistory.com/149</guid>
      <comments>https://somethingjin.tistory.com/149#entry149comment</comments>
      <pubDate>Mon, 9 Jun 2014 13:59:47 +0900</pubDate>
    </item>
    <item>
      <title>image to md5 converting</title>
      <link>https://somethingjin.tistory.com/148</link>
      <description>&lt;p&gt;/////////////////////////&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;/////////////////////////&lt;/span&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;/////////////////////////&lt;/span&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;/////////////////////////////////&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;- (&lt;span class=&quot;s1&quot;&gt;NSMutableDictionary&lt;/span&gt; *)resourcesCheck {&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;NSString&lt;/span&gt;* bundlePath = [[&lt;span class=&quot;s1&quot;&gt;NSBundle&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;mainBundle&lt;/span&gt;] &lt;span class=&quot;s2&quot;&gt;bundlePath&lt;/span&gt;];&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;NSDirectoryEnumerator&lt;/span&gt; *enumerator = [[&lt;span class=&quot;s1&quot;&gt;NSFileManager&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;defaultManager&lt;/span&gt;] &lt;span class=&quot;s2&quot;&gt;enumeratorAtPath&lt;/span&gt;:bundlePath];&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;NSString&lt;/span&gt; *filePath;&lt;/p&gt;&lt;p class=&quot;p2&quot;&gt;&lt;span class=&quot;s3&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;NSMutableDictionary&lt;span class=&quot;s3&quot;&gt; *mArray = [[&lt;/span&gt;NSMutableDictionary&lt;span class=&quot;s3&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;alloc&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;] &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;init&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;];&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p3&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s4&quot;&gt;while&lt;/span&gt; ((filePath = [enumerator &lt;span class=&quot;s2&quot;&gt;nextObject&lt;/span&gt;]) != &lt;span class=&quot;s4&quot;&gt;nil&lt;/span&gt;) {&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s4&quot;&gt;if&lt;/span&gt; (![[filePath &lt;span class=&quot;s2&quot;&gt;pathExtension&lt;/span&gt;] &lt;span class=&quot;s2&quot;&gt;isEqualToString&lt;/span&gt;:&lt;span class=&quot;s5&quot;&gt;@&quot;nib&quot;&lt;/span&gt;]){&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;NSString&lt;/span&gt; *path = [bundlePath &lt;span class=&quot;s2&quot;&gt;stringByAppendingPathComponent&lt;/span&gt;:filePath];&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;NSData&lt;/span&gt; *nsData = [&lt;span class=&quot;s1&quot;&gt;NSData&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;dataWithContentsOfFile&lt;/span&gt;:path];&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s4&quot;&gt;if&lt;/span&gt; (nsData)&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s6&quot;&gt;NSLog&lt;/span&gt;(&lt;span class=&quot;s5&quot;&gt;@&quot;%@&quot;&lt;/span&gt;, [nsData &lt;span class=&quot;s7&quot;&gt;MD5&lt;/span&gt;]);&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [mArray &lt;span class=&quot;s2&quot;&gt;setObject&lt;/span&gt;:[nsData &lt;span class=&quot;s7&quot;&gt;MD5&lt;/span&gt;] &lt;span class=&quot;s2&quot;&gt;forKey&lt;/span&gt;:filePath];&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p class=&quot;p3&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s4&quot;&gt;return&lt;/span&gt; mArray;&lt;/p&gt;&lt;p&gt;
























&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;}&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;/////////////////////////&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;/////////////////////////&lt;/span&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;/////////////////////////&lt;/span&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;/////////////////////////////////&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&lt;span class=&quot;s1&quot;&gt;#import &lt;/span&gt;&quot;NSString+MD5.h&quot;&lt;/p&gt;&lt;p class=&quot;p2&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;p class=&quot;p3&quot;&gt;&lt;span class=&quot;s2&quot;&gt;@interface&lt;/span&gt; NSString(MD5)&lt;/p&gt;&lt;p class=&quot;p2&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;p class=&quot;p3&quot;&gt;- (&lt;span class=&quot;s3&quot;&gt;NSString&lt;/span&gt; *)MD5;&lt;/p&gt;&lt;p class=&quot;p2&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;













&lt;/p&gt;&lt;p class=&quot;p4&quot;&gt;@end&lt;/p&gt;&lt;p class=&quot;p4&quot;&gt;/////////////////////////&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;/////////////////////////&lt;/span&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;/////////////////////////&lt;/span&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;/////////////////////////////////&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&lt;span class=&quot;s1&quot;&gt;#import &lt;/span&gt;&amp;lt;CommonCrypto/CommonDigest.h&amp;gt;&lt;/p&gt;&lt;p class=&quot;p2&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;p class=&quot;p3&quot;&gt;@implementation&lt;span class=&quot;s2&quot;&gt; NSString(MD5)&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p2&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;p class=&quot;p4&quot;&gt;- (&lt;span class=&quot;s3&quot;&gt;NSString&lt;/span&gt;*)MD5&lt;/p&gt;&lt;p class=&quot;p4&quot;&gt;{&lt;/p&gt;&lt;p class=&quot;p5&quot;&gt;&lt;span class=&quot;s2&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt;	&lt;/span&gt;&lt;/span&gt;// Create pointer to the string as UTF8&lt;/p&gt;&lt;p class=&quot;p4&quot;&gt;&amp;nbsp; &lt;span class=&quot;s4&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;s4&quot;&gt;char&lt;/span&gt; *ptr = [&lt;span class=&quot;s4&quot;&gt;self&lt;/span&gt; &lt;span class=&quot;s5&quot;&gt;UTF8String&lt;/span&gt;];&lt;/p&gt;&lt;p class=&quot;p2&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;p5&quot;&gt;&lt;span class=&quot;s2&quot;&gt;&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot;&gt;	&lt;/span&gt;&lt;/span&gt;// Create byte array of unsigned chars&lt;/p&gt;&lt;p class=&quot;p6&quot;&gt;&lt;span class=&quot;s2&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s4&quot;&gt;unsigned&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s4&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; md5Buffer[&lt;/span&gt;CC_MD5_DIGEST_LENGTH&lt;span class=&quot;s2&quot;&gt;];&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p2&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;p5&quot;&gt;&lt;span class=&quot;s2&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt;	&lt;/span&gt;&lt;/span&gt;// Create 16 bytes MD5 hash value, store in buffer&lt;/p&gt;&lt;p class=&quot;p4&quot;&gt;&amp;nbsp; &lt;span class=&quot;s5&quot;&gt;CC_MD5&lt;/span&gt;(ptr, &lt;span class=&quot;s5&quot;&gt;strlen&lt;/span&gt;(ptr), md5Buffer);&lt;/p&gt;&lt;p class=&quot;p2&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;p5&quot;&gt;&lt;span class=&quot;s2&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt;	&lt;/span&gt;&lt;/span&gt;// Convert unsigned char buffer to NSString of hex values&lt;/p&gt;&lt;p class=&quot;p7&quot;&gt;&lt;span class=&quot;s2&quot;&gt;&amp;nbsp; &lt;/span&gt;NSMutableString&lt;span class=&quot;s2&quot;&gt; *output = [&lt;/span&gt;NSMutableString&lt;span class=&quot;s2&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s5&quot;&gt;stringWithCapacity&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;CC_MD5_DIGEST_LENGTH&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; * &lt;/span&gt;&lt;span class=&quot;s6&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;];&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p4&quot;&gt;&amp;nbsp; &lt;span class=&quot;s4&quot;&gt;for&lt;/span&gt;(&lt;span class=&quot;s4&quot;&gt;int&lt;/span&gt; i = &lt;span class=&quot;s6&quot;&gt;0&lt;/span&gt;; i &amp;lt; &lt;span class=&quot;s1&quot;&gt;CC_MD5_DIGEST_LENGTH&lt;/span&gt;; i++)&amp;nbsp;&lt;/p&gt;&lt;p class=&quot;p4&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt;	&lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt;	&lt;/span&gt;[output &lt;span class=&quot;s5&quot;&gt;appendFormat&lt;/span&gt;:&lt;span class=&quot;s7&quot;&gt;@&quot;%02x&quot;&lt;/span&gt;,md5Buffer[i]];&lt;/p&gt;&lt;p class=&quot;p2&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;p4&quot;&gt;&amp;nbsp; &lt;span class=&quot;s4&quot;&gt;return&lt;/span&gt; output;&lt;/p&gt;&lt;p class=&quot;p4&quot;&gt;}&lt;/p&gt;&lt;p class=&quot;p2&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;p class=&quot;p4&quot;&gt;






























&lt;/p&gt;&lt;p class=&quot;p3&quot;&gt;@end&lt;/p&gt;&lt;p class=&quot;p4&quot;&gt;/////////////////////////&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;/////////////////////////&lt;/span&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;/////////////////////////&lt;/span&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;/////////////////////////////////&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&lt;span class=&quot;s1&quot;&gt;#import &lt;/span&gt;&quot;NSData+MD5.h&quot;&lt;/p&gt;&lt;p class=&quot;p2&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;p class=&quot;p3&quot;&gt;&lt;span class=&quot;s2&quot;&gt;@interface&lt;/span&gt; NSData(MD5)&lt;/p&gt;&lt;p class=&quot;p2&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;p class=&quot;p3&quot;&gt;- (&lt;span class=&quot;s3&quot;&gt;NSString&lt;/span&gt; *)MD5;&lt;/p&gt;&lt;p class=&quot;p2&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;p class=&quot;p4&quot;&gt;













&lt;/p&gt;&lt;p class=&quot;p4&quot;&gt;@end&lt;/p&gt;&lt;p class=&quot;p4&quot;&gt;/////////////////////////&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;/////////////////////////&lt;/span&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;/////////////////////////&lt;/span&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;/////////////////////////////////&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&lt;span class=&quot;s1&quot;&gt;#import &lt;/span&gt;&amp;lt;CommonCrypto/CommonDigest.h&amp;gt;&lt;/p&gt;&lt;p class=&quot;p2&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;p class=&quot;p3&quot;&gt;@implementation&lt;span class=&quot;s2&quot;&gt; NSData(MD5)&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p2&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;p class=&quot;p4&quot;&gt;- (&lt;span class=&quot;s3&quot;&gt;NSString&lt;/span&gt;*)MD5&lt;/p&gt;&lt;p class=&quot;p4&quot;&gt;{&lt;/p&gt;&lt;p class=&quot;p5&quot;&gt;&lt;span class=&quot;s2&quot;&gt;&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot;&gt;	&lt;/span&gt;&lt;/span&gt;// Create byte array of unsigned chars&lt;/p&gt;&lt;p class=&quot;p6&quot;&gt;&lt;span class=&quot;s2&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s4&quot;&gt;unsigned&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s4&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; md5Buffer[&lt;/span&gt;CC_MD5_DIGEST_LENGTH&lt;span class=&quot;s2&quot;&gt;];&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p2&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;p5&quot;&gt;&lt;span class=&quot;s2&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt;	&lt;/span&gt;&lt;/span&gt;// Create 16 byte MD5 hash value, store in buffer&lt;/p&gt;&lt;p class=&quot;p4&quot;&gt;&amp;nbsp; &lt;span class=&quot;s5&quot;&gt;CC_MD5&lt;/span&gt;(&lt;span class=&quot;s4&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;s5&quot;&gt;bytes&lt;/span&gt;, &lt;span class=&quot;s4&quot;&gt;self&lt;/span&gt;.&lt;span class=&quot;s5&quot;&gt;length&lt;/span&gt;, md5Buffer);&lt;/p&gt;&lt;p class=&quot;p2&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p class=&quot;p5&quot;&gt;&lt;span class=&quot;s2&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt;	&lt;/span&gt;&lt;/span&gt;// Convert unsigned char buffer to NSString of hex values&lt;/p&gt;&lt;p class=&quot;p7&quot;&gt;&lt;span class=&quot;s2&quot;&gt;&amp;nbsp; &lt;/span&gt;NSMutableString&lt;span class=&quot;s2&quot;&gt; *output = [&lt;/span&gt;NSMutableString&lt;span class=&quot;s2&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s5&quot;&gt;stringWithCapacity&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;CC_MD5_DIGEST_LENGTH&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; * &lt;/span&gt;&lt;span class=&quot;s6&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;];&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p4&quot;&gt;&amp;nbsp; &lt;span class=&quot;s4&quot;&gt;for&lt;/span&gt;(&lt;span class=&quot;s4&quot;&gt;int&lt;/span&gt; i = &lt;span class=&quot;s6&quot;&gt;0&lt;/span&gt;; i &amp;lt; &lt;span class=&quot;s1&quot;&gt;CC_MD5_DIGEST_LENGTH&lt;/span&gt;; i++)&amp;nbsp;&lt;/p&gt;&lt;p class=&quot;p4&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt;	&lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt;	&lt;/span&gt;[output &lt;span class=&quot;s5&quot;&gt;appendFormat&lt;/span&gt;:&lt;span class=&quot;s7&quot;&gt;@&quot;%02x&quot;&lt;/span&gt;,md5Buffer[i]];&lt;/p&gt;&lt;p class=&quot;p2&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;p4&quot;&gt;&amp;nbsp; &lt;span class=&quot;s4&quot;&gt;return&lt;/span&gt; output;&lt;/p&gt;&lt;p class=&quot;p4&quot;&gt;}&lt;/p&gt;&lt;p class=&quot;p2&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;p class=&quot;p4&quot;&gt;



























&lt;/p&gt;&lt;p class=&quot;p3&quot;&gt;@end&lt;/p&gt;&lt;p class=&quot;p4&quot;&gt;/////////////////////////&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;/////////////////////////&lt;/span&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;/////////////////////////&lt;/span&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;/////////////////////////////////&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;</description>
      <category>Interesting/objective - C</category>
      <author>닉네임영역</author>
      <guid isPermaLink="true">https://somethingjin.tistory.com/148</guid>
      <comments>https://somethingjin.tistory.com/148#entry148comment</comments>
      <pubDate>Tue, 3 Jun 2014 15:26:38 +0900</pubDate>
    </item>
    <item>
      <title>연결된 SSID 알아오기</title>
      <link>https://somethingjin.tistory.com/147</link>
      <description>&lt;div class=&quot;tbody m-tcol-c&quot; id=&quot;tbody&quot; style=&quot;font-family: 돋움, dotum, Helvetica, sans-serif; list-style: none; margin: 20px 0px 0px; padding: 0px; clear: both; line-height: 1.4; width: 743px; position: relative; overflow-y: hidden; color: rgb(102, 102, 102); overflow-x: auto !important;&quot;&gt;&lt;div style=&quot;list-style: none; margin: 0px; padding: 0px;&quot;&gt;'Reachability.h',&lt;/div&gt;&lt;div style=&quot;list-style: none; margin: 0px; padding: 0px;&quot;&gt;'Reachability.m'&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;list-style: none; margin: 0px; padding: 0px;&quot;&gt;파일을 인터넷에 찾아 참고 하시고 참고하시고&lt;/div&gt;&lt;div style=&quot;list-style: none; margin: 0px; padding: 0px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;list-style: none; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; SSID -&amp;gt; 아래 코드 참고하세요.&lt;/div&gt;&lt;div style=&quot;list-style: none; margin: 0px; padding: 0px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;list-style: none; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp; NSArray * ifs = (__bridge_transfer id)CNCopySupportedInterfaces();&lt;/div&gt;&lt;div style=&quot;list-style: none; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;list-style: none; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp; for (NSString * item in ifs)&lt;/div&gt;&lt;div style=&quot;list-style: none; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;list-style: none; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NSDictionary * info = (__bridge_transfer id)CNCopyCurrentNetworkInfo((__bridge CFStringRef)item);&lt;/div&gt;&lt;div style=&quot;list-style: none; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;list-style: none; margin: 0px; padding: 0px;&quot;&gt;&lt;div style=&quot;list-style: none; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // kCNNetworkInfoKeySSID&lt;/div&gt;&lt;div style=&quot;list-style: none; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5;&quot;&gt;&amp;nbsp;&lt;/span&gt;// kCNNetworkInfoKeyBSSID&lt;/div&gt;&lt;div style=&quot;list-style: none; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5;&quot;&gt;&amp;nbsp;&lt;/span&gt;// kCNNetworkInfoKeySSIDData&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;list-style: none; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NSString * SSID = info[(NSString *)kCNNetworkInfoKeySSID];&lt;/div&gt;&lt;div style=&quot;list-style: none; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NSLog(@&quot;SSID : %@&quot;, SSID);&lt;/div&gt;&lt;div style=&quot;list-style: none; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>Interesting/objective - C</category>
      <author>닉네임영역</author>
      <guid isPermaLink="true">https://somethingjin.tistory.com/147</guid>
      <comments>https://somethingjin.tistory.com/147#entry147comment</comments>
      <pubDate>Fri, 23 May 2014 15:13:18 +0900</pubDate>
    </item>
    <item>
      <title>Core data로 sqlite 만들때 사용하는 소스</title>
      <link>https://somethingjin.tistory.com/146</link>
      <description>&lt;p class=&quot;p1&quot;&gt;&lt;span class=&quot;s1&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;NSManagedObjectModel&lt;/span&gt; *managedObjectModel()&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;{&lt;/p&gt;&lt;p class=&quot;p2&quot;&gt;&lt;span class=&quot;s3&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;static&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt; &lt;/span&gt;NSManagedObjectModel&lt;span class=&quot;s3&quot;&gt; *model = &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;nil&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt; (model != &lt;span class=&quot;s1&quot;&gt;nil&lt;/span&gt;) {&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;return&lt;/span&gt; model;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p class=&quot;p3&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p class=&quot;p4&quot;&gt;&lt;span class=&quot;s3&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;NSString&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt; *path = &lt;/span&gt;@&quot;CoreDataTutorial&quot;&lt;span class=&quot;s3&quot;&gt;;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p5&quot;&gt;&lt;span class=&quot;s3&quot;&gt;&amp;nbsp; &amp;nbsp; path = [path &lt;/span&gt;stringByDeletingPathExtension&lt;span class=&quot;s3&quot;&gt;];&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p5&quot;&gt;&lt;span class=&quot;s3&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;NSURL&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt; *modelURL = [[&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;NSBundle&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt; &lt;/span&gt;mainBundle&lt;span class=&quot;s3&quot;&gt;] &lt;/span&gt;URLForResource&lt;span class=&quot;s3&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s4&quot;&gt;@&quot;coredatatest&quot;&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt; &lt;/span&gt;withExtension&lt;span class=&quot;s3&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s4&quot;&gt;@&quot;mom&quot;&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;];&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p6&quot;&gt;&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; model = [[&lt;span class=&quot;s2&quot;&gt;NSManagedObjectModel&lt;/span&gt; &lt;span class=&quot;s5&quot;&gt;alloc&lt;/span&gt;] &lt;span class=&quot;s5&quot;&gt;initWithContentsOfURL&lt;/span&gt;:modelURL];&lt;/p&gt;&lt;p class=&quot;p3&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;return&lt;/span&gt; model;&lt;/p&gt;&lt;p&gt;


























&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;}&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&lt;span class=&quot;s1&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;NSManagedObjectContext&lt;/span&gt; *managedObjectContext()&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;{&lt;/p&gt;&lt;p class=&quot;p2&quot;&gt;&lt;span class=&quot;s3&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;static&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt; &lt;/span&gt;NSManagedObjectContext&lt;span class=&quot;s3&quot;&gt; *context = &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;nil&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt; (context != &lt;span class=&quot;s1&quot;&gt;nil&lt;/span&gt;) {&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;return&lt;/span&gt; context;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p class=&quot;p3&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;p4&quot;&gt;&lt;span class=&quot;s3&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;@autoreleasepool&lt;span class=&quot;s3&quot;&gt; {&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; context = [[&lt;span class=&quot;s2&quot;&gt;NSManagedObjectContext&lt;/span&gt; &lt;span class=&quot;s4&quot;&gt;alloc&lt;/span&gt;] &lt;span class=&quot;s4&quot;&gt;init&lt;/span&gt;];&lt;/p&gt;&lt;p class=&quot;p3&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p class=&quot;p2&quot;&gt;&lt;span class=&quot;s3&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;NSPersistentStoreCoordinator&lt;span class=&quot;s3&quot;&gt; *coordinator = [[&lt;/span&gt;NSPersistentStoreCoordinator&lt;span class=&quot;s3&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s4&quot;&gt;alloc&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;] &lt;/span&gt;&lt;span class=&quot;s4&quot;&gt;initWithManagedObjectModel&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s5&quot;&gt;managedObjectModel&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;()];&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [context &lt;span class=&quot;s4&quot;&gt;setPersistentStoreCoordinator&lt;/span&gt;:coordinator];&lt;/p&gt;&lt;p class=&quot;p3&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p class=&quot;p2&quot;&gt;&lt;span class=&quot;s3&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;NSString&lt;span class=&quot;s3&quot;&gt; *STORE_TYPE = &lt;/span&gt;NSSQLiteStoreType&lt;span class=&quot;s3&quot;&gt;;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p3&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p class=&quot;p5&quot;&gt;&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;s2&quot; style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;NSString&lt;/span&gt;&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt; *path = &lt;/span&gt;&lt;span class=&quot;s6&quot; style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;@&quot;coredatatest&quot;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p6&quot;&gt;&lt;span class=&quot;s3&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;NSURL&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt; *url = [&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;NSURL&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt; &lt;/span&gt;fileURLWithPath&lt;span class=&quot;s3&quot;&gt;:[path &lt;/span&gt;stringByAppendingPathExtension&lt;span class=&quot;s3&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s6&quot;&gt;@&quot;sqlite&quot;&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;]];&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p3&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;NSError&lt;/span&gt; *error;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s2&quot;&gt;NSPersistentStore&lt;/span&gt; *newStore = [coordinator &lt;span class=&quot;s4&quot;&gt;addPersistentStoreWithType&lt;/span&gt;:STORE_TYPE &lt;span class=&quot;s4&quot;&gt;configuration&lt;/span&gt;:&lt;span class=&quot;s1&quot;&gt;nil&lt;/span&gt; &lt;span class=&quot;s4&quot;&gt;URL&lt;/span&gt;:url &lt;span class=&quot;s4&quot;&gt;options&lt;/span&gt;:&lt;span class=&quot;s1&quot;&gt;nil&lt;/span&gt; &lt;span class=&quot;s4&quot;&gt;error&lt;/span&gt;:&amp;amp;error];&lt;/p&gt;&lt;p class=&quot;p3&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt; (newStore == &lt;span class=&quot;s1&quot;&gt;nil&lt;/span&gt;) {&lt;/p&gt;&lt;p class=&quot;p7&quot;&gt;&lt;span class=&quot;s3&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s4&quot;&gt;NSLog&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;(&lt;/span&gt;@&quot;Store Configuration Failure %@&quot;&lt;span class=&quot;s3&quot;&gt;, ([error &lt;/span&gt;&lt;span class=&quot;s4&quot;&gt;localizedDescription&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;] != &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;nil&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;) ? [error &lt;/span&gt;&lt;span class=&quot;s4&quot;&gt;localizedDescription&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;] : &lt;/span&gt;@&quot;Unknown Error&quot;&lt;span class=&quot;s3&quot;&gt;);&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;return&lt;/span&gt; context;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;



































&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;}&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt; main(&lt;span class=&quot;s1&quot;&gt;int&lt;/span&gt; argc, &lt;span class=&quot;s1&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;char&lt;/span&gt; * argv[])&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;{&lt;/p&gt;&lt;p class=&quot;p2&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;p3&quot;&gt;&lt;span class=&quot;s2&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;@autoreleasepool&lt;span class=&quot;s2&quot;&gt; {&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p4&quot;&gt;&lt;span class=&quot;s2&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// Create the managed object context&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s3&quot;&gt;NSManagedObjectContext&lt;/span&gt; *context = &lt;span class=&quot;s4&quot;&gt;managedObjectContext&lt;/span&gt;();&lt;/p&gt;&lt;p class=&quot;p2&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p class=&quot;p4&quot;&gt;&lt;span class=&quot;s2&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// Custom code here...&lt;/p&gt;&lt;p class=&quot;p4&quot;&gt;&lt;span class=&quot;s2&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// Save the managed object context&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s3&quot;&gt;NSError&lt;/span&gt; *error = &lt;span class=&quot;s1&quot;&gt;nil&lt;/span&gt;;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt; (![context &lt;span class=&quot;s5&quot;&gt;save&lt;/span&gt;:&amp;amp;error]) {&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s5&quot;&gt;NSLog&lt;/span&gt;(&lt;span class=&quot;s6&quot;&gt;@&quot;Error while saving %@&quot;&lt;/span&gt;, ([error &lt;span class=&quot;s5&quot;&gt;localizedDescription&lt;/span&gt;] != &lt;span class=&quot;s1&quot;&gt;nil&lt;/span&gt;) ? [error &lt;span class=&quot;s5&quot;&gt;localizedDescription&lt;/span&gt;] : &lt;span class=&quot;s6&quot;&gt;@&quot;Unknown Error&quot;&lt;/span&gt;);&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s5&quot;&gt;exit&lt;/span&gt;(&lt;span class=&quot;s7&quot;&gt;1&lt;/span&gt;);&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p class=&quot;p2&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s3&quot;&gt;NSString&lt;/span&gt; *dataPath = [[&lt;span class=&quot;s3&quot;&gt;NSBundle&lt;/span&gt; &lt;span class=&quot;s5&quot;&gt;mainBundle&lt;/span&gt;] &lt;span class=&quot;s5&quot;&gt;pathForResource&lt;/span&gt;:&lt;span class=&quot;s6&quot;&gt;@&quot;Banks&quot;&lt;/span&gt; &lt;span class=&quot;s5&quot;&gt;ofType&lt;/span&gt;:&lt;span class=&quot;s6&quot;&gt;@&quot;json&quot;&lt;/span&gt;];&lt;/p&gt;&lt;p class=&quot;p5&quot;&gt;&lt;span class=&quot;s2&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;NSArray&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; *Banks = [&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;NSJSONSerialization&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; &lt;/span&gt;JSONObjectWithData&lt;span class=&quot;s2&quot;&gt;:[&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;NSData&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; &lt;/span&gt;dataWithContentsOfFile&lt;span class=&quot;s2&quot;&gt;:dataPath] &lt;/span&gt;options&lt;span class=&quot;s2&quot;&gt;:&lt;/span&gt;kNilOptions&lt;span class=&quot;s2&quot;&gt; &lt;/span&gt;error&lt;span class=&quot;s2&quot;&gt;:&amp;amp;error];&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p6&quot;&gt;&lt;span class=&quot;s2&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s5&quot;&gt;NSLog&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;(&lt;/span&gt;@&quot;Imported Banks : %@&quot;&lt;span class=&quot;s2&quot;&gt;, Banks);&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p2&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [Banks &lt;span class=&quot;s5&quot;&gt;enumerateObjectsUsingBlock&lt;/span&gt;:^(&lt;span class=&quot;s1&quot;&gt;id&lt;/span&gt; obj, &lt;span class=&quot;s3&quot;&gt;NSUInteger&lt;/span&gt; idx, &lt;span class=&quot;s1&quot;&gt;BOOL&lt;/span&gt; *stop) {&lt;/p&gt;&lt;p class=&quot;p5&quot;&gt;&lt;span class=&quot;s2&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s8&quot;&gt;FailedBankInfo&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; *failedBankInfo = [&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;NSEntityDescription&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; &lt;/span&gt;insertNewObjectForEntityForName&lt;span class=&quot;s2&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s6&quot;&gt;@&quot;FailedBankInfo&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; &lt;/span&gt;inManagedObjectContext&lt;span class=&quot;s2&quot;&gt;:context];&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; failedBankInfo.&lt;span class=&quot;s8&quot;&gt;name&lt;/span&gt; = [obj &lt;span class=&quot;s5&quot;&gt;objectForKey&lt;/span&gt;:&lt;span class=&quot;s6&quot;&gt;@&quot;name&quot;&lt;/span&gt;];&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; failedBankInfo.&lt;span class=&quot;s8&quot;&gt;city&lt;/span&gt; = [obj &lt;span class=&quot;s5&quot;&gt;objectForKey&lt;/span&gt;:&lt;span class=&quot;s6&quot;&gt;@&quot;city&quot;&lt;/span&gt;];&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; failedBankInfo.&lt;span class=&quot;s8&quot;&gt;state&lt;/span&gt; = [obj &lt;span class=&quot;s5&quot;&gt;objectForKey&lt;/span&gt;:&lt;span class=&quot;s6&quot;&gt;@&quot;state&quot;&lt;/span&gt;];&lt;/p&gt;&lt;p class=&quot;p2&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p class=&quot;p5&quot;&gt;&lt;span class=&quot;s2&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s8&quot;&gt;FailedBankDetails&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; *failedBankDetails = [&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;NSEntityDescription&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; &lt;/span&gt;insertNewObjectForEntityForName&lt;span class=&quot;s2&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s6&quot;&gt;@&quot;FailedBankDetails&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; &lt;/span&gt;inManagedObjectContext&lt;span class=&quot;s2&quot;&gt;:context];&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; failedBankDetails.&lt;span class=&quot;s8&quot;&gt;closeDate&lt;/span&gt; = [&lt;span class=&quot;s3&quot;&gt;NSDate&lt;/span&gt; &lt;span class=&quot;s5&quot;&gt;dateWithString&lt;/span&gt;:[obj &lt;span class=&quot;s5&quot;&gt;objectForKey&lt;/span&gt;:&lt;span class=&quot;s6&quot;&gt;@&quot;closeDate&quot;&lt;/span&gt;]];&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; failedBankDetails.&lt;span class=&quot;s8&quot;&gt;updateDate&lt;/span&gt; = [&lt;span class=&quot;s3&quot;&gt;NSDate&lt;/span&gt; &lt;span class=&quot;s5&quot;&gt;date&lt;/span&gt;];&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; failedBankDetails.&lt;span class=&quot;s8&quot;&gt;zip&lt;/span&gt; = [obj &lt;span class=&quot;s5&quot;&gt;objectForKey&lt;/span&gt;:&lt;span class=&quot;s6&quot;&gt;@&quot;zip&quot;&lt;/span&gt;];&lt;/p&gt;&lt;p class=&quot;p2&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; failedBankDetails.&lt;span class=&quot;s8&quot;&gt;info&lt;/span&gt; = failedBankInfo;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; failedBankInfo.&lt;span class=&quot;s8&quot;&gt;details&lt;/span&gt; = failedBankDetails;&lt;/p&gt;&lt;p class=&quot;p2&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s3&quot;&gt;NSError&lt;/span&gt; *error = &lt;span class=&quot;s1&quot;&gt;nil&lt;/span&gt;;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;if&lt;/span&gt; (![context &lt;span class=&quot;s5&quot;&gt;save&lt;/span&gt;:&amp;amp;error]) {&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s5&quot;&gt;NSLog&lt;/span&gt;(&lt;span class=&quot;s6&quot;&gt;@&quot;Whoops, couldn't save: %@&quot;&lt;/span&gt;, [error &lt;span class=&quot;s5&quot;&gt;localizedDescription&lt;/span&gt;]);&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }];&lt;/p&gt;&lt;p class=&quot;p4&quot;&gt;&lt;span class=&quot;s2&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// Test listing all FailedBankInfos from the store&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s3&quot;&gt;NSFetchRequest&lt;/span&gt; *fetchRequest = [[&lt;span class=&quot;s3&quot;&gt;NSFetchRequest&lt;/span&gt; &lt;span class=&quot;s5&quot;&gt;alloc&lt;/span&gt;] &lt;span class=&quot;s5&quot;&gt;init&lt;/span&gt;];&lt;/p&gt;&lt;p class=&quot;p7&quot;&gt;&lt;span class=&quot;s2&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;NSEntityDescription&lt;span class=&quot;s2&quot;&gt; *entity = [&lt;/span&gt;NSEntityDescription&lt;span class=&quot;s2&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s5&quot;&gt;entityForName&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s6&quot;&gt;@&quot;FailedBankInfo&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s5&quot;&gt;inManagedObjectContext&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;:context];&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [fetchRequest &lt;span class=&quot;s5&quot;&gt;setEntity&lt;/span&gt;:entity];&lt;/p&gt;&lt;p class=&quot;p2&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s3&quot;&gt;NSArray&lt;/span&gt; *fetchedObjects = [context &lt;span class=&quot;s5&quot;&gt;executeFetchRequest&lt;/span&gt;:fetchRequest &lt;span class=&quot;s5&quot;&gt;error&lt;/span&gt;:&amp;amp;error];&lt;/p&gt;&lt;p class=&quot;p2&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;for&lt;/span&gt; (&lt;span class=&quot;s8&quot;&gt;FailedBankInfo&lt;/span&gt; *info &lt;span class=&quot;s1&quot;&gt;in&lt;/span&gt; fetchedObjects) {&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s5&quot;&gt;NSLog&lt;/span&gt;(&lt;span class=&quot;s6&quot;&gt;@&quot;Name: %@&quot;&lt;/span&gt;, info.&lt;span class=&quot;s8&quot;&gt;name&lt;/span&gt;);&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s8&quot;&gt;FailedBankDetails&lt;/span&gt; *details = info.&lt;span class=&quot;s8&quot;&gt;details&lt;/span&gt;;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s5&quot;&gt;NSLog&lt;/span&gt;(&lt;span class=&quot;s6&quot;&gt;@&quot;Zip: %@&quot;&lt;/span&gt;, details.&lt;span class=&quot;s8&quot;&gt;zip&lt;/span&gt;);&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;s7&quot;&gt;0&lt;/span&gt;;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;



























































&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;}&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;참조 :&amp;nbsp;http://www.raywenderlich.com&lt;/p&gt;</description>
      <category>core data</category>
      <category>sqlite</category>
      <category>Xcode</category>
      <author>닉네임영역</author>
      <guid isPermaLink="true">https://somethingjin.tistory.com/146</guid>
      <comments>https://somethingjin.tistory.com/146#entry146comment</comments>
      <pubDate>Wed, 7 May 2014 15:15:11 +0900</pubDate>
    </item>
    <item>
      <title>custom cell 안의 버튼 동작 시키기</title>
      <link>https://somethingjin.tistory.com/145</link>
      <description>&lt;p&gt;1.&amp;nbsp;&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;UITableView&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt; *tableView = (&lt;/span&gt;&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;UITableView&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt; *)&lt;/span&gt;&lt;span class=&quot;s2&quot; style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;superview&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;superview&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;;&lt;/span&gt;&lt;/p&gt;








&lt;p class=&quot;p2&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;s3&quot;&gt;NSIndexPath&lt;/span&gt; *path = [tableView &lt;span class=&quot;s4&quot;&gt;indexPathForCell&lt;/span&gt;:&lt;span class=&quot;s2&quot;&gt;self&lt;/span&gt;];&lt;/p&gt;
&lt;p class=&quot;p2&quot;&gt;&amp;nbsp; &amp;nbsp; [tableView.&lt;span class=&quot;s3&quot;&gt;delegate&lt;/span&gt; &lt;span class=&quot;s4&quot;&gt;tableView&lt;/span&gt;:tableView &lt;span class=&quot;s4&quot;&gt;didSelectRowAtIndexPath&lt;/span&gt;:path];&lt;/p&gt;&lt;p class=&quot;p2&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;p2&quot;&gt;2. cell tag 연결 후 addTarget 하여 methhod 등록&lt;/p&gt;</description>
      <category>Interesting/objective - C</category>
      <category>cell</category>
      <category>cell in button action</category>
      <category>IOS</category>
      <category>superview</category>
      <category>UITableView</category>
      <category>Xcode</category>
      <author>닉네임영역</author>
      <guid isPermaLink="true">https://somethingjin.tistory.com/145</guid>
      <comments>https://somethingjin.tistory.com/145#entry145comment</comments>
      <pubDate>Mon, 28 Apr 2014 16:25:10 +0900</pubDate>
    </item>
    <item>
      <title>Local Data Storage</title>
      <link>https://somethingjin.tistory.com/144</link>
      <description>&lt;p&gt;1. NSUserDefaults : Dictionary 형태의 메모리 저장소&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;example&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;// init&lt;/p&gt;&lt;p&gt;[NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];&lt;/p&gt;&lt;p&gt;// get&lt;/p&gt;&lt;p&gt;[defaults objectForKey:@&quot;Key&quot;];&lt;/p&gt;&lt;p&gt;// set&lt;/p&gt;&lt;p&gt;NSDictionary *dictionary = [[NSDictionary alloc] initWithObjectsAndKeys:@&quot;Key&quot;, @&quot;Value&quot;, nil];&lt;/p&gt;&lt;p&gt;[defaults registerDefaults:dictionary];&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;2. CoreData : Database를 wrap 한 저장소&lt;/p&gt;&lt;p&gt;[Update 예정]&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;3. Sqlite : Database&lt;/p&gt;&lt;p&gt;[Update 예정]&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;4. Plist : DIctionary 형태의 파일 저장소&lt;/p&gt;&lt;p&gt;NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);&lt;/p&gt;&lt;p&gt;NSString *documentsDirectory = [paths objectAtIndex:0];&lt;/p&gt;&lt;p&gt;NSString *filePath = [documentsDirectory stringByAppendingString:@&quot;/userInfo.plist&quot;];&lt;/p&gt;&lt;p&gt;NSMutableDictionary *plist = [[NSMutableDictionary alloc] init];&lt;/p&gt;&lt;p&gt;[plist setValue:@&quot;Value&quot; forKey:@&quot;Key&quot;];&lt;/p&gt;&lt;p&gt;[plist writeToFile:filePath atomically:YES];&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;5. Keychain : 폰 내부에 같은 도메인끼리 참조 할 수 있는 데이터 저장소&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>Interesting/objective - C</category>
      <category>coredata</category>
      <category>IOS</category>
      <category>KeyChain</category>
      <category>Local Data Storage</category>
      <category>NSUserDefaults</category>
      <category>plist</category>
      <category>sqlite</category>
      <category>Xcode</category>
      <category>데이터 자장소</category>
      <author>닉네임영역</author>
      <guid isPermaLink="true">https://somethingjin.tistory.com/144</guid>
      <comments>https://somethingjin.tistory.com/144#entry144comment</comments>
      <pubDate>Mon, 7 Apr 2014 17:11:04 +0900</pubDate>
    </item>
  </channel>
</rss>