0.0.4 • Published 3 years ago
onemedics-app-test v0.0.4
요약
This is the App Module of the OneMedics Push SDK 원메딕스인더스트리 Android,ios push notification SDK 를 지원합니다
목차
- 기능
- 설치
- NOTE
- 사용예제
- 참조
기능
This is the App Module of the OneMedics Push SDK
- initializeToken
- getMessaging
- modifyPermission
- deleteUserToken
설치
npm i onemedics-push-app
NOTE
NOTE: Firebase를 iOS 앱에 추가하려면 먼저 iOS 앱에 연결할 Firebase 프로젝트를 만드세요. Firebase 프로젝트에 대한 자세한 내용은 아래 링크를 참조하세요. https://firebase.google.com/docs/cloud-messaging/ios/client
NOTE: Firebase 클라우드 메시징 Android 클라이언트 앱을 만들려면 FirebaseMessaging API와 Gradle이 있는 Android 스튜디오 1.4 이상을 사용하세요. 아래 링크를 참조하세요. https://firebase.google.com/docs/cloud-messaging/android/client
사용예제
초기세팅
index.ts
import {PushCoreModule, CoreModuleConfig} from 'onemedics-push-core';
const coreModuleConfig: CoreModuleConfig = {
baseToken:
'Bearer ${accessToken}',
url: 'https://dev.onemedics.net:9443/push-api/graphql',
clientId: 'dosoo-app',
export const pushCoreModule = new PushCoreModule(coreModuleConfig);
const PushApp = () => {
return (
<ApolloProvider client={pushCoreModule.apolloClient}>
<App />
</ApolloProvider>
);
};
AppRegistry.registerComponent(appName, () => PushApp);
};
app.tsx
import {PushAppModule} from 'onemedics-push-app';
const pushModule = new PushAppModule();
pushModule
.initializeToken('dosoo-app')
.then((result) => console.log(result));
참조
참고 리액트 네이티브 파이어베이스