[iOS] "Firebase"와 "nifty cloud mobile backend"의 추론 알림 서비스 비교
입문
Firebase 및 nifty cloud mobile backend에서 푸시 알림을 받는 곳으로 가져와서 각자의 장점과 단점을 설명할 수 있다면 좋겠습니다!
Firebase
상술한 링크를 열면 우선 항목을 추가합니다!

"새 프로젝트 만들기"단추를 누르십시오!!
적당히 양보하다


프로젝트가 만들어져서 iOS 앱에 Firebase를 추가할 곳을 선택합니다!

BundleID 입력을 요청받았기 때문에 입력합니다.

Xcode 프로젝트와 동일
다음은 Google Service-Ifo입니다.프로젝트에plist를 추가하고 화면의 설명에 따라 조작합니다.
Podfile에 추가된 내용은 다음과 같습니다.
Podfile
pod 'Firebase/Core'
pod 'Firebase/Messaging'
pod install
끝나고 그다음 AppDelegate
일!AppDelegate.swift
import UIKit
import Firebase
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
FIRApp.configure()
let settings: UIUserNotificationSettings =
UIUserNotificationSettings(forTypes: [.Alert, .Badge, .Sound], categories: nil)
application.registerUserNotificationSettings(settings)
application.registerForRemoteNotifications()
return true
}
func application(application: UIApplication, didRegisterUserNotificationSettings notificationSettings: UIUserNotificationSettings) {
if notificationSettings.types != .None {
application.registerForRemoteNotifications()
}
}
func application(application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: NSData) {
FIRInstanceID.instanceID().setAPNSToken(deviceToken, type: FIRInstanceIDAPNSTokenType.Unknown)
}
}
아마 이런 느낌일 거예요.이렇게 하면 돼요.

파일
.p12
을 그림처럼 업로드합니다.왼쪽 메뉴에서 선택
Notifications
밀어넣기 알림 등록
상술한 최소 구성만으로도 충분하다!
그럼 한번 해봐!!

이거!!
록 화면의 와타나베 요를 볼 수 있지만 신경 쓰지 마세요.
유유히
이점
결점
nifty cloud mobile backend
상세한 상황은 상술한 보도를 참고하십시오.
Podfile에 다음 내용 추가
Podfile
platform :ios, '8.0'
use_frameworks!
pod 'NCMB', :git => 'https://github.com/NIFTYCloud-mbaas/ncmb_ios.git'
추가 완료 후 pod install
Xcode 파일 > 새로 만들기 > 파일...Bridging-Header.h
파일을 만듭니다.Bridging-Header.h
#ifndef Bridging_Header_h
#define Bridging_Header_h
// ここを追加
#import <NCMB/NCMB.h>
#endif /* Bridging_Header_h */
프로젝트 > 구성 설정 창에서 검색objective-c bridging header

여기 창문에 아까 만든 거 드래그
Bridging-Header.h
AppDelegate.swift
최소 구조이지만 푸시 알림 수신 가능AppDelegate.swift
import UIKit
import NCMB
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
let applicationKey = "APPLICATION_KEY"
let clientKey = "CLIENT_KEY"
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
NCMB.setApplicationKey(applicationKey, clientKey: clientKey)
let settings: UIUserNotificationSettings =
UIUserNotificationSettings(forTypes: [.Alert, .Badge, .Sound], categories: nil)
application.registerUserNotificationSettings(settings)
application.registerForRemoteNotifications()
return true
}
func application(application: UIApplication, didRegisterUserNotificationSettings notificationSettings: UIUserNotificationSettings) {
if notificationSettings.types != .None {
application.registerForRemoteNotifications()
}
}
func application(application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: NSData) {
let installation = NCMBInstallation.currentInstallation()
installation.setDeviceTokenFromData(deviceToken)
installation.saveInBackgroundWithBlock { (error: NSError!) -> Void in
if (error != nil){
print("Failure")
} else {
print("Success")
}
}
}
}
알림!!
아까부터 한 시간 반이 지났는데 심리적 작용인 것 같아요.
이점
결점
마지막
향상된 좋은 느낌 nifty cloud mobile backend 좋아요?그런 느낌은 들지만 전혀 그런 일은 없다고 생각해요.저는 Firebase가 지금부터 뜨거운 분위기를 보여드릴 거라고 생각합니다.🍣
알림 푸시 서비스만 추가하면 뭐든지 가능합니다.
Analytics 등 다른 기능만 추가한다면 Firebase를 추천합니다.
Love Live!햇빛!!추천 멤버는 와타나베 요입니다.
Reference
이 문제에 관하여([iOS] "Firebase"와 "nifty cloud mobile backend"의 추론 알림 서비스 비교), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/nnsnodnb/items/e84f134e774930aa4afe텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)