Replace UIWebView, action sheets, and local notifications - #2
Open
putsyk wants to merge 1 commit into
Open
Conversation
Switch AirPrinter, QReader, and Restorer from UIWebView to WKWebView, replace AirPrinter's UIActionSheet with UIAlertController, migrate RemindMe to UserNotifications with ARC, and present Collection popovers with UIPopoverPresentationController. Co-authored-by: Roman Putsykovich <[email protected]>
putsyk
marked this pull request as ready for review
August 12, 2026 21:42
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
There was a problem hiding this comment.
Pull request overview
This PR modernizes several iOS sample projects by replacing remaining deprecated UIKit APIs (UIWebView, UIActionSheet, UILocalNotification, UIPopoverController) with their current equivalents (WKWebView, UIAlertController, UserNotifications, UIPopoverPresentationController), and updates project/docs accordingly.
Changes:
- Replaced
UIWebViewusage withWKWebView(storyboards where possible; runtime replacement when xib still contains a legacy web view) and added WebKit.framework where needed. - Replaced AirPrinter action sheets with
UIAlertControlleraction sheets and updated related delegate wiring forWKWebView. - Migrated RemindMe to
UNUserNotificationCenterand enabled ARC; updated READMEs and root index to reflect the new status.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| Restorer/Restorer/UYLWebViewController.m | Switches outlet to WKWebView and installs a WKWebView at runtime when needed. |
| Restorer/Restorer.xcodeproj/project.pbxproj | Links WebKit.framework. |
| Restorer/README | Updates documentation to reflect WKWebView usage and runtime fallback behavior. |
| RemindMe/RemindMe.xcodeproj/project.pbxproj | Links UserNotifications.framework; enables ARC and modules. |
| RemindMe/README | Updates sample description/versioning for UserNotifications + ARC. |
| RemindMe/main.m | Converts to @autoreleasepool for ARC. |
| RemindMe/Classes/RemindMeViewController.m | Replaces UILocalNotification scheduling/clearing with UNUserNotificationCenter requests/triggers. |
| RemindMe/Classes/RemindMeViewController.h | Updates IBOutlet properties to strong for ARC. |
| RemindMe/Classes/RemindMeAppDelegate.m | Requests notification authorization; implements UNUserNotificationCenter delegate callbacks; uses rootViewController. |
| RemindMe/Classes/RemindMeAppDelegate.h | Adopts UNUserNotificationCenterDelegate; updates properties for ARC. |
| README.md | Updates root project index/status notes to match the modernized samples. |
| QReader/README | Updates note to reflect WKWebView usage. |
| QReader/QReader/UYLWebViewController.m | Switches outlet to WKWebView and installs a WKWebView at runtime when needed. |
| QReader/QReader/Base.lproj/Main_iPhone.storyboard | Replaces storyboard web view with wkWebView. |
| QReader/QReader/Base.lproj/Main_iPad.storyboard | Replaces storyboard web view with wkWebView. |
| QReader/QReader.xcodeproj/project.pbxproj | Links WebKit.framework. |
| MasterSlide/MasterSlide/UYLDetailViewController.m | Updates deprecated bar button item style to UIBarButtonItemStylePlain. |
| Collection/Collection/UYLCollectionViewController.m | Replaces UIPopoverController flow with UIPopoverPresentationController. |
| AirPrinter/AirPrinter/WebViewController.m | Migrates to WKWebView + WKNavigationDelegate; replaces UIActionSheet with UIAlertController action sheet. |
| AirPrinter/AirPrinter/WebViewController.h | Updates protocols/imports and web view outlet type for WKWebView. |
| AirPrinter/AirPrinter.xcodeproj/project.pbxproj | Links WebKit.framework. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+109
to
+111
| case 4: | ||
| trigger = [UNCalendarNotificationTrigger triggerWithDateMatchingComponents:[calendar components:(NSCalendarUnitDay | NSCalendarUnitHour | NSCalendarUnitMinute | NSCalendarUnitSecond) fromDate:fireDate] repeats:YES]; | ||
| break; |
Comment on lines
111
to
114
| - (void)viewWillDisappear:(BOOL)animated { | ||
| [self.webView stopLoading]; | ||
| self.webView.delegate = nil; | ||
| [UIApplication sharedApplication].networkActivityIndicatorVisible = NO; | ||
| self.webView.navigationDelegate = nil; | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #1. This PR replaces the remaining deprecated UIKit APIs that could be updated in source without a full Xcode rewrite.
What changed
UIWebView. QReader storyboards usewkWebView; AirPrinter and Restorer install aWKWebViewat runtime if the xib still has a legacy web view.UIAlertControlleraction sheet (with popover anchoring on iPad).UNUserNotificationCenterinstead ofUILocalNotification. The project is now ARC. The window usesrootViewController.UIPopoverPresentationControllerinstead ofUIPopoverController.UIBarButtonItemStyleBordered→UIBarButtonItemStylePlain.Still left for a Mac
UIPopoverControllerdelegate.This branch is based on #1 so the diff is only these follow-up changes.