• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: Swift – Can I use realm in Notification Service Extension?

Resolved: Swift – Can I use realm in Notification Service Extension?

0
By Isaac Tonny on 17/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

As the title, can I use realm in Notification Service Extension ?
When I receive a notification, I need to get some data from realm, then edit notification content before showing to user.
I do below in the Podfile
Then I import RealmSwift in NotificationService.swift .
But it seems not working because it doesn’t use the same database and can not find the scope I’ve already created.

Answer:

Yes it works, you need to create an AppGroup in order to share data between your app & the Extension.

If you have better answer, please add a comment about this, thank you!

database notifications realm swift unnotificationserviceextension
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: TypeScript does not recognize properties when instantiating interface array

27/03/2023

Resolved: How to make statement case insensitive when uploading a dta file with specified columns?

27/03/2023

Resolved: Sort dataframe columns value by close it to another column

27/03/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.