MKMapView에 위도/경도 범위를 넘어서는 Annotation을 추가하면 어떻게 될까?

정답은 악명 높기로 소문난 EXC_BAD_ACCESS.

개발중인 앱에서 한번에 적게는 100여개에서 많게는 500여개 정도 한번에 Annotation을 추가한다.
문제 없이 잘 돌아가던 녀석인데, 리뷰를 앞두고 별안간 죽어나가기 시작했다.
도무지 죽는 원인을 찾을 수 없었고, 혹시나 하는 마음에 300여개의 데이타를 일일이 콘솔에 찍어서 값을 확인했다.
위에서부터 차근차근 확인해 봤지만 문제가 없어서 포기하려던 순간! 마지막 데이타의 위도/경도가 110/110인 것을 확인!! ㅠㅠ

이런 망할.. 이놈이었어!
MapKit을 너무 신뢰했다. 잘못된 값이 들어가도 이정도의 예외처리를 될 줄 알았는데..
담부터 입력값을 꼼꼼히 체크해서 바인딩해야 겠다.

참고로 위도 경도의 범위는 위도 -90~90, 경도 -180~180이다.
Creative Commons License
Creative Commons License
Posted by 지오아빠^^
앱에서 푸시 알림 설정(사운드, 경고, 알림표시)을 변경하는 것인 가능한지 찾고 있다.
결과적으론 못찾았다 -ㅅ-;
아마도 해킹을하지 않으면 불가능 하지 않을까 싶다.

[[UIApplication sharedApplication] registerForRemoteNotificationTypes: (UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound)];
[[UIApplication sharedApplication] unregisterForRemoteNotifications];

위에 두 녀석으로는 세부 설정까지는 수정 할 수 없고 알림 설정에서 추가/삭제 하는 것 까지는 가능하더라.
삭제 후 다시 추가하여도 이전에 설정 되어있는 세부 설정이 그대로 적용된다.
Creative Commons License
Creative Commons License
Posted by 지오아빠^^
아래 링크에서 Resetting the Push Notifications Permissions Alert 부분에 나와있군요.

http://developer.apple.com/library/ios/#technotes/tn2010/tn2265.html
Creative Commons License
Creative Commons License
Posted by 지오아빠^^
~.profile 만들어서 안에 설정 해주면 된다.

# cd ~
# vi .profile
alias ll='ls -lF'

저장. 끝.
Creative Commons License
Creative Commons License
Posted by 지오아빠^^
TAG alias, OSX
UIViewController에서 회전이 안되는 경우가 있다.
아래 링크를 참조하여 해결하자.

http://developer.apple.com/library/ios/#qa/qa2010/qa1688.html
Creative Commons License
Creative Commons License
Posted by 지오아빠^^