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

[$500] There are notification of unread message on fresh install of the app #38715

Closed
1 of 6 tasks
m-natarajan opened this issue Mar 20, 2024 · 43 comments
Closed
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@m-natarajan
Copy link

m-natarajan commented Mar 20, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 1.4.55-0
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @kadiealexander
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1710921050509239

Action Performed:

  1. Fresh install the app from Testflight
  2. Observe the app icon

Expected Result:

There shouldn't be notification for unread message

Actual Result:

There is a unread message notification

Workaround:

unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

RPReplay_Final1710972389.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01a7449e9320304743
  • Upwork Job ID: 1772385027376979968
  • Last Price Increase: 2024-03-25
  • Automatic offers:
    • jayeshmangwani | Reviewer | 0
    • ShridharGoel | Contributor | 0
@m-natarajan m-natarajan added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Mar 20, 2024
Copy link

melvin-bot bot commented Mar 20, 2024

Triggered auto assignment to @MitchExpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@MitchExpensify
Copy link
Contributor

I don't think we should worry about Testflight install related bugs

@m-natarajan
Copy link
Author

@MitchExpensify I tested in staging, but happens in app store build https://expensify.slack.com/archives/C049HHMV9SM/p1710921050509239

RPReplay_Final1710920900.MP4

@MitchExpensify
Copy link
Contributor

Reopening to take a second look at this

@kadiealexander
Copy link
Contributor

Just for context I didn't experience this when using TestFlight, this happened from the actual App Store on my physical iPhone.

@MitchExpensify MitchExpensify added the Help Wanted Apply this label when an issue is open to proposals by contributors label Mar 25, 2024
@melvin-bot melvin-bot bot added the Overdue label Mar 25, 2024
@MitchExpensify
Copy link
Contributor

Waiting on proposals, labelling external

@melvin-bot melvin-bot bot removed the Overdue label Mar 25, 2024
@MitchExpensify MitchExpensify added External Added to denote the issue can be worked on by a contributor Overdue labels Mar 25, 2024
@melvin-bot melvin-bot bot changed the title There are notification of unread message on fresh install of the app [$500] There are notification of unread message on fresh install of the app Mar 25, 2024
Copy link

melvin-bot bot commented Mar 25, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01a7449e9320304743

Copy link

melvin-bot bot commented Mar 25, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @jayeshmangwani (External)

@MitchExpensify
Copy link
Contributor

Seeing as this impacts sign ups which are a focus of wave collect, I'm assigning it to that wave as polish

@ShridharGoel
Copy link
Contributor

ShridharGoel commented Mar 26, 2024

Proposal

Please re-state the problem that we are trying to solve in this issue.

There is a notification badge on reinstalling the app, on iOS.

What is the root cause of that problem?

iOS persists the badge count for a day, and shows it again on reinstall.

What changes do you think we should make in order to solve the problem?

We can clear the badge count in didFinishLaunchingWithOptions method of the first app launch using the below code.

if (![[NSUserDefaults standardUserDefaults] boolForKey:@"isFirstRunComplete"]) {
    // Setting badge count to 0 is first run is not complete
    [UIApplication sharedApplication].applicationIconBadgeNumber = 0;

    // Saving that the first run is done
    [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"isFirstRunComplete"];
}

@jayeshmangwani
Copy link
Contributor

@ShridharGoel thanks for the proposal , Have you tested the app locally after adding the above code ?
And I was able to find one SO question that state that the same as you've mentioned in the proposal that notification count persists at least a day .

@ShridharGoel
Copy link
Contributor

@jayeshmangwani Yes, but it will be updated on first launch only since code will not run before launching the app.

@jayeshmangwani
Copy link
Contributor

Yes that was exactly my doubt/thought, So issue will not be solved completely, as for the first time when user install the app they can see the badge count, badge will be set to 0 when app will be opened

@ShridharGoel
Copy link
Contributor

