[IOS] APNS 개발 설정 – (ios8)

* Apple Push Notification Service 가이드 (개념 이해)

https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html

* 인증서 설정 가이드 :

https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/ConfiguringPushNotifications/ConfiguringPushNotifications.html

* 앱 개발 가이드 :

https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/IPhoneOSClientImp.html

* stack_overflow : adHoc-build

http://stackoverflow.com/questions/3820525/adhoc-build-receives-no-push-notifications

* adHoc build for production push test

http://stackoverflow.com/questions/7208669/enabling-apple-push-notifications-for-ad-hoc-distribution-environment

* provider(3rd party message server : 직접 구현 하거나 이미 만들어진 플랫폼을 이용 (아마존 SNS)
https://github.com/notnoop/java-apns

ㅇ APNS Push size : 2 kbytes (ios8 layer), 256 bytes (Prior to ios8)
ㅇ 앱이 실행 되지 않을 때 : alert message, sound, badge 의 형태로 전달.
ㅇ 앱이 실행 중일  때 : NSDictionary 형태로 전달 된다.
ㅇ 전달되는 메시지 : JSON structured and consist of primitive type
ㅇ 메시지 포멧 작성 주의 : customer information(민감한 데이터 포함해서는 안된다)
ㅇ notification 전달 : 항상 전달이 보장 되는 것이 아니다.

Push Server response packet

Code Error : https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/CommunicatingWIthAPS.html

Table 5-1  Codes in error-response packet
Status code Description
0 No errors encountered
1 Processing error
2 Missing device token
3 Missing topic
4 Missing payload
5 Invalid token size
6 Invalid topic size
7 Invalid payload size
8 Invalid token
10 Shutdown

closed the connection

255 None (unknown)

* UX 고려

Apple 문서에 보면 notiifcation 남용은 사용자를 귀찮게 만든다고 되어 있다.
과도한 push는 사용자에게 가치를 주는 행위가 아니다.
꼭 필요한 정보, 그리고 빈도수가 높으면 요약해서 전송하는 push 서버를 구현 해야 한다.

Push Notification은 반드시 필요한 정보만을 제공해야 한다.

* APNS Tester (app store – for os-x)

스크린샷 2015-07-23 오전 12.27.50

[생각의 정리] spring-boot

Spring-boot을 사용하지 않아야 할 이유를 찾지 못했다.(프로토 타입 개발에만)

Spring-boot 내부에는 톰캣 서버를 가지고 있다.
즉 배포 할 때 target 서버에 tomat이 없어도 된다는 말이다.

설정을 apache-httpd, nginx에 하게 된다면…..tomcat 설정을 별도로 하지 않겠지.

Spring-boot 내부에 있는 tomcat에 제니퍼나 다른 메니저를 붙이거나 debugging 설정을 해야 하는 상황에서 유연하게 대처 할 수 있다면 아마 spring-boot를 사용할 것이다.

여튼 spring-boot의 강점은 빠른 프로토타입과 개발 & 배포가 가능 하다는 점.

서버 구축은 뒤로 미룰 수 있다는 점이 좋다.

docker를 이용해서 표준 환경 이미지를 만들어 두고 싶은데…클라우드 환경 공부를 좀 해봐야겠다.

[JSTL] formatDate 태국어 날짜 표기 이상 (Buddhist_calendar)

태국어 날짜 표기가 이상하다는 요청을 받았다.

태국에서는 아래와 같은 날짜 포멧을 사용한다고 합니다.

http://en.wikipedia.org/wiki/Date_and_time_notation_in_Thailand

즉 2014년이니 +543 = 2557년으로 표기 된다.

JSTL의  fmt:formatDate를 사용 할 때 값이 이상하게 나와 확인 중에…정말 신기해서 삽을 들기 전에
혹시나 하고 위키를 찾아보니….태국은….불멸기원 이라는 표기법을 삼는다.

보다 자세한 내용은 링크를 남기고 하단에 요약한다.

http://ko.wikipedia.org/wiki/%EB%B6%88%EB%A9%B8%EA%B8%B0%EC%9B%90

불멸기원은 석가모니가 입멸한 해를 기준으로 삼는 연대 표기법으로 서기 544년, 일부 국가에서는 543년을 더하면 불기의 연도가 된다고 한다.

글로벌 서비스… 번거롭고 영양가 있지 않아…옳지 않아….ㅠ_ㅠ

[IOS] CIImage, CGImage, UIImage 차이점

아이폰 이미지 클래스 종류

UIImage : UIKit framework

이 객체는 이미지 데이터를 보여주기 위한 high-level 수단을 제공한다.
파일이나 Quartz 이미지 객체나 raw image 데이터로부터 이미지들을 생성할 수 있다.
UIImage 클래스는 또한 이미지 객체를current graphics context에 그리기 위한 여러가지 옵션을 제공한다. 옵션으로는 blend model나 opacity value를 조정할 수 있다.

UIImage 클래스를 사용하여 읽어들일 수 있는 이미지 포멧이다.
스크린샷 2014-10-16 오후 6.33.18

CIImage : Core Image framework
CIImage 클래스는 이미지를 나타낸다. Core Image 들은 전부 immutable이다.
CIImage 객체는 다른 Core Image 클래스들에 사용되는데 CIFilter, CIContext, CIVector, CIColor가 있다. 이것을 사용하면서 유리한 점은 이미지를 필터링 하는데 이점을 가진다.
그러나 CIImage는 이미지를 렌더링 하지 않고 이미지를 만드는 “recepi”만 보관한다(이미지를 만들기 위한 재료라고 이해 했다) , lazy evaluation method는 Core Image가 가능한 효과적으로 동작할 수 있도록 한다.

CIContext와 CIImage 객체는 immutable이며 Thread Safe하다. 즉 여러 thread 는 GPU 또는 CPU CIContext 를 이용하여 CIImage 객체를 렌더링 한다.

그러나 CIFilter 객체는 mutable 객체며 필터는 다른 스레드 들과 공유 될 수 없다.

좀 더 자세한 것은 Core Image Programming Guide를 참고한다.

CGImage : Core Graphics framework

The CGImageRef opaque type represents bitmap images and bitmap image masks, based on sample data that you supply. A bitmap (or sampled) image is a rectangular array of pixels, with each pixel representing a single sample or data point in a source image.보다 자세한 사항은 “Quartz 2D Programming Guide”를 참고한다.

[Xcode] SVN Client 정말 ㅋㅋㅋㅋㅋ

Xcode SVN Client는 정말 기능이 한정적이고 어렵다.

이전에 작업한 소스를 날려서 이전 revision에서 불러와야 했는데 커멘드 라인이 불편해서 eclipse svn client를 이용하여 복원하였다.

그리고 원 소스엣거 작업 한 뒤 커밋 하려던 순간~~~

the-working-copy-requires-a-newer-version-of-subversion-than-xcode-supports

라는 메시지가 나왔다 찾아보니 Xcode에서 사용하는 svn 버전이 낮아 그런거니…

아래처럼 xcode svn을 백업 폴더로 옮겨놓고 최신버전 svn을 symbolic link 걸면 된다고 한다.

http://stackoverflow.com/questions/15179683/the-working-copy-requires-a-newer-version-of-subversion-than-xcode-supports

후기 : 해보니 잘 되는데 안되는것은 xcode 안에서 branch를 한다던가 checkout이 되지 않은 현상이 발생하여 롤백함…..

오늘 삽질 해보고 다시 기록으로 남김…

[교양] Color theory (색 이론)

본 글은 영문 위키를 참조 하였으며 의역이 있을 수 있으니 원문을 보고 싶은 분은 하단 링크를 참조 하시길 바랍니다. 참고로 디자인이나 아트를 전공하지 않은 비전공자가 쓴 글이며 잘못된 부분이 있으면 거침없이 커멘트 부탁 드립니다.
http://en.wikipedia.org/wiki/Color_theory

정의

visual art(시각 예술) 분야에서 color theory는 색을 섞거나 시각적인 효과를 내기 위한 실용적인 색 조합법이다.

Color abstractions

20세기 이전의 color theory는 pure ideal color을 바탕으로 시작되었는데 물리적인 세상의 속성 보다는 감각적인 경험을 바탕으로 만들어 졌다. 이것은 전통 색 이론(color theory)에 많은 오류를 야기 시켰으며 전통적인 색 이론은 항상 modern formulations의 해결책이 되지 못한다.

스크린샷 2014-10-14 오후 4.41.47

Additive color mixing : 빛의 혼합 (점점 밝아진다)
Subtractive color mixing : 색의 혼합 (점점 어두워 진다)

이 모델의 가장 큰 문제는 빛의 혼합과 색의 혼합에 대한 혼동을 야기한다.
(한마디로 두 모델은 전혀 다른 개념)

두 번째 문제는 빛의 세기(luminance = lightness) 대비(contrast) 묘사의 부재(absence)다.
물체 표면에 비치는 빛의 세기에 따라서 반사되는 색의 light이 달라지기 때문이다.

세 번째 문제는 경향을 전체적으로나 카테고리적으로 묘사하는 것이다. 예를 들면 노랑과 파랑은 일반적인 색으로 알고 있지만 대부분의 색 효과는 3가지 상대적인 속성에 의해 결정된다.
HSL(Hue, Saturation, Lightness)

1. lightness (light vs dark or white vs black) = 명도
2. saturation (intense vs dull) = 채도 (http://ko.wikipedia.org/wiki/%EC%B1%84%EB%8F%84)
3. hue (red, orange, yellow, green, blue, or purple) = 색상

결과적으로 시각 디자인에서의 노랑색과 파란색 hues 들의 시각적 효과는 상대적인 밝기(lightness)와 색상의 밀도에 의해 결정된다.

Cylindrical Coordinate System
HSL VS HSV?

http://en.wikipedia.org/wiki/HSL_and_HSV

http://amarsinghhpcs.blogspot.kr/2013/02/hslhsvhsi-blog.html

HSL : hue-saturation-lightness
HSV or HSB : hue-saturation-value
HSI : hue-saturation-intensity, HSL과 HSV의 단점을 극복하기 위한 모델(http://en.wikipedia.org/wiki/HSL_and_HSV#Disadvantages)

Value? = brightness
\begin{align}   M &= \operatorname{max}(R, G, B) \\   m &= \operatorname{min}(R, G, B) \\   C &= M - m \end{align}

(i)In the HSI model intensity is defined as average of three components:

I = 1/3(R+G+B)

(ii)In the HSV “hexcone” model value is defined as the largest component of color.

V=M=max(R,G,B)
(iii)In the bi-hexcone model lightness is defined as the average of largest & smallest color component.

L= 1/2(M+m)

용어 정리

CIECAM02 : http://en.wikipedia.org/wiki/CIECAM02
In colorimetry, CIECAM02 is the color appearance model published in 2002 by the International Commission on Illumination (CIE) Technical Committee 8-01 (Color Appearance Modelling for Color Management Systems) and the successor of CIECAM97s.

color wheel : http://en.wikipedia.org/wiki/Color_wheel
A color wheel or color circle is an abstract illustrative organization ocolor hues around a circle that shows relationships between primary colorssecondary colors, tertiary colors etc.

primary colors(빛의 3원색) : http://en.wikipedia.org/wiki/Primary_color
Primary colors (or primary colours) are sets of colors that can be combined to make a useful range of colors. For human applications, three primary colors are usually used, since human color vision is trichromatic.

Trichromacy : http://en.wikipedia.org/wiki/Trichromacy
Trichromacy or trichromaticism is the condition of possessing three independent channels for conveying color information, derived from the three different cone types(S-cones, M-cones and L-cones).Organisms with trichromacy are called trichromats.

cone cell(=cone cell 원추세포) : http://en.wikipedia.org/wiki/Cone_cell

망막에 있는 원추세포(색을 식별하는 세포로 밝기를 수용한다. 반대로 어두운 곳에서는 rod_cell이 더 잘 본다.)

Cone cell Normalized responsivity spectra of human cone cells, S, M, and L types

Rod cell (간상세포): http://terms.naver.com/entry.nhn?docId=429685&cid=42411&categoryId=42411

Rod cells, or rods, are photoreceptor cells in the retina of the eyethat can function in less intense light than the other type of visual photoreceptor, cone cells. Rods are concentrated at the outer edges of the retina and are used in peripheral vision. On average, there are approximately 125 million rod cells in the human retina.[1] More sensitive than cone cells, rod cells are almost entirely responsible for night vision.

후기

예전에 학교 다니면서 공부했던 내용인데 다 잊어버린 듯 하다…

[생각의 정리] JAVA END, Start IOS

JAVA END, Start IOS 라고 쓰고 싶었지만 내 마음대로는 안될 것이다.

중간 점검 하는 시간을 갖는다.

Q1. 본인이 개발을 잘한다고 생각하는가? 서버 개발에 더이상 배울 것이 없어서 앱 개발을 하려는건가?
A1. 잘한다고 생각 한 적도 없고 더이상 미련이 있다고도 한 적이 없다. 정말 모르는게 무궁무진하고 아직도 배울 것이 산더미다. 본인을 과대평가 하는 것 만큼 미련한 것도 없다고 생각 한다.
만약 서버 개발을 계속 하게 된다면 사용자 검색 사용 패턴을 분석한 맞춤형 시스템을 만들어 보고 싶다. 만들기 위해 필요한 것이 무엇인지 알고 있으며 이론적으로는 공부를 마쳤다. 어려운 문제들을 해결하고 고객에게 가치를 제공하고 싶다.

Q2. 자만하고 있는가? 아니라면 무엇이 부족하다고 생각하는가?
A2. 그리고 못났다고 생각 하지 않는다. 사람 마다 차이는 있고 본인이 무엇이 부족한지 깨닫는 것 부터가 발전할 수 있는 가능성의 기저를 만든다. 나를 사랑한다. 그리고 자기 자신을 알고 갈고 닦는 사람을 존경한다.
지금 나의 부족한 점은 고객에게 가치를 줄 수 있는 서비스를 기획하기 위한 가치에 대한 고민.
고객들의 니즈를 파악하고 패턴을 분석하고 적절한 시점에서 가려운 곳을 시원하게 만들어 줄 서비스(솔루션)을 만들어 주고 싶다. 물론 돈도 벌고 싶다. ㅋㅋ

Q3. 지금까지 대단한 일만 해온 것 처럼 들리는 것 같은데 무슨 일을 해왔나?
A3. 그렇지 않다. 남들이 하기 싫어하는 일만 대부분 해왔다. 남들이 하기 싫은일, 해결하기 어려운 일, 그런 일들은 대부분 나에게 온다. 힘든 일은 모두가 하기 싫어하지만 누군가는 해야 할 일이다.
일단 일을 맡으면 종류에 관계 없이 잘 해야 한다.(이건 내 사수가 한말인데 정말 100번 공감한다)
고객문의 원격지원 업무 해보면 대략 감이 올 것이다.

Q4. 일을 하면서 불만 같은 것은 없었는가? 회사를 그만 두고 싶은 생각은 나지 않았나?
A4. 일을 하면서 불만은 없었다. 단지 언제까지 이런 일만을 할 수는 없었기에 내가 협상을 제시 할만한 실력을 갈고 닦기 위해 공부와 실습을 해오고 있다. 그 기회를 잡을 자격을 갖추었을 때 상사나 조직에 대한 협상의 여지를 두기 보다는 나의 길을 갈 뿐이다.

Q5. 라이벌 의식을 느끼는가?
A5. 라이벌이라는 것을 만나 보고 싶다. 라이벌 이라기 보다는 서로 발전을 도모할 수 있는 거울 같은 존재가 필요하다. 남을 헐뜯고 적을 만들 필요는 없다. 적을 만들면 결국에는 파멸과 고립만이 남는다. 사내 정치 신경 쓰지 않고 좋은 점을 서로 배울 수 있는 사람이 있으면 좋겠다.

Q6. 앞으로 무슨일을 하고 싶은가?
A6. 당분간은 업무적으로 IOS 개발을 해야 한다. 내게 일이 주어졌으니 이 분야에 대한 전문가가 되어야 한다. 당분간은 이쪽으로 갈고 닦으려고 한다.

결론은 잘 하자…ㅎㅎ

[eclipse] MAC subversion javaHL library error

ㅇ 재현환경 :OS X10.9.5

ㅇ xcode 6.0.1

ㅇ 연관 링크 :

http://subclipse.tigris.org/wiki/JavaHL#head-5bf26515097c3231c1b04dfdb22c036bc511926b

https://github.com/Homebrew/homebrew/issues/2040

ㅇ 해결방법

1. xcode command line tool  설치.

2. apache apr 설치(안해도 될것 같은데)

3. javaHL 설치

4. eclipse(sts) 재시작

5. 깔끔 오류 메시지 해결 완료.