# Whitelisted Discourse app with Push Notifications via OneSignal

**URL:** <https://meta.discourse.org/t/whitelisted-discourse-app-with-push-notifications-via-onesignal/58247>\
**Category:** Plugin\
**Tags:** broken\
**Created:** [3월 2, 2017, 6:27오후 UTC](https://meta.discourse.org/t/whitelisted-discourse-app-with-push-notifications-via-onesignal/58247 "2017-03-02T18:27:22Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![SouperC](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/souperc/32/62875_2.png) [@SouperC](https://meta.discourse.org/u/SouperC)\
**Post date:** [11월 29, 2017, 3:30오후 UTC](https://meta.discourse.org/t/whitelisted-discourse-app-with-push-notifications-via-onesignal/58247/23 "2017-11-29T15:30:24Z")

</div>

That’s a nice workaround for \<\>.

I love the countdown to 1k members too. I might just borrow that 🙂

My community is here, maybe you’ll find something useful too. [forums.kartpulse.com](http://forums.kartpulse.com)

---

<div class="post-metadata">

**Author:** ![evansakanno](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/evansakanno/32/116769_2.png) [@evansakanno](https://meta.discourse.org/u/evansakanno)\
**Post date:** [1월 7, 2018, 9:46오전 UTC](https://meta.discourse.org/t/whitelisted-discourse-app-with-push-notifications-via-onesignal/58247/24 "2018-01-07T09:46:09Z")

</div>

From what i’ve been reading this is remarkable.

What will it cost to help set this up for [zegist.com](http://zegist.com)?  
We will love to support with design customisation.

---

<div class="post-metadata">

**Author:** ![Pad\_Pors](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pad_pors/32/52016_2.png) [@Pad\_Pors](https://meta.discourse.org/u/Pad_Pors)\
**Post date:** [4월 23, 2018, 6:01오전 UTC](https://meta.discourse.org/t/whitelisted-discourse-app-with-push-notifications-via-onesignal/58247/25 "2018-04-23T06:01:37Z")

</div>

google login doesn’t work with the app due to the following policy:

> **[Modernizing OAuth interactions in Native Apps for Better Usability and
     ...](https://developers.googleblog.com/modernizing-oauth-interactions-in-native-apps-for-better-usability-and-security/)**

they suggested to add google sign in to the app (for android):

> **[Android Credential Manager API  |  Authentication  |  Google for Developers](https://developers.google.com/identity/android-credential-manager)**

would you add this to the native app as well?

---

<div class="post-metadata">

**Author:** ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)\
**Post date:** [4월 23, 2018, 12:53오후 UTC](https://meta.discourse.org/t/whitelisted-discourse-app-with-push-notifications-via-onesignal/58247/26 "2018-04-23T12:53:12Z")

</div>

I don’t have any plans to add this, and I fear it’s more complicated than it seems, because the authentication needs to happen at the Discourse level.

---

<div class="post-metadata">

**Author:** ![jtbayly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jtbayly/32/119510_2.png) [@jtbayly](https://meta.discourse.org/u/jtbayly)\
**Post date:** [5월 1, 2018, 12:05오전 UTC](https://meta.discourse.org/t/whitelisted-discourse-app-with-push-notifications-via-onesignal/58247/27 "2018-05-01T00:05:13Z")

</div>

Isn’t Google likely to require this of sites using it for SSO, too?

---

<div class="post-metadata">

**Author:** ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)\
**Post date:** [5월 1, 2018, 12:43오후 UTC](https://meta.discourse.org/t/whitelisted-discourse-app-with-push-notifications-via-onesignal/58247/28 "2018-05-01T12:43:22Z")

</div>

Probably. I should clarify that while I personally don’t have the time/skill to do this, others can certainly contribute, I would be happy to have this feature in the app.

---

<div class="post-metadata">

**Author:** ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)\
**Post date:** [5월 8, 2018, 5:10오전 UTC](https://meta.discourse.org/t/whitelisted-discourse-app-with-push-notifications-via-onesignal/58247/29 "2018-05-08T05:10:06Z")

</div>

With Apple announcing that new app submissions after July 2018 will need to use the iOS 11 SDK and support the iPhone X screen is anyone going to be updating the base app?

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [5월 8, 2018, 5:11오전 UTC](https://meta.discourse.org/t/whitelisted-discourse-app-with-push-notifications-via-onesignal/58247/30 "2018-05-08T05:11:35Z")

</div>

We have supported the screen on the iPhone X for quite a while.

---

<div class="post-metadata">

**Author:** ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)\
**Post date:** [5월 8, 2018, 2:33오후 UTC](https://meta.discourse.org/t/whitelisted-discourse-app-with-push-notifications-via-onesignal/58247/31 "2018-05-08T14:33:39Z")

</div>

iPhone X is supported in the whitelisted app, and SDK 11 shouldn’t pose any problems.

---

<div class="post-metadata">

**Author:** ![Garrick](https://avatars.discourse-cdn.com/v4/letter/g/b9bd4f/32.png) [@Garrick](https://meta.discourse.org/u/Garrick)\
**Post date:** [5월 13, 2018, 8:27오후 UTC](https://meta.discourse.org/t/whitelisted-discourse-app-with-push-notifications-via-onesignal/58247/32 "2018-05-13T20:27:03Z")

</div>

Hey Dave, can you share the code for that bottom part?

---

<div class="post-metadata">

**Author:** ![WorldIsMine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/worldismine/32/455660_2.png) [@WorldIsMine](https://meta.discourse.org/u/WorldIsMine)\
**Post date:** [5월 14, 2018, 6:31오전 UTC](https://meta.discourse.org/t/whitelisted-discourse-app-with-push-notifications-via-onesignal/58247/33 "2018-05-14T06:31:54Z")

</div>

In the mobile version add this to \< /body \>

```
<div id="mobilenav">
<a href="javascript:history.back()" class="app-go-back"><i class="fa fa-backward" aria-hidden="true"></i></a>
<a href="javascript:history.forward()" class="app-go-forward"><i class="fa fa-forward" aria-hidden="true"></i> 
</a> </div>

```

Mobile CSS:

```
div#mobilenav {
box-shadow: 0px -1px 5px 0px rgba(0,0,0,0.15);
position: fixed;
bottom: 0px;
width: 100%;
height: auto;
border: none;
z-index: 99999999999;
}

```

Not sure if this is all of it, I didn’t do this myself it was my dev and he is a-wall for now.

---

<div class="post-metadata">

**Author:** ![bayus](https://avatars.discourse-cdn.com/v4/letter/b/ecae2f/32.png) [@bayus](https://meta.discourse.org/u/bayus)\
**Post date:** [7월 18, 2018, 9:23오전 UTC](https://meta.discourse.org/t/whitelisted-discourse-app-with-push-notifications-via-onesignal/58247/34 "2018-07-18T09:23:46Z")

</div>

Superb app!!! followed all the instruction and was able to set up a mobile app for android platform. Everything is working fine but the **discourse-onesignal plugin is not sending notifications to onesignal’s REST API** so the mobile app is not recieving push notification from my discourse instance.

The mobile app received the test push notification i sent from the dashboard of the account i created on onesignal which means the mobile app onesignal configuration is okay

I don’t know if i’m doing something wrong because the **discourse-onesignal discourse plugin** doesn’t seem to be sending the notification to onesignal

Thanks in anticipation

---

<div class="post-metadata">

**Author:** ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)\
**Post date:** [7월 18, 2018, 2:19오후 UTC](https://meta.discourse.org/t/whitelisted-discourse-app-with-push-notifications-via-onesignal/58247/35 "2018-07-18T14:19:43Z")

</div>

Thanks @bayus, there are a few things that could make the discourse-onesignal plugin not send PNs. Make sure you’ve set up it’s settings correctly:

- enable notifications, add your OneSignal App ID and the OneSignal REST API key.
- In your Discourse settings, add your site’s home URL to `allowed user api auth redirects` (the app will redirect to your home URL once the user authorizes access for the app in Discourse).

If the above is correct, then try restarting your Discourse instance. If that doesn’t work either, check your logs for any onesignal-related errors.

(I’m also assuming you are using the latest version of the app.)

---

<div class="post-metadata">

**Author:** ![Menzer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/menzer/32/119682_2.png) [@Menzer](https://meta.discourse.org/u/Menzer)\
**Post date:** [7월 20, 2018, 7:17오후 UTC](https://meta.discourse.org/t/whitelisted-discourse-app-with-push-notifications-via-onesignal/58247/36 "2018-07-20T19:17:38Z")

</div>

Hi @bayus, if you have not managed to get this working I think I can help… I had this problem and was scratching my head for a long time and finally got it working…

Open app.variables.js and make sure you remove the 2 slashed at the beginning of the global.onesignalappid & global.googleprojectnumber

```
// App ID from OneSignal (see readme, needs manual update)
global.oneSignalAppId = ' *********************' (Enter Onesignal Api)

// Google Project Number - Android only (see readme, needs manual update)
global.googleProjectNumber = ' ************' (Enter Project number)

```

Then open up

`/android/app/build.gradle` and find

`manifestPlaceholders = [onesignal_app_id: "DISCOSINGLE_ONESIGNAL_APP_ID",` ← replace with your onesignal api here between the “”

`onesignal_google_project_number: "DISCOSINGLE_GOOGLE_PROJECT_NUMBER"]` ← replace with your google project number here between the “”

Hope it makes sense but it definitely worked for me… it’s a fantastic app and I hope they keep updating it and it has great potential

---

<div class="post-metadata">

**Author:** ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)\
**Post date:** [11월 15, 2018, 5:37오전 UTC](https://meta.discourse.org/t/whitelisted-discourse-app-with-push-notifications-via-onesignal/58247/37 "2018-11-15T05:37:17Z")

</div>

If anyone has issues building and running this on x-code 10. You need to:

- Manually copy node modules as described [here](https://github.com/facebook/react-native/issues/21168).

- Remove and re-add `libfishhook.a` as described [here](https://github.com/facebook/react-native/issues/19569#issuecomment-422691829).

The [generic CFBundleIdentifier issue](https://github.com/facebook/react-native/issues/7308) is a red herring 🎣

---

<div class="post-metadata">

**Author:** ![jtbayly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jtbayly/32/119510_2.png) [@jtbayly](https://meta.discourse.org/u/jtbayly)\
**Post date:** [12월 8, 2018, 2:01오전 UTC](https://meta.discourse.org/t/whitelisted-discourse-app-with-push-notifications-via-onesignal/58247/38 "2018-12-08T02:01:18Z")

</div>

> [@pmusaraj](#):
>
> left swipe to go back is on the wishlist

Did this ever get added?

---

<div class="post-metadata">

**Author:** ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)\
**Post date:** [12월 8, 2018, 2:29오전 UTC](https://meta.discourse.org/t/whitelisted-discourse-app-with-push-notifications-via-onesignal/58247/39 "2018-12-08T02:29:29Z")

</div>

No, it did not get added.

---

<div class="post-metadata">

**Author:** ![jtbayly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jtbayly/32/119510_2.png) [@jtbayly](https://meta.discourse.org/u/jtbayly)\
**Post date:** [12월 8, 2018, 5:00오전 UTC](https://meta.discourse.org/t/whitelisted-discourse-app-with-push-notifications-via-onesignal/58247/40 "2018-12-08T05:00:35Z")

</div>

Just curious if this makes a difference:  
[https://github.com/facebook/react-native/issues/321#issuecomment-290953001](https://github.com/facebook/react-native/issues/321#issuecomment-290953001)

If it’s as simple as dropping in a replacement in React Native, that became available recently… but I don’t know the app. What do you think?

Edited to add: I created an issue on Github that explains this a bit more:  
[https://github.com/pmusaraj/discourse-mobile-single-site-app/issues/16](https://github.com/pmusaraj/discourse-mobile-single-site-app/issues/16)

---

<div class="post-metadata">

**Author:** ![WorldIsMine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/worldismine/32/455660_2.png) [@WorldIsMine](https://meta.discourse.org/u/WorldIsMine)\
**Post date:** [12월 31, 2018, 8:34오전 UTC](https://meta.discourse.org/t/whitelisted-discourse-app-with-push-notifications-via-onesignal/58247/41 "2018-12-31T08:34:09Z")

</div>

Just wondering, how many people use this plugin? I am asking because I would hate to lose our app, so I would like to continue to support the developer of it so he doesn’t disappear on us 🙂 Would other users be interested in bankrolling this a tad (with me).

---

<div class="post-metadata">

**Author:** ![davidkingham](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/davidkingham/32/119528_2.png) [@davidkingham](https://meta.discourse.org/u/davidkingham)\
**Post date:** [12월 31, 2018, 3:27오후 UTC](https://meta.discourse.org/t/whitelisted-discourse-app-with-push-notifications-via-onesignal/58247/42 "2018-12-31T15:27:28Z")

</div>

I am using it and would be willing to chip in if needed. We would have to find a developer since @pmusaraj is now part of the Discourse team and is not doing paid gigs anymore ☹

[이전 페이지](https://meta.discourse.org/t/whitelisted-discourse-app-with-push-notifications-via-onesignal/58247.md?page=1)

[다음 페이지](https://meta.discourse.org/t/whitelisted-discourse-app-with-push-notifications-via-onesignal/58247.md?page=3)
