this post was submitted on 04 Nov 2023
26 points (88.2% liked)

Avelon App

205 readers
1 users here now

Official community for the native iOS Lemmy app Avelon.

Available on the App Store!

Download Avelon

Wanna be a beta tester and see new features early?

Join the Testflight

Rules

  1. Posts should be related to the Avelon app in some way. Be civil :)
  2. If you have a feature request/bug report, mark the post with [Feature Request] or [Bug]. That way they're easier to find for everyone!
  3. If you're reporting a bug, please include the iOS version, Avelon version, the device you're using, and any steps necessary to reproduce the bug. Screenshots are also very helpful. The more information you include, the quicker the bug can be squashed! Thanks!

founded 1 year ago
MODERATORS
 

Hi everyone,

For the past weeks I've been working hard on a push notification service for Avelon that is finally ready for open beta! This feature involves a completely new cloud service that automatically notifies you whenever someone replies to your posts/comments, and it simultaneously supports multiple accounts you might have. Although the app itself doesn't change much with this new Testflight build, there's a lot of stuff happening in the background to make push notifications happen.

My goal with the open beta is to test the service with many more users to see how it scales under heavier load. I'm not sure how powerful of a server it'll need - and as many of you might know cloud compute isn't exactly cheap. The service isn't quite done yet, so while I keep working on it you should expect downtime and occasionally delayed notifications.

How to join

  • Download the latest 1.0.8 testflight build
  • Open Avelon and go to Settings/Notifications
  • Enable notifications for the accounts you wanna use

When you're testing, I'm especially interested in verifying that you're not getting any duplicate notifications and that you're receiving notifications for all the accounts you've enabled. Also, please share any bugs you might find or thoughts about how to improve things!

Notifications should still work if you go back to the App Store version without deleting the app, but notifications won't open the post and the notification badge will probably not behave properly. This is just a result of the previous version not supporting notifications yet, and will ofc be resolved with the official release!

Technical stuff for those interested

The push notification service is written in Rust, which is a pretty awesome language. This is my first time using it for a complete solution, but I must say I'm already sold on the features the language offers. Ensuring performance and security was a breeze compared to many other languages I've used. For those unaware, Lemmy itself is also written in Rust.

I've prioritized making sure the service scales well with many users, whilst not being heavier than necessary on the Lemmy servers. All traffic from the Avelon service is properly tagged to make it easy for instance owners to verify that the traffic is legit, and not some kind of DOS attack. If the traffic turns out to be a bit heavy for any instance owners, please don't hesitate to contact me to discuss how I can tweak the service to be less demanding on your server.

With the addition of push notifications I'll also update the privacy badge on the App Store to include (opt-in) collection of device identifiers. This is just a practical necessity to know which device to send notifications to. Apple continuously shuffles these random IDs, and they are the only ones who know who each one belongs to. The Avelon service simply sends a notification with the ID to Apple, and they figure out which device to forward it to. And of course, if you disable push notifications in the app all your info is immediately deleted from the notification server.

Thanks for reading & helping me test!

all 26 comments
sorted by: hot top controversial new old
[–] [email protected] 3 points 1 year ago (1 children)

When I opened the app I was asked for Notification Permission, however I still had to go to the page in settings and enable. I’ve seen the same/similar implementations fail at Apple review in the past.

2 ways around this;

  1. Show a wizard pop-up to capture intent from the user before pushing the system prompt (that way Apple can’t argue you’re asking for permissions you aren’t using; and this is their preferred way in the HIG).
  2. Use the response to the permission (APNS token generation) to turn on notifications. (Again, they can’t rogue you’re asking for a permission you aren’t using).

(All that said, having written and been involved in writing and maintaining a PNS in the past (one which handled tens of million PNS a day), this was no small undertaking, well done, thank you, and good luck).

[–] [email protected] 2 points 1 year ago* (last edited 1 year ago) (1 children)

Hey, thanks for the heads up! Its only supposed to ask when you try to turn it on, but guess there's an issue with the logic for when it should ask for permission. I'll definitely get that sorted out before release.

[–] [email protected] 1 points 1 year ago (2 children)

