If you see this error message after "pod install"

"/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/pathname.rb:422:in `open': No such file or directory - /Users/me/.cocoapods/repos (Errno::ENOENT)"

please run "pod setup" first.

that means there is not yet repo for pods.

if you still see the problem with "repo

It's highly possible that your repository is broken.

in this case, at first remove repo.

"sudo rm -fr ~/.cocoapods/repos/master"

and setup pods again.

"pod setup"

then, "pod install" will work well.


박상건 - gunnih

베를린에서 일하는 외국인 노동자 » Contact Me: gunnih@gmail.com

Trackback Address/트랙백 주소 - http://gunnih.tistory.com/trackback/98 관련글 쓰기

You may want to remove one single notification on Notification Center programmatically.

But if the notification is already shown,

it shouldn’t be removed from notification center before user did something.

However, there is a trick to remove it.

At first I’m gonna show you how to remove a UILocalNotification from notification center.

When the notification is already shown on Notification Center, you cannot get that notification with this property.

@property(nonatomic,copy) NSArray *scheduledLocalNotifications;

This property contains notifications which are not shown yet.

That means, you cannot pass notification to call this function

- (void)cancelLocalNotification:(UILocalNotification *)notification;

Therefore you can’t find the notification to remove it from notification center.

OK, now we know that we have to store our LocalNotification Object somewhere and use it to call 


Make a new LocalNotification and set same properties doesn’t help you.

You have to use “NSKeyedArchiver”.

  1. Schedule your notification
    (don’t use “presentLocalNotificationNow:”, if you use it, this process doesn’t work)

    [[UIApplication sharedApplication] scheduleLocalNotification:notification];

  2. Archive notification with path.

    [NSKeyedArchiver archiveRootObject:notification toFile:path];

  3.  And unarchive the notification with path.

    UILocalNotification *noti = [NSKeyedUnarchiver unarchiveObjectWithFile:path];

  4. Then, call cancelLocalNotification with unarchived notification.

    [[UIApplication sharedApplication] cancelLocalNotification:notification];

  5. Remove archived notification from file system

    [[NSFileManager defaultManager] removeItemAtPath:path error:&error];

From now you know how to remove a single local notification from notification center,
and using this process will help you to handle remote notifications.

    1. Send remote notification as “Silent Notification”.

    2. Download Content from your server and create UILocalNotification.
      (or don’t set any value for “alert” key in ‘aps’ paylod and define other key-value pair for your messages or actions and convert it)

    3. Handle the local notification.

You can check sample project in GitHub.

저작자 표시 비영리 동일 조건 변경 허락

박상건 - gunnih

베를린에서 일하는 외국인 노동자 » Contact Me: gunnih@gmail.com

Trackback Address/트랙백 주소 - http://gunnih.tistory.com/trackback/97 관련글 쓰기

(그냥 써 봅니다...)

Junior Develpoper

- 논리적인가, 잘 배우는가, 구성원으로서 적합한가

(source : http://fun.buxter.org/cd.php)


- 해당 언어나 플랫폼에 대한 기본적인 지식과 이해도가 있는가

- 홀로 모듈을 작성할 수 있는가

- 다른 개발자에게 교육을 시킬 수 있는가

(source : http://fun.buxter.org/cd.php)

Senior Developer

- 새로운 플랫폼에 대한 습득능력이 있는가

- 개발팀을 이끌어 갈 수 있는가

- 기술적인 문제를 잘 분석하고 적절한 해결책을 제시할 수 있는가

(source : http://fun.buxter.org/cd.php)


- 여러 플랫폼에 대한 이해도가 높은가

- 시스템의 전체적인 구조를 설계할 수 있는가

- 적절한 설계로 많은 문제들을 해결할 수 있는가 (Simple is best?)

(source : www.cio.com)


박상건 - gunnih

베를린에서 일하는 외국인 노동자 » Contact Me: gunnih@gmail.com

Trackback Address/트랙백 주소 - http://gunnih.tistory.com/trackback/96 관련글 쓰기

  1. 2015.01.20 06:19


I think you will agree with this following sentence.

If you want to create new initialiser with some parameter, please don't forget to call '[super init];'.

For example,

- (instancetype)initWithString:(NSString *)string


self = [super init];

if (self) {

self.text = string;


return self;


And now, do you agree with the written code? May be you found already the problem.

In this case, I preffer to call '[self init];'' like following code.

- (instancetype)initWithString:(NSString *)string


self = [self init];

if (self) {

self.text = string;


return self;


because if there can be some initialising in 'init'.

This code will guarantee that your code will not miss some initialising process for this interface.

Someone can make some argument.

"If super class has already that method, you have to call '[super initWithString:];'"

Yes totally right. and in that initialiser of super class, it has to call '[self init];'.


박상건 - gunnih

베를린에서 일하는 외국인 노동자 » Contact Me: gunnih@gmail.com

Trackback Address/트랙백 주소 - http://gunnih.tistory.com/trackback/95 관련글 쓰기

1 2 3 4 5 ... 25

티스토리 툴바