Whitelisted Discourse app with Push Notifications via OneSignal

That’s a nice workaround for <>.

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

My community is here, maybe you’ll find something useful too. forums.kartpulse.com

1 Like

From what i’ve been reading this is remarkable.

What will it cost to help set this up for zegist.com?
We will love to support with design customisation.

1 Like

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

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

would you add this to the native app as well?

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.

1 Like

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

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.

2 Likes

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?

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

4 Likes

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

2 Likes

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

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.

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

1 Like

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.)

3 Likes

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

3 Likes

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

  • Manually copy node modules as described here.

  • Remove and re-add libfishhook.a as described here.

The generic CFBundleIdentifier issue is a red herring :fishing_pole_and_fish:

2 Likes

Did this ever get added?

1 Like

No, it did not get added.

4 Likes

Just curious if this makes a difference:
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

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 :slight_smile: Would other users be interested in bankrolling this a tad (with me).

4 Likes

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 :frowning:

3 Likes