No probs, also, didn’t get the notification of your message, also running 17.3 beta. I’m a Pro user who jumped over to the TF channel, there can be issues with that upgrade path and tokens, but not usually if the token is created on the TF branch and used there. Might be worth looking at your token table to see if you are getting the numbers you expect.

[–] [email protected] 2 points 1 year ago (1 children)

Yeah, I think there's a slight issue with TF tokens atm, but only happens in some situations it seems. Has worked for me for the last week or so, so probably just a minor thing. Looking into it!

[–] [email protected] 1 points 1 year ago (1 children)

Wee update, nots are working for me now. Btw, happy to push you diagnostics anytime you need. Do you have that in the app somewhere (maybe useful at least on the TF branch)? I often found the on device diagnostic files a key to knowing where missing PNs/Tokens went.

[–] [email protected] 0 points 1 year ago (1 children)

Turned out the TF environment and dev environment arent compatible, so just had to switch that for all the notifications to come through! Not diagnostics atm, might be a good idea to add that tho. Some kind of metrics would also be pretty insightful..

[–] [email protected] 1 points 1 year ago

Ah, makes sense.

Metrics are great, it’s always useful to have some dataset to base decisions on when deciding how to spend your time, but Diagnostic files are lifeblood for finding bugs. Just like metrics you do need to go through and put in hooks to write to the diagnostic file, but you can push all you want to it, and it can really help if you’ve done what you do, and make the API responses user friendly when they fail. You might have 15 different failures that trigger your “Failed to load” state, so a user plagued by that, sending the file to you, is great for knowing what actually went wrong.

A bit like Unit Testing, you can survive without them but by investing in them you’ll be doing a later you a favour.

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago)

I guess mine wasn’t turned on as well, I assumed it would turn on when I accepted to turn on push notifications when I open the app.

[–] eatstorming 2 points 1 year ago (1 children)

Not sure if this is the place to report issues, but 1.0.8's Censor NSFW is broken.

[–] [email protected] 2 points 1 year ago (1 children)

Here is fine, thanks! Should be fixed now

[–] eatstorming 1 points 1 year ago

Yep, seems fine now. Thank you!

[–] [email protected] 1 points 1 year ago (1 children)

Test comment to see if push notifications are working properly.

[–] [email protected] 1 points 1 year ago (1 children)
[–] [email protected] 1 points 1 year ago (1 children)

It did not work, could be an issue on my end tho, I am on iOS 17.2 beta, on a iPhone 13 Pro Max.

[–] [email protected] 1 points 1 year ago (1 children)

Seems like I missed some details about how push notifications work in testflight, should be good now if you enable it and allow in system settings. Did you get this notification? If you didn't, you might have to toggle it off and on again in the app!

[–] [email protected] 1 points 1 year ago

Yes I got this notification, awesome work.

[–] [email protected] 1 points 1 year ago
[–] LazaroFilm 1 points 1 year ago* (last edited 1 year ago) (1 children)

No pro option in the beta 😟 so I have to chose between enjoying groups or testing the beta 😟

[–] [email protected] 2 points 1 year ago

Would like to help. But not going to loose features of that's the case.

[–] LazaroFilm 1 points 1 year ago (1 children)

So weird thing is happening. I tried the beta flight version to try the push notifications but then went back to the AppStore version for the pro options. Now I get notifications on the AppStore version but they don’t disappear when read so I have a permanent red badge on the app.

[–] [email protected] 2 points 1 year ago

Hi, yeah this is expected unfortunately. Basically since the App Store version doesn't support notifications it doesn't know to lower the badge count when you open a reply, but the badge is still increased by iOS when it receives a notification. Best solution atm is disabling the badge in settings until the update is out!

[–] [email protected] 1 points 1 year ago (1 children)
[–] [email protected] 1 points 1 year ago (1 children)
[–] [email protected] 1 points 1 year ago* (last edited 1 year ago)

Hmm no notification. Not yet anyway.

iOS 17.1 on an iPhone 12

[–] [email protected] -2 points 1 year ago

How much of your revenue from the last release do you plan on donating to help fund the instance that hosts your community?