@jayeshmangwani Yes but atleast it will get reset on first launch of the app. Also, I think many users might be just clicking on the "Open" option after installing from App Store, they'll not see the badge even once if we reset on first launch.

@jayeshmangwani
Copy link
Contributor

@ShridharGoel This scenario altogether is very rare, as its very rare that someone uninstall & re-install the app often in one day. I'll do some search this badge issue today and if this is the only way then we can go with this way

@ShridharGoel
Copy link
Contributor

ShridharGoel commented Mar 29, 2024

@jayeshmangwani Yes, didFinishLaunchingWithOptions will be called but NSUserDefaults will still have the data on app update.
https://stackoverflow.com/a/1638772

@ShridharGoel
Copy link
Contributor

So, previous badge will not be set to 0 on app update.

@jayeshmangwani
Copy link
Contributor

Woow, thanks for the link

@jayeshmangwani
Copy link
Contributor

If we go with the this proposal there is one drawback, If we have some badge count before uninstalling the app and then we re-install the app from store/testflight:

  • If we open the app then all good we will not see the previous badge count,
  • but if app is installing and then we minimise the app installation and go back to home page, then after installation finished, we can see the badge count very first time, until we open the app.

@MitchExpensify @kadiealexander Please suggest your thoughts on this, and should we need to open the discussion in #expensify-open-source?

@ShridharGoel
Copy link
Contributor

Note that I don't think there's any straightforward way to remove the badge on reinstall without launching the app - since we need the app to run for executing any code. So, atleast one launch will be needed for clearing the badge.

@jayeshmangwani
Copy link
Contributor

@ShridharGoel 's Proposal, Overall looks good of setting the applicationIconBadgeNumber to 0 on didFinishLaunchingWithOptions.

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Apr 1, 2024

Triggered auto assignment to @johnmlee101, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@jayeshmangwani
Copy link
Contributor

@johnmlee101 , This is a Summary of the selected proposal. Please suggest your thoughts on this. If it looks good, we can proceed with the above proposal.

@johnmlee101
Copy link
Contributor

Yeah it feels like this is outside of our control to some degree. I think we can go with that proposal

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 1, 2024
Copy link

melvin-bot bot commented Apr 1, 2024

📣 @jayeshmangwani 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Apr 1, 2024

📣 @ShridharGoel 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@jayeshmangwani
Copy link
Contributor

@ShridharGoel you are assigned to the issue; go for the PR.

@ShridharGoel
Copy link
Contributor

Thanks, opening PR in a few hours.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Apr 2, 2024
@ShridharGoel
Copy link
Contributor

@jayeshmangwani PR is up #39410

@jayeshmangwani
Copy link
Contributor

@MitchExpensify Automation failed here, this issue is ready to be payout

@MitchExpensify
Copy link
Contributor

Payment summary:

$500 C+ @jayeshmangwani
$500 C @ShridharGoel

@MitchExpensify
Copy link
Contributor

MitchExpensify commented Apr 22, 2024

Paid and contract ended @jayeshmangwani

Please accept the offer here @ShridharGoel https://www.upwork.com/nx/wm/offer/101682717

@ShridharGoel
Copy link
Contributor

@MitchExpensify Accepted.

@MitchExpensify
Copy link
Contributor

Paid and contract ended, thanks everyone!

Any testing steps you recommend @jayeshmangwani ?

@jayeshmangwani
Copy link
Contributor

@MitchExpensify Regression Tests

Regression Test Proposal

  1. Ensure you have a badge icon(some unread messages) on the Expensify logo on iOS.
  2. Uninstall the App.
  3. Install it again via the App Store.

Option A:

  1. Open the App directly from the App Store. Close the App.
  2. Verify that the Badge should not show.

Option B:

  1. Minimise App Store when the App is being installed.
  2. If the App is being installed in the background, then the Badge will be visible Once the installation is finished.
  3. Open the App and Close/Minimise the App.
  4. Verify that the Badge should not show.

@MitchExpensify
Copy link
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
No open projects
Archived in project
Development

No branches or pull requests

6 participants