Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS-App #87

Closed
jmattheis opened this issue Nov 26, 2018 · 18 comments
Closed

iOS-App #87

jmattheis opened this issue Nov 26, 2018 · 18 comments
Labels
a:feature New feature or request help wanted Extra attention is needed

Comments

@jmattheis
Copy link
Member

It would be great to have an iOS app for Gotify. Maybe someone from the community could contribute such an app as I do not have any experience with iOS/swift.

@jmattheis jmattheis added a:feature New feature or request help wanted Extra attention is needed prio:medium labels Nov 26, 2018
@jmattheis jmattheis pinned this issue Jan 3, 2019
@jmattheis jmattheis unpinned this issue Jan 3, 2019
@eternal-flame-AD
Copy link
Member

I'm afraid the biggest obstacle would be Apple's strict restrictions on background services. We cannot keep a persistent WebSocket connection in the background without abusing some APIs, which will absolutely disqualify the app from going onto the App Store and drain the battery significantly. Notifications could only be delivered through APN, which requires a developer account and a central server to manage notifications and send them to Apple before reaching the user, but this is not what gotify is designed for.

@jmattheis
Copy link
Member Author

Thanks for your insight @eternal-flame-AD. It sucks that iOS has such strict restrictions.

I'm closing this issue for now because gotify will not use any third party service to deliver messages.

@je-s
Copy link

je-s commented Feb 3, 2021

@jmattheis Do you think it would be a viable option to at least have a client which displays and receives old and new push notifications while in the foreground, without the functionality of actually getting push messages over Apple's push notification service?
I know this would -at least partly- subvert the reason and meaning behind such a push service and, especially, a corresponding notification app, but it would at least make a live-view mode available, and you could use it to manually check for new notifications.

My current assumption is that for instance PushOver and Catapush use APNs to at least notify that there is new data, which then again is probably triggering a "pull" of the actual data from their respective services/endpoints. But this unfortunately requires using the APNs. Maybe it'd be an option to make something like that available as an optional plugin/extension, which connects to the APNs and takes over the part of notifying for new data?

Nevertheless, I'm going to make some research on this topic in the next few days, and see if I find any possibility with which this could be worked around. I'm going to look into the exact restriction of background jobs on iOS.
It seems that the German Corona Warn App is using a mechanism to display messages from the background without push notifications. Maybe there's at least a possibility to run something like a REST request periodically, to check whether there are new messages or not. (Maybe that's inexpensive enough from a power consumption perspective.)
If that would be feasible, we would at least have the option to display something like "There are X new notifications. Open the Gotify App to check 'em out."

@jmattheis
Copy link
Member Author

Sure, an app with limited functionality is better that no app at all (:

Pushover encrypts messages with a device key, thus, transmitting the whole message via APN/FCM -> https://support.pushover.net/i46-are-messages-notifications-encrypted

Yeah, probably iOS has some kind of periodic job, in which new messages could be fetched.

@GalvinGao
Copy link

By using the Push Notification Extensions the one may send encrypted messages to the device endpoint and the device would be possible to decrypt it using the extension. However, quoting "I'm closing this issue for now because gotify will not use any third party service to deliver messages." I doubt that this would be a place for the gotify team to go though...

@jmattheis jmattheis mentioned this issue Sep 7, 2021
@heywoodlh
Copy link

heywoodlh commented Oct 29, 2021

Not re-opening this issue, but I think this is relevant to share here.

Just switched back over to iOS from Android and was bummed to find there is no Gotify iOS app. So I wrote a little shell script that watches the Gotify stream and then sends me notifications through Pushover using ntfy.

Here's the relevant snippet:

#!/usr/bin/env bash

token='xxxxxxxxxxxx'
uri='ws://192.168.1.10:8000/stream'

while read line
do
        ntfy send $(echo ${line} | jq -r '.message')
done < <(websocat -H "X-Gotify-Key: ${token}" -t - autoreconnect:"${uri}")

This snippet will read each newline that websocat receives and send it to me via ntfy. You can replace ntfy send with whatever command you want to use that sends you notifications.

This setup is nice because I don't need to switch everything to Pushover, I can keep Gotify for all my notifications.

EDIT: I updated the script with the autoreconnect overlay so it can handle Gotify going down and coming back up.

@najtin
Copy link

najtin commented Oct 29, 2021

Just switched back over to iOS from Android and was bummed to find there is no Gotify Android app.

not sure what you mean:
https://github.com/gotify/android
https://play.google.com/store/apps/details?id=com.github.gotify

@najtin
Copy link

najtin commented Oct 29, 2021

Ahhh forgive me. You meant that there is no Gotify iOS App. got it. sorry.

@heywoodlh
Copy link

Whoops, yeah, sorry for the typo @najtin! Fixed it.

@createcandle
Copy link

I'm closing this issue for now because gotify will not use any third party service to deliver messages.

But couldn't an iPhone app with periodic checking connect to the self-hosted server once in a while to get new messages? And when the user opens the app? See the background fetch details here.

A delayed message is better than nothing.

@strider72
Copy link

But couldn't an iPhone app with periodic checking connect to the self-hosted server once in a while to get new messages? And when the user opens the app?

When the user opens the app, sure. But for background notifications, the developer has to specify the server, and that server has to send via Apple's notification servers. There's no way to make an app that allows the user to choose a server that sends background notifications.

@createcandle
Copy link

Yes I understand. My point was that an app without background notifications could still be useful.

@niwla23
Copy link

niwla23 commented Aug 16, 2022

what is the problem with APN?
Maybe one could build an adapter that receives gotify notifications to GCM and APN for reliablea nd energy efficient notifications on IOS and Android? I don't know if using APN costs any extra money, but for GCM it does not AFAIk

EDIT: Found this alternative which works on ios and android: https://ntfy.sh/ haven't tried it yet though
EDIT2: Works fine on Android, will test iOS later

@mabed-fr
Copy link

mabed-fr commented Sep 9, 2022

ntfy is perfect and self hosted. IOS work verry well.

@heywoodlh
Copy link

Just FYI for those getting thread notifications, I updated my script in my comment to autoreconnect when Gotify goes down and comes back up: #87 (comment)

@Maxiggapp
Copy link

Thank you for this app. That would actually work with the Android devices.
however, we all use iPhones and it would be a great achievement if this app ran on iOS as well.
Therefore I would offer you my Apple developer account and one of my professional industry servers for free use.
My IBM servers are in southwest Germany and are connected to a secure network.
Please let's test this and let me know...
Many greetings from Germany...

@nallej
Copy link

nallej commented Jan 10, 2024

Take a look at the iGotify-Notification-Assistent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:feature New feature or request help wanted Extra attention is needed
Development

No branches or pull requests