Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
react-native-fcm
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Jira
Jira
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ym
react-native-fcm
Commits
b03b51ac
Commit
b03b51ac
authored
Feb 12, 2018
by
Libin Lu
Committed by
GitHub
Feb 12, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add opened_from_tray in initialNotificaiton
parent
05d33533
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
8 deletions
+14
-8
ios/RNFIRMessaging.m
ios/RNFIRMessaging.m
+14
-8
No files found.
ios/RNFIRMessaging.m
View file @
b03b51ac
...
...
@@ -332,16 +332,22 @@ RCT_EXPORT_METHOD(isDirectChannelEstablished:(RCTPromiseResolveBlock)resolve rej
RCT_EXPORT_METHOD
(
getInitialNotification
:
(
RCTPromiseResolveBlock
)
resolve
rejecter
:
(
RCTPromiseRejectBlock
)
reject
)
{
UILocalNotification
*
localUserInfo
=
self
.
bridge
.
launchOptions
[
UIApplicationLaunchOptionsLocalNotificationKey
];
if
(
localUserInfo
)
{
resolve
([[
localUserInfo
userInfo
]
copy
]);
}
else
{
resolve
([
self
.
bridge
.
launchOptions
[
UIApplicationLaunchOptionsRemoteNotificationKey
]
copy
]);
}
NSDictionary
*
initialNotif
;
NSDictionary
*
localUserInfo
=
[[
self
.
bridge
.
launchOptions
[
UIApplicationLaunchOptionsLocalNotificationKey
]
userInfo
]
mutableCopy
];
NSDictionary
*
remoteUserInfo
=
[
self
.
bridge
.
launchOptions
[
UIApplicationLaunchOptionsRemoteNotificationKey
]
mutableCopy
];
if
(
localUserInfo
){
initialNotif
=
localUserInfo
;
}
else
if
(
remoteUserInfo
)
{
initialNotif
=
remoteUserInfo
;
}
if
(
initialNotif
)
{
[
initialNotif
setValue
:
@YES
forKey
:
@"opened_from_tray"
];
resolve
(
initialNotif
);
}
else
{
resolve
(
nil
);
}
}
RCT_EXPORT_METHOD
(
getAPNSToken
:
(
RCTPromiseResolveBlock
)
resolve
rejecter
:
(
RCTPromiseRejectBlock
)
reject
)
{
NSData
*
deviceToken
=
[
FIRMessaging
messaging
].
APNSToken
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment