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

Fix all compiler warnings #301

Merged
merged 5 commits into from
Sep 5, 2022

Conversation

theospears
Copy link
Collaborator

@theospears theospears commented Sep 4, 2022

This addresses the compiler warnings generated while building BeeSwift.

The majority of these are deprecation warnings. The code is updated according to the advice in the warnings. There were also a few changes to building and linking.

Test Plan:
On a single device:

  • Refresh goal while offline and check error
  • Check reset password button still works and brings up web view
  • End a timer session while offline and check error

On devices with and without a notch:

  • Verify today widget still renders and accepts input
  • Check that healthkit metric chooser looks reasonable
  • Check that healthkit metric removal looks reasonable
  • Check that edit data point UI looks reasonable
  • Check that goal notification settings looks reasonable
  • Check that gallery view looks reasonable

Copy link
Collaborator

@krugerk krugerk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

let alertController = UIAlertController(title: "Error", message: "Failed to add datapoint", preferredStyle: .alert)
alertController.addAction(UIAlertAction(title: "OK", style: .cancel))
self.present(alertController, animated: true)
//UIAlertView(title: "Error", message: "Failed to add datapoint", delegate: nil, cancelButtonTitle: "OK").show()
Copy link
Collaborator

@krugerk krugerk Sep 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to commit commented out code

Suggested change
//UIAlertView(title: "Error", message: "Failed to add datapoint", delegate: nil, cancelButtonTitle: "OK").show()

@krugerk
Copy link
Collaborator

krugerk commented Sep 4, 2022

I turned off wifi and cell data on my Iphone, then refreshed a goal in the ios app, and this appeared:
"Eror could not refresh graph". my only option was "OK".

Ah, yes. The app as is does not support an offline mode. And this Merge Request deals mostly with tackling some 'technical debt'. Previously an alert dialog was shown in the aforementioned scenario. Code was updated to present this dialog in a more modern way. Expected behavior is that the dialog is still shown like it was before (and that that segment of the code compiles without the 'this style of alert dialog is deprecated' warning).

Thanks for engagement!

@theospears theospears mentioned this pull request Sep 5, 2022
13 tasks
@theospears theospears merged commit 1bf819f into beeminder:master Sep 5, 2022
@theospears theospears deleted the theo-deprecation-warnings branch September 5, 2022 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants