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 #3298: Add support for Xcode 16 #3299

Merged
merged 3 commits into from
Sep 4, 2024

Conversation

iccub
Copy link
Contributor

@iccub iccub commented Aug 31, 2024

Task/Issue URL: #3298 & https://app.asana.com/0/414709148257752/1208200157992058/f
Tech Design URL:
CC:

Description:

Resolves #3298

This PR allows this repo to be compiled with Xcode 16.
Two changes had to be made:

  1. In iOS 18 Apple added a new field to UIViewController named tab.
    It causes ambiguity and has to be renamed.
    Source https://developer.apple.com/documentation/uikit/uiviewcontroller/4434584-tab
    I renamed it to _tab, I am open to any other rename suggestion

  2. The URLOpener protocol and Apple's UIApplication shared the same
    signature for url opening function. This resulted in ambiguous compile
    time error.
    Code is now simplified and still allows to be used in mocks.

Changes I made should be backwards compatible and work in Xcode 15 as well

Steps to test this PR:
These steps are more for devs than QA

  1. Download Xcode 16 beta from https://developer.apple.com/download/
  2. Compile the app

QA STR:

  1. Launch the app
  2. Go to settings tap "set as default browser"
  3. Verify it did not regress, and it took you to the iOS settings screen.

Definition of Done (Internal Only):

Copy Testing:

  • Use of correct apostrophes in new copy, ie rather than '

Orientation Testing:
No UI changes in this PR

  • Portrait
  • Landscape

Device Testing:

  • iPhone SE (1st Gen)
  • iPhone 8
  • iPhone X
  • iPhone 14 Pro
  • iPad

OS Testing:

  • iOS 15
  • iOS 16
  • iOS 17

Theme Testing:

  • Light theme
  • Dark theme

Internal references:

Software Engineering Expectations
Technical Design Template

The URLOpener protocol and Apple's UIApplication shared the same
signature for url opening function. This resulted in ambiguous compile
time error.
Code is now simplified and still allows to be used in mocks.
In iOS 18 Apple added a new field to UIViewController named `tab`.
It causes ambiguity and has to be renamed.
Source https://developer.apple.com/documentation/uikit/uiviewcontroller/4434584-tab
@iccub iccub changed the title Add support for Xcode 16 Fix #3298: Add support for Xcode 16 Aug 31, 2024
@samsymons samsymons self-requested a review September 2, 2024 04:03
@samsymons
Copy link
Contributor

@iccub Thanks! I'll take a look at this on Monday and get back to you.

Copy link
Contributor

@samsymons samsymons left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for this!

@samsymons samsymons merged commit 76b9d1d into duckduckgo:main Sep 4, 2024
10 of 11 checks passed
@iccub iccub deleted the bugfix/xcode16_compilation branch September 4, 2024 17:33
samsymons added a commit that referenced this pull request Sep 9, 2024
# By Christopher Brind (4) and others
# Via Alessandro Boron (1) and others
* main: (27 commits)
  Bump C-S-S to 6.14.1 (#3331)
  DuckPlayer Launch Experiment for iOS (#3328)
  defer loading the tab switcher button until view did load (#3326)
  Release 7.136.0-3 (#3324)
  Release PR: Check for the negative attribution case (#3311)
  fix tab switcher crashes (speculative fix) (#3319)
  Onboarding highlights feature flag setup (#3308)
  Release 7.136.0-2 (#3320)
  Attempt to fix dissapearing privacy icon (#3317)
  Fix bookmarks toolbar behaviour with Sync Promo on iOS 15 (#3313)
  Bump BSK with C-S-S to 6.14.0 (#3314)
  ensure no atb or app version sent with pixel (#3315)
  Fix #3298: Add support for Xcode 16 (#3299)
  Fix Keychain Debug view controller segue (#3310)
  Release 7.136.0-1 (#3309)
  Fix an issue that causes the fire dialog to show multiple times for the same website after dismissing it (#3305)
  [DuckPlayer] 28. Open in Youtube -> Youtube App (#3290)
  usage segmentation (#3263)
  Fix wrong URL displayed for auth dialog (#3307)
  iOS Integration of BSK Onboarding (#3282)
  ...

# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
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.

The app does not compile on Xcode 16 beta
2 participants