Giter VIP home page Giter VIP logo

Comments (74)

Copephobia avatar Copephobia commented on May 19, 2024 60

I am working on the iOS app for ntfy, in case github cannot assign the issue to me.

from ntfy.

binwiederhier avatar binwiederhier commented on May 19, 2024 9

Lots of progress: https://www.icloud.com/photos/#044Nwj6y2ALrcfToCc64hVKJA
I'd say i am about a week away from the initial release.

from ntfy.

binwiederhier avatar binwiederhier commented on May 19, 2024 8

Let's do this!

IMG_20220505_225513

from ntfy.

binwiederhier avatar binwiederhier commented on May 19, 2024 8

πŸ₯³ πŸ“’ Request for ntfy iOS beta testing

Please test via TestFlight and give me feedback here or via TestFlight itself. Thank you!

How to test

Open this on your iPhone/iPad: πŸ‘‰ https://testflight.apple.com/join/P1fFnAm9 πŸ‘ˆ

Test instructions

This is the first version of the ntfy iOS app. It supports only ntfy.sh (no selfhosted servers) and only messages + title (no priority, tags, attachments, ...).

Please test:

  • You can receive messages to subscribed topics, when the app is in the foreground AND in the background
  • When you receive messages, the UI is updated correctly (if it's not, hard-kill the app and see if it updates then; and let me know if it doesn't)
  • After unsubscribing, you should not receive messages on that topic anymore.

Feedback via TestFlight or GitHub. Please give POSITIVE and NEGATIVE feedback, so I can see if it generally works...

