Parse.com에서 Rubbymotion 및 Push Notification
9347 단어 iOSRubyMotionParse.com
Baas(Backend asa Service)를 대표하는 인물 Parse.퍼시노티픽을 컴으로 설치했기 때문에 파우스를 사용합니다.저는 com에 대한 인상과 소감을 쓰고 싶습니다.
설정에서 첫 번째 Push notification까지
Parse.com에 등록한 후 가장 먼저 방문한 것은Push Quick Start Guide이다.
Parse.com의 문서는 전체적으로 보면 비교적 읽기 쉽다. 이것은 내가 좋아하는 이유 중의 하나이다.
위쪽부터 순서대로 작성된 내용을 구현하고 페이지 끝에 있는 센드 테스트 푸시 버튼을 클릭하면 푸시 노티픽션이 앱이 설치된 실제 기기로 배달돼 설치가 완료된다.
뭐랄까, 모범적인 Start Guide입니다.
작성된 소스 코드는 본문의 결말에 기재되어 있습니다.
설치가 완료되면 애플리케이션이 시작됩니다.인터넷에서 무슨 일이 일어났는지
어디 보자Dashboard.
왼쪽 상단에 있는 Selectan app 드롭다운 에서 이번 테스트 애플리케이션을 선택하고 마이그레이션 후 화면 상단에 있는 Data Browser 를 클릭하면 이런 느낌의 화면.
이 화면은Parse입니다.컴이 개발사에 제공하는 키밸류형 데이터 스토어의 상태를 볼 수 있다.
두 개의 Installations Class Object가 있습니다.
※ 이번에는 두 장치에 앱을 설치했습니다.
iOS 애플리케이션의 경우com에서 Object를 만들라고 지시한 게 앱이에요.delegate.rb의 이 부분.
app_delegate.rb # callback of register_push_notifications
# see https://www.parse.com/tutorials/ios-push-notifications
def application(application, didRegisterForRemoteNotificationsWithDeviceToken:newDeviceToken)
# Store the deviceToken in the current installation and save it to Parse.
currentInstallation = PFInstallation.currentInstallation()
currentInstallation.setDeviceTokenFromData(newDeviceToken)
currentInstallation.saveInBackground()
end
Parse.com에 HTTP를 요청했어야 하는데 Parse.SDK에 포함된 PFINstallation 클래스가 그것을 숨겼습니다.
근데 Installations Class가 뭐냐면요.및 문서입니다.
Push Notification Guide에는 설치라는 작은 제목이 있습니다.
Push Developer Guide | Parse
Installations
Every Parse application installed on a device registered for push notifications has an associated Installation object. The Installation object is where you store all the data needed to target push notifications. For example, in a baseball app, you could store the teams a user is interested in to send updates about their performance.
어디 보자Dashboard.
왼쪽 상단에 있는 Selectan app 드롭다운 에서 이번 테스트 애플리케이션을 선택하고 마이그레이션 후 화면 상단에 있는 Data Browser 를 클릭하면 이런 느낌의 화면.
이 화면은Parse입니다.컴이 개발사에 제공하는 키밸류형 데이터 스토어의 상태를 볼 수 있다.
두 개의 Installations Class Object가 있습니다.
※ 이번에는 두 장치에 앱을 설치했습니다.
iOS 애플리케이션의 경우com에서 Object를 만들라고 지시한 게 앱이에요.delegate.rb의 이 부분.
app_delegate.rb
# callback of register_push_notifications
# see https://www.parse.com/tutorials/ios-push-notifications
def application(application, didRegisterForRemoteNotificationsWithDeviceToken:newDeviceToken)
# Store the deviceToken in the current installation and save it to Parse.
currentInstallation = PFInstallation.currentInstallation()
currentInstallation.setDeviceTokenFromData(newDeviceToken)
currentInstallation.saveInBackground()
end
Parse.com에 HTTP를 요청했어야 하는데 Parse.SDK에 포함된 PFINstallation 클래스가 그것을 숨겼습니다.근데 Installations Class가 뭐냐면요.및 문서입니다.
Push Notification Guide에는 설치라는 작은 제목이 있습니다.
Push Developer Guide | Parse
Installations
Every Parse application installed on a device registered for push notifications has an associated Installation object. The Installation object is where you store all the data needed to target push notifications. For example, in a baseball app, you could store the teams a user is interested in to send updates about their performance.
이 문서도 보기 쉽다.
지금 읽는 곳 왼쪽에 내비게이션이 돋보이기 때문에 자신이 지금 무엇을 읽고 있는지 직관적으로 알 수 있다.
지금 읽고 있는 곳은 언제든지 내비게이션에서 돌아올 수 있기 때문에 다른 신경 쓰이는 부분을 살짝 훑어본다.
예: 여기Cloud Code Guide | Parse
잘 모르겠지만.
https://api.parse.com/1/functions/[function 名]
을 통해 호출할 수 있다나는 이런 말을 읽을 수 있다.
Parse.com에 대한 인상이 바뀌었어요.
자기가 파르세야.대상
이런 인상이 있다.
하지만 사실
전자와 후자는 어떤 차이가 있습니까?이렇게 물어보시면 조금 말이 막혀요.
전자
이런 상황에서 사용자는 우리의 응용 프로그램을 가리키며 사용자에 대한 사랑을 말합니까?있죠.
그래서 좀 정식으로 이용하고 싶어요!
(이게 무슨 총결산이야)
최후
RubyMotion Advent Calendar 2013, 내일 5일째naoya@github!
주제 밖의 말, 용자두악용 Xversion 2.0 잠자는 용자와 맹우 안내은 같은 날 10:00!!
참고 자료
Reference
이 문제에 관하여(Parse.com에서 Rubbymotion 및 Push Notification), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/amazedkoumei@github/items/45447b5f44e33c0e5369텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)