Skip to content

Commit

Permalink
[iOS] Add support for the marketplace URI scheme (#22403)
Browse files Browse the repository at this point in the history
- Handle third-party marketplace app installs on iOS 17.4 in the EU
  • Loading branch information
kylehickinson committed Apr 19, 2024
1 parent 54d80e6 commit aaeb1a0
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 0 deletions.
Binary file modified build/ios/provisoning/release/Brave iOS Release.mobileprovision
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
</array>
<key>com.apple.developer.authentication-services.autofill-credential-provider</key>
<true/>
<key>com.apple.developer.browser.app-installation</key>
<true/>
<key>com.apple.developer.carplay-audio</key>
<true/>
<key>com.apple.developer.networking.networkextension</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
</array>
<key>com.apple.developer.authentication-services.autofill-credential-provider</key>
<true/>
<key>com.apple.developer.browser.app-installation</key>
<true/>
<key>com.apple.developer.carplay-audio</key>
<true/>
<key>com.apple.developer.networking.networkextension</key>
Expand Down
2 changes: 2 additions & 0 deletions ios/brave-ios/App/iOS/Entitlements/Release.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
</array>
<key>com.apple.developer.authentication-services.autofill-credential-provider</key>
<true/>
<key>com.apple.developer.browser.app-installation</key>
<true/>
<key>com.apple.developer.networking.networkextension</key>
<array>
<string>packet-tunnel-provider</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import Favicon
import Foundation
import Growth
import LocalAuthentication
import MarketplaceKit
import Preferences
import SafariServices
import Shared
Expand Down Expand Up @@ -207,6 +208,12 @@ extension BrowserViewController: WKNavigationDelegate {
return (shouldOpen ? .allow : .cancel, preferences)
}

if #available(iOS 17.4, *) {
if requestURL.scheme == MarketplaceKitURIScheme {
return (.allow, preferences)
}
}

if isStoreURL(requestURL) {
let shouldOpen = await handleExternalURL(
requestURL,
Expand Down

0 comments on commit aaeb1a0

Please sign in to comment.