Feedback so far (as of May, 24, 7pm EST)

  • 93 invites, 87 installs πŸ₯³
  • πŸ‘Ž πŸ‘ Firebase not working works now after reinstall (TestFlight: iPhone 12 / iOS 15.4.1, & via #4 (comment), --> ticket #266)
  • πŸ‘Ž UI not always updating properly (TestFlight: iPhone SE (2nd gen), iOS 15.4.1, --> ticket: #267)
  • πŸ‘ "Notification on iOS works in background" (TestFlight: iPhone 11 Pro Max, iOS 15.4.1, & via Matrix/simono41)
  • πŸ‘ "It works" (Discord/gm1k)
  • πŸ‘ "Working really well so far πŸ’ͺ" (https://www.reddit.com/r/selfhosted/comments/uva40f/comment/i9k2a69/)
  • πŸ‘ "Works for me on both iPad and iPhone" (#4 (comment))
  • πŸ‘ "[..] working perfectly. No problems ... [...]" (TestFlight, iPhone XS / iOS 15.5)
  • πŸ‘ "seems to be working" (Aminda S / Matrix, iOS 15.4.1 (19E258) on iPhone SE2020 (A2296))
  • πŸ‘ "I'd say it basically works quite good already." (iPad Mini 4, 15.4.1, via #4 (comment))
  • πŸ‘ "Seems like everything works as it should!" (#4 (comment))
  • πŸ‘ " Job well done! Works nicely. The possibilities are endless…… " (TestFlight, iPhone 13, iOS 15.4.1)
  • πŸ‘ "The app works correctly .." (TestFlight, iPhone SE 2nd gen, iOS 15.6)
  • πŸ‘ "notifications are not dismissed automatically" (TestFlight, iPhone SE 1st gen, iOS 15.5)
  • πŸ‘ " Works like charm and I'm already waiting for more features to come." (#4 (comment))

Verdict (preliminary)

I'd like to thank everyone for the feedback. It helped a lot to assess the state of the app. I have decided to submit the app for review as-is by tomorrow night (Tuesday, May 24). I know there are lots of issues, but I'd rather the Apple community have something than nothing.

Issues I am aware of:

  • The UI does not always update properly (#267, ❗❗), fixed in binwiederhier/ntfy-ios@9060af5 (I think)
  • When clicked, the notification does not open the topic, but instead just shows the last view (fixed in binwiederhier/ntfy-ios@30dd10b)
  • The notification does not make a sound or vibrate on the Apple Watch (fixed in binwiederhier/ntfy-ios@cace472)
  • When opening a topic, the notifications in the Apple notification center should be dismissed automatically
  • Errors are not shown to the user, but instead just logged

Feature requests:

from ntfy.

binwiederhier avatar binwiederhier commented on May 19, 2024 7

Hey @Copephobia, can you give an update of how it's going? Need any help?

from ntfy.

binwiederhier avatar binwiederhier commented on May 19, 2024 7

Here's what I got so far. This is 99% @Copephobia's work. All I did was remove stuff in an attempt to ship something soon. Firebase does not work in the simulator (or so I've heard), so I have to acquire an iPhone to test the entire flow.

It also looks not very great IMHO, though the iPhone apps apparently look like this.

Screen.Recording.2022-05-07.at.2.24.02.PM.mov

from ntfy.

binwiederhier avatar binwiederhier commented on May 19, 2024 6

My company has loaned me an old 2017 Macbook. After the next Android and server release, I am going to give the iOS app a go.

from ntfy.

binwiederhier avatar binwiederhier commented on May 19, 2024 6

Good progress again with iOS today. I don't really understand why I had to make the hacks that I did, but it works (on my device). I'm going to polish a lot the next few days, and then I should be able to release soon.

The initial release will only support ntfy.sh (no selfhosted) and only plain messages with/without title. No tags, attachments, click URLs, ...

from ntfy.

binwiederhier avatar binwiederhier commented on May 19, 2024 6

πŸ₯³ It's happening

https://apps.apple.com/us/app/ntfy/id1625396347

--
Note that in a day or two I'll release the update with all the things mentioned here #4 (comment)

from ntfy.

binwiederhier avatar binwiederhier commented on May 19, 2024 6

Here's a short video showing my progress on the selfhosted server support: https://photos.app.goo.gl/weSQxdbL8kkt11nS8

Here's what's happening:

  • Top screen: User sends a message to "middle screen" (= selfhosted server)
  • Middle screen: Selfhosted server is configured to send a message to topicHash=sha256($topic) containing the message ID of the original message (poll_id=$messageID) to an upstream server (= ntfy.sh). This is equivalent to curl -X POST -H "Poll: $messageID" ntfy.sh/$topicHash).
  • Bottom screen: Upstream server (ntfy.sh) receives the poll request and forwards it to Firebase topic $topicHash (which forwards it to APNS). The poll request contains only the original message ID; none of the other fields of the original message. It looks like this: {"id":"Xi6uHAal8f7i","time":1653619618,"event":"poll_request","topic":"mylongtopichash","message":"New message","poll_id":"123"}
  • Phone: receives the poll request from APNS, containing $messageID, and asks the selfhosted server for the original message (equivalent to curl "localhost:2587/test/json?poll=1&id=Ab9dXUgm83cp)
  • Phone displays message.

--> Firebase/APNS are used as signalling mechanism, and the actual message is fetched by the phone.

image

from ntfy.

binwiederhier avatar binwiederhier commented on May 19, 2024 4

For transparency, here's the contents of the Discord #ios channel. That room is now bridged to Matrix as well: https://matrix.to/#/#ntfy-ios:matrix.org

220207 14-50-09 Selection 001

220207 14-50-20 Selection 001

220207 14-50-31 Selection 001

220207 14-50-42 Selection 001

220207 14-50-53 Selection 001

from ntfy.

prabirshrestha avatar prabirshrestha commented on May 19, 2024 4

Works for me on both iPad and iPhone whether an app is running or not or is in background or foreground.

I already have bunch of feature requests. Let me know if there is a better place for this.

  • Simple dialog to send a message.
  • First class shortcuts integration. Will easily allow Siri integration.
  • copy the topic to clipboard so I can share with others or my own new device. Can be improved later by using iOS share sheet.

Looking forward to the selfhosted support.

from ntfy.

binwiederhier avatar binwiederhier commented on May 19, 2024 4

Rejected... For mentioning Android... I suppose that's an easy enough fix.

"We found the metadata of your submitted in-app purchases includes irrelevant third-party platform information. Specifically, Android references is mentioned in the description.

Referencing third-party platforms in your app or its metadata is not permitted on the App Store."


Edit: This was my mistake. The description was just copied from the Android app and mentioned that this is the Android app not the iOS app. Oops. Well let's try it again.

from ntfy.

binwiederhier avatar binwiederhier commented on May 19, 2024 3

I think the iOS app is ready for testing, once I manage to upload it. I gotta do a tiny server release before though. Will do that tomorrow.

from ntfy.

skr32 avatar skr32 commented on May 19, 2024 3

Here me feedback:

  • Subscribe to different Topics
  • Receive Notification on those topics. Push notification works on unlocked and locked screen and while app is in background or closed
  • Unsubscribing works. No notification for removed topics.
  • Content: Title & Messages work for me

Seems like everything works as it should!

Thank you for the App!! Cant wait for Content & Tags to work ;)

from ntfy.

spantaleev avatar spantaleev commented on May 19, 2024 2

Not sure how element-ios does it, but from what I know, notifications there are just a wakup call. After being woken up, the application then retrieves the new message from a self-hosted homeserver, decrypts it (if End-to-End-Encrypted) and renders the notification text by itself.

from ntfy.

binwiederhier avatar binwiederhier commented on May 19, 2024 2

I am essentially at a stand-still with this. I cannot get the Notification Service Extension to work. I've Googled and tried many many things, but all the solutions do not work. I've tried creating a new project, I've followed tutorials, none of it works. The code that is supposed to modify the notification is just not called.

I'll keep trying, but this is supremely frustrating.

from ntfy.

binwiederhier avatar binwiederhier commented on May 19, 2024 2

TLDR: πŸ₯³

I've started a new project in Xcode and watched tons of tutorials and read tons of documentation pages and I figured out the above problem.

I think I've truly turned a corner. It's turned from "what the heck" to "okay, I think I can do this in a couple of days". The hard pieces are clear to me now: Message delivery with Firebase, Views/layouting and persistence with live-updating views. I'm going to be deviating from @Copephobia's app a little in that I'll be using CoreData on top of SQLite for persistence, since that makes live-updating views super easy.

As for self-hosted servers, I believe ultimately, these two options should be possible (with option 1 being significantly easier I think):

  1. ntfy.sh/firebase: selfhosted server ---(poll_request)---> ntfy.sh -> firebase -> apns -> ntfy iphone app --(poll)--> selfhosted server)
  2. encryption: selfhosted server ---(encrypted notification)--->ntfy.sh-->firebase-->apns-->iphone app (decrypts)

I will be releasing a bare-bones "ntfy.sh-only" version of the app first though (no selfhosting, no attachments, ...), and then hopefully iterate quickly.

--

I have started from a completely fresh Xcode project, and I am pulling in whatever I need from the code in Cope's repo. You can follow my progress here: https://github.com/binwiederhier/ntfy-ios/tree/restart. Right now it doesn't look like much, but as I said, I believe I've figured out the hardest pieces.

from ntfy.

fosspill avatar fosspill commented on May 19, 2024 2

Thank you for your hard work!

My test results:

  • No messages are received in foreground and background. If I manually refresh (pulling down inside the app) I do receive the messages, however.
  • UI seems to respond correctly when I refresh to see the notifications
  • After unsubscribing I no longer get anything when I refresh (by pulling down, again)

from ntfy.

Famku avatar Famku commented on May 19, 2024 2

Hi.

I just tested NTFY App 1.1 and it works very good with self hosted ntfy.

Thank you for your hard work!

from ntfy.

robfox92 avatar robfox92 commented on May 19, 2024 2

Works well - the only thing that tripped me up was the need to specify the server is using https in the app. I'd initially specified "ntfy.<my_selfhosted_instance>.xyz" instead of "https://ntfy.<my_selfhosted_instance>.xyz".

Maybe it's worth prepending the server address with https:// automatically?

from ntfy.

binwiederhier avatar binwiederhier commented on May 19, 2024 2

Awesome to hear that it's working. Thanks for the feedback. Keep them coming

Maybe it's worth prepending the server address with https:// automatically?

πŸ‘ The Android app has validation and a placeholder for this. I'll add something like that.

from ntfy.

binwiederhier avatar binwiederhier commented on May 19, 2024 1

πŸ“’ Update: Sadly work has been stale for over a month now, and I'm not sure when/if it'll be picked up again. If anyone else is interested in continuing the work, please feel free to do so. Maybe I'll buy a Mac at some point.

from ntfy.

binwiederhier avatar binwiederhier commented on May 19, 2024 1

Thank you for looking at the code! I am actually beginning to see if I can borrow and get a Mac from somewhere so I can learn Swift and all that myself. But I'm always happy to have someone else look or take over. I bet that'd be much quicker than me learning how to use a Mac, iOS, and Swift :-D

So @Copephobia and I actually found a solution already for this problem. We talked about a poll_request message over FCM, which basically just instructs the phone to poll from a selfhosted server. There are some notes about this in the (now closed) pull request (#152). I'll look at the relay/proxy you linked though. Maybe they had a better idea :-D

from ntfy.

binwiederhier avatar binwiederhier commented on May 19, 2024 1

Wow, this looks great!

Does it really "look great"? I am legit lost as to the UI design in iOS. I haven't really looked too closely, but to me iOS apps (from Googling screenshots) look uuuuuggggllly. That's part of the reason why I want a real iPhone, so I can see what popular apps look like.

from ntfy.

Seji64 avatar Seji64 commented on May 19, 2024 1

Screenshots and/or videos of messaging apps like WhatsApp or whatever else iOS people use would be helpful indeed.

here we go...

Signal

Singal01

WhatsApp

WhatsApp

Mastadon

IMG_8ED1E2C4E17B-1

from ntfy.

prabirshrestha avatar prabirshrestha commented on May 19, 2024 1

This is a good read from on how simplex chat iOS notifications work. https://github.com/simplex-chat/simplex-chat/blob/stable/blog/20220404-simplex-chat-instant-notifications.md

from ntfy.

fosspill avatar fosspill commented on May 19, 2024 1

@binwiederhier

  1. I'm unsure about exactly when I enabled notifications, but notifications were indeed enabled for ntfy during my testing. I confirmed this through settings multiple times
  2. Re-installing worked, but I reinstalled on a different network in case something firebase-related was blocked during installation.
    After reinstalling it also works fine on the network I originally installed the app on.

So... I'm not entirely sure about what happened here but the issue is resolved 🀷

from ntfy.

binwiederhier avatar binwiederhier commented on May 19, 2024 1

I'd like to thank everyone for the feedback. Keep it coming!! It helped a lot to assess the state of the app. I have decided to submit the app for review as-is by tomorrow night (Tuesday, May 24). I know there are lots of issues, but I'd rather the Apple community have something than nothing.

Issues I am aware of:

  • The UI does not always update properly (#267, ❗❗), fixed in binwiederhier/ntfy-ios@9060af5 (I think)
  • When clicked, the notification does not open the topic, but instead just shows the last view (fixed in binwiederhier/ntfy-ios@30dd10b)
  • The notification does not make a sound or vibrate on the Apple Watch (fixed in binwiederhier/ntfy-ios@cace472)
  • When opening a topic, the notifications in the Apple notification center should be dismissed automatically
  • Errors are not shown to the user, but instead just logged

Feature requests:


πŸ‘‰ I am still updating #4 (comment) with more feedback as it comes in.

from ntfy.

skrollme avatar skrollme commented on May 19, 2024 1

I'm new to ntfy because I was looking for an (possibly self-hosted) alternative to ifttt.com push messages. As I saw the development/progress of the iOS I subscribed to this topic and tried the TestFlight build as it came out:
πŸ‘ Works like charm and I'm already waiting for more features to come.
In the meantime I will switch my toolchains to use ntfy

P.S.: Any official channels to donate / support the project? Paypal? Github sponsor?

from ntfy.

SxthGear avatar SxthGear commented on May 19, 2024 1

A little late to the party as it looks like you're pushing live today sometime, but I just happened to see this posted on /r/selfhosted and have been waiting for iOS support for some time now. Prelim run through of different things on an iPhone 13 Pro, iOS 15.4.1:

πŸ‘ Works perfectly, even with some odd ASCII characters and emoji thrown at it. Can't wait to run a selfhosted version!

from ntfy.

binwiederhier avatar binwiederhier commented on May 19, 2024 1

πŸ“’ πŸ₯³ Request for testing

This release of the iOS app adds message priorities (mapped to iOS interruption levels), tags and emojis, action buttons to open websites or perform HTTP requests (in the notification and the detail view), a custom click action when the notification is tapped, and various other fixes.

It also adds support for self-hosted servers (albeit not supporting auth yet). The selfhosted server needs to be configured to forward poll requests to upstream ntfy.sh for push notifications to work (see https://ntfy.sh/docs/config/#ios-instant-notifications for details).

PLEASE TEST all of the above features. Report issues ON GITHUB or IN TESTFLIGHT.

How to test

➑️ https://testflight.apple.com/join/P1fFnAm9 ⬅️

Notes

After this release, I will close this issue and I'll be moving towards a business as usual method for iOS releases. I'll still try to catch up with most Android features, but I won't be asking for TestFlight here. Instead, I'll ask in Discord/Matrix, and/or in https://ntfy.sh/announcements.

I added a bunch of tickets for future iOS work ( ios ntfy iOS app ), please πŸ‘ the one you'd like the most, so I know what to prioritize. Otherwise I'll just do them in whatever order I think makes sense or is the most fun.

from ntfy.

mikniche avatar mikniche commented on May 19, 2024 1

I've got it working nicely with my self hosted instance of ntfy, after following the instructions and adding the upstream url πŸ™Œ

Almost instant push notifications 🎯

from ntfy.

prabirshrestha avatar prabirshrestha commented on May 19, 2024 1

Tried the selfhosted server and it works great.

iOS Bug:

  • Double line to single line for long topics seems to be fixed but now the font sizes changes.

Web Bug:

  • If WebSockets is not enabled on the proxy server or fails to connect, it doesn't any error message. I had to open the console and see that there was a websocket error and had to enable WebSocket on the proxy server that comes with synology nas.

iOS feature requests:

  • My domain is not small as notify.sh. Remember my last used settings for "Use another server" and the "Server URL" or even better if the "Server URL" is a list of predefined servers where user can add or remove.

ntfy feature requests:

  • add support for LDAP auth so it plays nicely with rest of the self hosted ecosystem. You can try it with gldap server. I would like to avoid mantaining yet another user/password combination. This is easier for family members that are non-tech.
  • add support for tokens. I would like to use different token with custom expiration.
  • add support for making a topic as listed or unlisted similar to youtube https://support.google.com/youtube/answer/3127309?hl=en. This will allow a family member to register a server and then easily discover listed topics.

docs request:

  • What happens if upstream-base-url is set but fails to send to the upstream server. This could be due to temporary internet connection getting down. Will this be retried or will be lost.
  • This is a bit confusing.

The ntfy.sh server publishes the message to Firebase, which forwards it to APNS, which forwards it to your iOS device
Your iOS device receives the poll request, and fetches the actual message from your server, and then displays it

The ntfy.sh server publishes the message to Firebase. What is a message here? Is it just the poll id and topic hash?

from ntfy.

binwiederhier avatar binwiederhier commented on May 19, 2024 1

Closing this ticket πŸ₯³

With the release of the iOS v1.1 app πŸ₯³, I am ceremonially closing this ticket. πŸ₯³ πŸ₯³ πŸ₯³

You may of course continue to leave feedback here, or create tickets in the main GitHub.

Discord/Matrix + ntfy.sh/announcements

I also encourage you to join Discord or Matrix, and subscribe to the https://ntfy.sh/announcements topic. I'll potentially be asking for TestFlight testers there.

from ntfy.

gedw99 avatar gedw99 commented on May 19, 2024

Hey you can build cross platform golang apps using gio

It has notifications plugin here:
https://github.com/gioui/gio-x/tree/main/notify

i use it . It is easy no works . Not web notification yet but quite easy with gio - just look at other plugins to see how .

gio is all golang and compiles for web , all desktops, all mobiles.

just wanted to highlight this as an option .

If you search for β€œgioui” you will find many apps built with it .

I use it . It’s really high quality

from ntfy.

binwiederhier avatar binwiederhier commented on May 19, 2024

Sadly I haven't heard from @Copephobia in weeks, so I don't think it'll happen :-(

I'm gonna go looking for an iOS dev.

from ntfy.

gedw99 avatar gedw99 commented on May 19, 2024

I read on the Unified Push web site that the IOS app needs to support Background worker , but i don’t think it’s possible . AppNap on iOS puts applications into sleep mode .

gio android does support foreground and background btw .

gio iOS only supports foreground and so the IOS AppNap never occurs.

from ntfy.

binwiederhier avatar binwiederhier commented on May 19, 2024

For the iOS app I'd love at least basic messages with firebase for ntfy.sh. i think that should be possible hopefully. Whether or not and to what extent other features are supported we'll have to see. But for now I can't even find anyone to do the iOS basic app.

from ntfy.

gedw99 avatar gedw99 commented on May 19, 2024

well you could do it with golang, but GIo does not have a IOS driver yet. It does have a driver for web, desktop ( win, mac, linux ) and mobile (android). I think that it could be done in a few days.

https://github.com/gioui/gio-x/tree/main/notify

Looking for devs using it: https://github.com/search?o=desc&p=2&q=gioui.org%2Fx%2Fnotify&s=indexed&type=Code

found one decent example: https://github.com/arborchat/sprig/blob/main/core/notification-service.go

from ntfy.

Copephobia avatar Copephobia commented on May 19, 2024

Current work towards iOS, feel free to follow along: https://github.com/Copephobia/ntfy-ios

(Relevant macOS development branch: https://github.com/Copephobia/ntfy/tree/macos-development)

from ntfy.

easrng avatar easrng commented on May 19, 2024

Here's an iOS Shortcut that checks for new ntfy notifications and shows them. Unfortunately you can't have a Shortcut run on a fixed interval, only on manually added times (ex. you can set a Shortcut to run every day at 2pm, but not every 5 minutes) so if you want it to check automatically you're going to be adding a LOT of automations. It supports titles, messages, and turns off sound for low-priority notifications.

from ntfy.

lylebrown avatar lylebrown commented on May 19, 2024

Here's an iOS Shortcut that checks for new ntfy notifications and shows them. Unfortunately you can't have a Shortcut run on a fixed interval, only on manually added times (ex. you can set a Shortcut to run every day at 2pm, but not every 5 minutes) so if you want it to check automatically you're going to be adding a LOT of automations. It supports titles, messages, and turns off sound for low-priority notifications.

I would love to be proven incorrect, but doesn't iOS require the device to be unlocked (as in, the screen turned on and not on the lock screen) for shortcuts to run?

from ntfy.

g-a-c avatar g-a-c commented on May 19, 2024

Here's an iOS Shortcut that checks for new ntfy notifications and shows them. Unfortunately you can't have a Shortcut run on a fixed interval, only on manually added times (ex. you can set a Shortcut to run every day at 2pm, but not every 5 minutes) so if you want it to check automatically you're going to be adding a LOT of automations. It supports titles, messages, and turns off sound for low-priority notifications.

I would love to be proven incorrect, but doesn't iOS require the device to be unlocked (as in, the screen turned on and not on the lock screen) for shortcuts to run?

I don't think this is true - I have a Shortcut that opens Spotify when my phone connects to my in-car entertainment via Bluetooth, and this will usually fire with my phone in my pocket. I say "usually" because sometimes Spotify doesn't actually open, but even when Spotify isn't opened I still get the notification that the Shortcut was executed.

from ntfy.

Seji64 avatar Seji64 commented on May 19, 2024

Hello,
happened to come across this issue as I would like to use ntfy on iOS.

So I took a look at the iOS code (https://github.com/Copephobia/ntfy-ios). As I see it, the app is practically ready. I think the problem why the development was stopped is that Copephobia probably didn't find a good solution for the notifications. I thought about the problem and wondered how Mastadon solved it.

Because here each instance is self-hosted and yet the notification works via a central official app. I came across the various proxy's / relay's (such as https://github.com/DagAgren/toot-relay). I think this could solve the whole thing quite elegantl. Sorry if I now come here with an 'idea' that was already known to all of you - did not want to be the wise guy - just give a hint or help.

A good explanation how this all works i found here

is ntfy already capable to send such notification to a push relay?

from ntfy.

Seji64 avatar Seji64 commented on May 19, 2024

I have a mac - so if i can help out - let me know. The problem is that I also have to learn swift ... :-/

from ntfy.

binwiederhier avatar binwiederhier commented on May 19, 2024

@Seji64 If you wanna give it a shot I'm not gonna say no. :-D But I also don't blame you if you didn't want to. It's a lot of work.

from ntfy.

Seji64 avatar Seji64 commented on May 19, 2024

Wow, this looks great! Any kind of relay for push notifications are not yet implemented ?

from ntfy.

binwiederhier avatar binwiederhier commented on May 19, 2024

It needs a physical iOS device and i don't have one yet. I'm asking all the people if they have old/spare iPhone devices so I can test. I'll likely just buy an iPhone 11 though. It's "only" $500...

from ntfy.

fosspill avatar fosspill commented on May 19, 2024

Wow, this looks great!

Does it really "look great"? I am legit lost as to the UI design in iOS. I haven't really looked too closely, but to me iOS apps (from Googling screenshots) look uuuuuggggllly. That's part of the reason why I want a real iPhone, so I can see what popular apps look like.

Honestly looks pretty good to me too!
If there is anything I could record or screenshot for you to see, let me know

from ntfy.

binwiederhier avatar binwiederhier commented on May 19, 2024

Screenshots and/or videos of messaging apps like WhatsApp or whatever else iOS people use would be helpful indeed.

from ntfy.

binwiederhier avatar binwiederhier commented on May 19, 2024

I'm getting my loaner iPhone today, so I should be able to make some progress from now on.

(Cross post since y'all are Apple fans: This ticket (#112 (comment)) has a macOS build of the ntfy binary (client only, no server), in case people want to try that out.)

from ntfy.

binwiederhier avatar binwiederhier commented on May 19, 2024

I've been poking around and trying out the Apple notification system, and it seems severely limited, compared to Android. Even Android seemed limited at the time, but iOS is almost unusable.

  • It seems impossible to run code when you receive a notification
  • APNS/Apple handles displaying the notification and only when the user interacts with it, hooks can be run
  • I think I can make this work for ntfy.sh, but it is entirely questionable if a selfhosted instance can be made compatible with this.
  • My original idea to implement a poll_request that we forward via ntfy.sh/firebase (selfhosted server ---(poll_request)---> ntfy.sh -> firebase -> apns -> ntfy iphone app --(poll)--> selfhosted server) seems impossible now
  • Simply encrypting the message and using ntfy.sh/firebase/apns is also impossible, because we cannot run code to decrypt.

I may be overlooking something, because I have not fully grasped the notification extension that @Copephobia implemented (https://developer.apple.com/documentation/usernotifications/unnotificationserviceextension). I do not see any evidence that it runs, and it does look promising. This flow may be doable if this works: selfhosted server ---(encrypted notification)--->ntfy.sh-->firebase-->apns-->iphone app (decrypts)

Still at the beginning of this. My guess is that it will take multiple weeks for me to fully grasp this and be able to publish in the app store. Unless someone with experience comes along.

Cheerio.

from ntfy.

binwiederhier avatar binwiederhier commented on May 19, 2024

Thank you for the links. I read the one about simplexchat, and it sounds like I've understood the Apple APIs correctly.

Tldr: There are no way to deliver instantly without APNS, meaning a central server. Periodic checks apparently stop working after a while all together, so that's cool..

I think I'm on the right track with the notification service extension. I'll check out the element code too.

Edit: from what k can tell after reading the code for 2 minutes, they are doing the same thing. It's a notification extension (https://github.com/vector-im/element-ios/blob/develop/RiotNSE/NotificationService.swift), and most of the fields are passed unencrypted. It's a fantastic iOS code reference. It's going to help me a lot going forward, seeing that I'm learning Swift and iOS development. Thank you!

from ntfy.

prabirshrestha avatar prabirshrestha commented on May 19, 2024

A good compromise could be to add additional privacy option similar to priority and tags. If I don’t care about privacy I can change it so it doesn’t need to be encrypted. This would allow me to send messages such as:

  • β€œA new event occurred on you NAS.”
  • β€œnew update available in your router.”
  • β€œUser logged in via ssh”.

I could then send another follow up message with more details that is private if needed.

Messages could be private by default to enable backwards compatibility.

from ntfy.

binwiederhier avatar binwiederhier commented on May 19, 2024

https://photos.app.goo.gl/7Uu2yEPfRVC7Du4z6

from ntfy.

binwiederhier avatar binwiederhier commented on May 19, 2024

Now I'm waiting for Apple. 🍎 I believe that if you are interested, I can invite you as an internal tester already. Message me on Discord or Matrix.

image

from ntfy.

binwiederhier avatar binwiederhier commented on May 19, 2024

Well that's a bummer. That means Firebase is not working, or the app extension is not working. I don't quite know how to debug things, because the logs are not written to a file... What device is this?

from ntfy.

fosspill avatar fosspill commented on May 19, 2024

iPhone 12. I submitted feedback through testflight too, which I think should contain logs and such?

from ntfy.

binwiederhier avatar binwiederhier commented on May 19, 2024

Please keep posting your feedback here. I will update the comment above (#4 (comment)) with a summary of feedback I have received so far.

from ntfy.

prabirshrestha avatar prabirshrestha commented on May 19, 2024

Clicking notification should take to the notification details page. When I had multiple notifications or wanted to copy the content I needed to find it.

Here is an example from pushover. If you enable sharesheet you don’t need to implement separate copy to clipboard button.

ED6A0843-0CF7-45C6-9A1D-387F7BE4E33D

β€œHey Siri, notify” works. It is simple as adding 2 actions in Siri Shortcuts.

60385464-7F38-424E-A5BC-49120A13E3ED

from ntfy.

cmeis avatar cmeis commented on May 19, 2024

Tested on an iPad Mini 4 with OS version 15.4.1.

I'd say it basically works quite good already.

What works:

  • notifications are received correctly with app in foreground
  • notifications are received correctly with app in background
  • hard killing the app doesn't do any harm too, notifications still are coming in
  • notification sent while iPad was offline (WiFi disabled on a WiFi only model) are received as soon as WiFi is connected again

What didn't work 100%:

  • a notification sent while the iPad was powered off was on one occasion only received after opening the app, i.e. not after powering on and unlocking the device (I did wait for about a minute before manually opening the app)

What didn't work:

  • clicking on a notification bubble does only take you to the app "where is was" (even in a different topic), not to the correct topic. This works on Android.

from ntfy.

binwiederhier avatar binwiederhier commented on May 19, 2024

Thank you @cmeis for the detailed feedback. I'm gonna all this a win overall.

a notification sent while the iPad was powered off was on one occasion only received after opening the app, i.e. not after powering on and unlocking the device (I did wait for about a minute before manually opening the app)

That's a Firebase thing. Nothing I can do about I think. Firebase is icky on Android too sometimes. Thank you for reporting it.

clicking on a notification bubble does only take you to the app "where is was" (even in a different topic), not to the correct topic. This works on Android.

That's not implemented yet, so it's expected :-)


No messages are received in foreground and background. If I manually refresh (pulling down inside the app) I do receive the messages, however.

@fosspill You have been so far the only person who mentioned that no messages were received at all.

  1. May I ask you if you clicked "Allow notifications" in the dialog that pops up when the app launches for the first time?
  2. Also, do you mind re-installing and seeing if that does anything.
  3. Is this a JB device, or otherwise modified? The app does need Firebase/Google to deliver messages.

from ntfy.

binwiederhier avatar binwiederhier commented on May 19, 2024

@fosspill Thank you for retesting. That makes me feel much better. You were the first feedback and it was "nothing works", that was quite the bummer. Glad it works now. Maybe I can somehow get an indication in the UI to show if Firebase works or not.

from ntfy.

fosspill avatar fosspill commented on May 19, 2024

@binwiederhier Hah, I can imagine that. It did feel pretty bad to leave that feedback right away as well, but I'm super happy that it works now. I'll finally be able to use ntfy in my workflow and that's all thanks to your hard work.
Some firebase indication would have been interesting, and I would have liked to figure out what went wrong. But, if a reinstall is all that's needed then it's not really a big issue. Maybe we can blame cosmic rays for now.

from ntfy.

binwiederhier avatar binwiederhier commented on May 19, 2024

Dont feel bad. This is exactly the feedback that I need. Only a handful from the people who try it leave any feedback. So this is good stuff. It's a really really rough version, but I want to release quickly and then iterate towards features and stability.

from ntfy.

binwiederhier avatar binwiederhier commented on May 19, 2024

Thank you for your feedback!

from ntfy.

binwiederhier avatar binwiederhier commented on May 19, 2024

Love hearing that. Thanks folks. πŸ‘

from ntfy.

binwiederhier avatar binwiederhier commented on May 19, 2024

I'm going to keep this ticket open for a while to communicate updates on iOS, but eventually I'll close it. To stay in the iOS loop, I highly recommend joining the Discord or Matrix (links on main GIthub page).

Updates:

  • Aside from attachments, I've implemented pretty much all "publish" features (priority, tags/emojis, click target, user action buttons). There is no configuration/muting/... and such as there is in Android yet, obviously.
  • As for selfhosted servers, I have not started that work yet officially, BUUTT, I think I may be able to do a "selfhosted light" variant pretty quickly: Basically poll all topics every 20-60min or so (Apple is vague on this, it's also not guaranteed to run at all) by remotely triggering silent "poll now" Firebase messages. The messages are empty, they just serve as triggers to poll all topics. I've got this implemented in https://github.com/binwiederhier/ntfy-ios/pull/5/files and it works nicely. I think I can get that into the next release too, though likely without support for auth.

Here are a bunch of pictures: https://photos.app.goo.gl/KeERoCa25WqnfpuC8

from ntfy.

prabirshrestha avatar prabirshrestha commented on May 19, 2024

You might be able to use location service feature of iOS to have frequent polling. At least that is what Dropbox and other products do. https://help.dropbox.com/installs-integrations/mobile/location-data

Other option I could see is adding shortcut to force poll so I can run it when it charges or connects to Wi-Fi and so on. Shortcuts does have show notification action.

Some more additional options here. https://stackoverflow.com/questions/35388086/is-there-a-way-to-wakeup-suspended-app-in-ios-without-user-or-server-interventio

found a bug:
If your topic is long it seems to flicker as it adjusts the size in header.

from ntfy.

binwiederhier avatar binwiederhier commented on May 19, 2024

Whoa. I didn't even know it was live yet. Apple hasn't sent me an email yet that it's live. I would've posted instructions here too. I'll do that later. Right now I'm in IKEA bed building mode.

from ntfy.

binwiederhier avatar binwiederhier commented on May 19, 2024

Any positive/negative feedback on the new iOS version?

from ntfy.

binwiederhier avatar binwiederhier commented on May 19, 2024

Thank you for the detailed feedback. I love it ❀️ Would you mind reporting bugs and feature requests in individual tickets? It's impossible for me to keep track of things if they are in comments. Thanks.

I'll respond to your comments in detail tomorrow.

from ntfy.

prabirshrestha avatar prabirshrestha commented on May 19, 2024

Created separate feature requests. Hope it is not a lot πŸ˜ƒ .

Here are the top ones for me to replace pushover with ntfy. I probably only need 1 and 2 to start testing E2E in my real home servers.

  1. #277
  2. Clarify docs.
  3. Add tokens support
  4. LDAP auth

(By the way thanks for the awesome progress in the past few days. Really excited to see ntfy working on iOS.)

from ntfy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.