Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
39e6d4a
Enable retries in fastlane
clarmso Jan 20, 2025
c5635bf
Hardcode xcbeautify as the formatter. It's the default on Bitrise
clarmso Jan 20, 2025
9a554a1
Sometimes we can open the tab tray
clarmso Jan 20, 2025
c2ab494
Create L10nSnapshotTests test plan. Enable test retries.
clarmso Jan 22, 2025
c54a8e1
Use test plan for L10n
clarmso Jan 22, 2025
c61388c
Use old wait for now.
clarmso Jan 22, 2025
5638e8f
Disable retries for L10n
clarmso Jan 22, 2025
dff1b83
Refactor FXIOS-10205 [Swiftlint] Refactor how we handle .swiftlint.ym…
Jan 20, 2025
c536cc0
Add FXIOS-10386 #22756 Add debug logs for handling route (#24218)
lmarceau Jan 20, 2025
ce86e9c
Bugfix FXIOS-10601 - User Not Directed To Correct Website Firefox-iOS…
DanielDervishi Jan 20, 2025
dc718ff
Bugfix FXIOS-7301 Fix swiftlint build errors on main (#24259)
ih-codes Jan 20, 2025
1f0779a
Add FXIOS-11098 (Focus iOS) Update "Automatically Send Crash Reports"…
razvanlitianu Jan 21, 2025
42dd48f
Add FXIOS-10666 Implement iOS "onboarding-opt-out" ping (#24101)
razvanlitianu Jan 21, 2025
0b6048f
Remove [FXIOS-10299] remove universal link logic from Firefox and Fir…
Cramsden Jan 21, 2025
80ef0fd
Refactor [v136] Auto update SPM with latest rust-component 136.0.2025…
github-actions[bot] Jan 21, 2025
8efa353
Bugfix FXIOS-11127 ⁃ [Felt privacy - unified panel] - ETP toggle is d…
dicarobinho Jan 21, 2025
6a28ae6
Bugfix FXIOS-11078 [Bookmarks Evolution] Incorrect index path resolut…
MattLichtenstein Jan 21, 2025
7588b5a
Bugfix FXIOS-11081 [Bookmarks Evolution] Bookmarks disclosure button …
MattLichtenstein Jan 21, 2025
c199e00
Refactor FXIOS-11111 Make SwiftLint pre-push use --quiet (#24229)
mattreaganmozilla Jan 21, 2025
edc56e7
Refactor FXIOS-11120 #24247 [Sponsored tiles] Ensure we use productio…
lmarceau Jan 21, 2025
3312fd5
Refactor FXIOS-11071 bookmarks telemetry into it's own struct (#24227)
yoanarios Jan 21, 2025
f73a493
Refactor FXIOS-10855 #23671 Reenable rating prompt with different rul…
lmarceau Jan 21, 2025
ee1ea73
focus-string-import-01-20-2025 (#24238)
github-actions[bot] Jan 21, 2025
0da2f6b
FXIOS-11121 #24248 [Sponsored tiles] Ensure we send to both places fo…
lmarceau Jan 21, 2025
0f19ac3
Add MTE-4138 - long press share actions tests (#24242)
dragosb01 Jan 22, 2025
05a4018
Bugfix FXIOS-11138 [ToS] Landscape mode should not be supported for '…
dicarobinho Jan 22, 2025
46fc441
Bugfix FXIOS-11128 [ToS] - "Continue" is written with lowercase (#24281)
dicarobinho Jan 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .githooks/pre-push
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

echo "Starting Swiftlint Check..."
swiftlint --strict
swiftlint --strict --quiet
RESULT=$?

if [ $RESULT -ne 0 ]; then
Expand Down
5 changes: 3 additions & 2 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,9 @@ excluded: # paths to ignore during linting. Takes precedence over `included`.
- firefox-ios/Client/ContentBlocker/ContentBlockerGenerator/Package.swift
- Package.swift
- firefox-ios/Build/Intermediates.noindex/Client.build/Fennec-iphoneos/WidgetKitExtension.build/DerivedSources/IntentDefinitionGenerated/WidgetIntents/*
# Temporarly ignore focus-ios folder
- focus-ios/
# Focus specific
- focus-ios/Blockzilla/Generated
- focus-ios-tests/tools/Localizations

included:
- /Users/vagrant/git
Expand Down
22 changes: 22 additions & 0 deletions SampleBrowser/SampleBrowser.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@
isa = PBXNativeTarget;
buildConfigurationList = 8A46020B2B0FE20800FFD17F /* Build configuration list for PBXNativeTarget "SampleBrowser" */;
buildPhases = (
EE20F75A2D3AC5CA00A3F5DF /* Swiftlint */,
8A4601DD2B0FE20500FFD17F /* Sources */,
8A4601DE2B0FE20500FFD17F /* Frameworks */,
8A4601DF2B0FE20500FFD17F /* Resources */,
Expand Down Expand Up @@ -363,6 +364,27 @@
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
EE20F75A2D3AC5CA00A3F5DF /* Swiftlint */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = Swiftlint;
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if [[ \"$(uname -m)\" == arm64 ]]; then\n export PATH=\"/opt/homebrew/bin:$PATH\"\nfi\n\nMODIFIED_FILES=$(git diff --name-only --diff-filter=ACM | grep -e '\\.swift$')\n\nSWIFTLINT_ROOT=\"${SRCROOT}/..\"\n\nif which swiftlint > /dev/null; then\n # Move to the location of the root Swiftlint config file in\n # order to use nested configurations\n cd ${SWIFTLINT_ROOT}\n\n swiftlint lint ${MODIFIED_FILES}\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\" \nfi\n";
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
8A4601DD2B0FE20500FFD17F /* Sources */ = {
isa = PBXSourcesBuildPhase;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,10 @@
isa = PBXNativeTarget;
buildConfigurationList = 8A2FE6782A55EE3F0036B6AF /* Build configuration list for PBXNativeTarget "SampleComponentLibraryApp" */;
buildPhases = (
8A2FE6922A55F1880036B6AF /* Swiftlint */,
8A2FE64A2A55EE3D0036B6AF /* Sources */,
8A2FE64C2A55EE3D0036B6AF /* Resources */,
8A2FE64B2A55EE3D0036B6AF /* Frameworks */,
8A2FE6922A55F1880036B6AF /* Swiftlint */,
);
buildRules = (
);
Expand Down Expand Up @@ -321,7 +321,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "export PATH=\"$PATH:/opt/homebrew/bin\"\nif which swiftlint > /dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n";
shellScript = "if [[ \"$(uname -m)\" == arm64 ]]; then\n export PATH=\"/opt/homebrew/bin:$PATH\"\nfi\n\nMODIFIED_FILES=$(git diff --name-only --diff-filter=ACM | grep -e '\\.swift$')\n\nSWIFTLINT_ROOT=\"${SRCROOT}/..\"\n\nif which swiftlint > /dev/null; then\n # Move to the location of the root Swiftlint config file in\n # order to use nested configurations\n cd ${SWIFTLINT_ROOT}\n\n swiftlint lint ${MODIFIED_FILES}\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\" \nfi\n";
};
/* End PBXShellScriptBuildPhase section */

Expand Down
1 change: 1 addition & 0 deletions bitrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,7 @@ workflows:
- swiftlint-extended@1:
inputs:
- linting_path: "$BITRISE_SOURCE_DIR"
- lint_config_file: "" # Don't pass a config file to make use of nested configurations
- [email protected]: {}
- script@1:
inputs:
Expand Down
29 changes: 19 additions & 10 deletions firefox-ios/Client.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
shouldUseLaunchSchemeArgsEnv = "YES"
systemAttachmentLifetime = "keepAlways">
<TestPlans>
<TestPlanReference
reference = "container:firefox-ios-tests/Tests/L10nSnapshotTests.xctestplan"
default = "YES">
</TestPlanReference>
</TestPlans>
<Testables>
<TestableReference
skipped = "NO">
Expand Down Expand Up @@ -85,15 +91,6 @@
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "7BEB64401C7345600092C02E"
BuildableName = "L10nSnapshotTests.xctest"
BlueprintName = "L10nSnapshotTests"
ReferencedContainer = "container:Client.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "FirefoxBetaEnterprise">
Expand Down
2 changes: 1 addition & 1 deletion firefox-ios/Client/AdjustTelemetryHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
// telemetry.record(network: network)
// }
//
// gleanWrapper.submitPing()
// gleanWrapper.submit(GleanMetrics.Pings.shared.firstSession)
// }
//}
// swiftlint:enable comment_spacing file_header
2 changes: 0 additions & 2 deletions firefox-ios/Client/Application/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate, FeatureFlaggable {
)

lazy var themeManager: ThemeManager = DefaultThemeManager(sharedContainerIdentifier: AppInfo.sharedContainerIdentifier)
lazy var ratingPromptManager = RatingPromptManager(profile: profile)
lazy var appSessionManager: AppSessionProvider = AppSessionManager()
lazy var notificationSurfaceManager = NotificationSurfaceManager()
lazy var tabDataStore = DefaultTabDataStore()
Expand Down Expand Up @@ -168,7 +167,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate, FeatureFlaggable {
if self?.featureFlags.isFeatureEnabled(.cleanupHistoryReenabled, checking: .buildOnly) ?? false {
self?.profile.cleanupHistoryIfNeeded()
}
self?.ratingPromptManager.updateData()
}

DispatchQueue.global().async { [weak self] in
Expand Down
9 changes: 9 additions & 0 deletions firefox-ios/Client/Application/DefaultBrowserUtil.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ struct DefaultBrowserUtil {
self.logger = logger
}

enum UserDefaultsKey: String {
case keyIsBrowserDefault = "com.moz.isBrowserDefault.key"
}

static var isBrowserDefault: Bool {
get { UserDefaults.standard.object(forKey: UserDefaultsKey.keyIsBrowserDefault.rawValue) as? Bool ?? false }
set { UserDefaults.standard.set(newValue, forKey: UserDefaultsKey.keyIsBrowserDefault.rawValue) }
}

func processUserDefaultState(isFirstRun: Bool) {
guard #available(iOS 18.2, *) else { return }

Expand Down
3 changes: 0 additions & 3 deletions firefox-ios/Client/Application/DependencyHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ class DependencyHelper {
let appSessionProvider: AppSessionProvider = appDelegate.appSessionManager
AppContainer.shared.register(service: appSessionProvider)

let ratingPromptManager: RatingPromptManager = appDelegate.ratingPromptManager
AppContainer.shared.register(service: ratingPromptManager)

let downloadQueue: DownloadQueue = appDelegate.appSessionManager.downloadQueue
AppContainer.shared.register(service: downloadQueue)

Expand Down
5 changes: 4 additions & 1 deletion firefox-ios/Client/Application/SceneDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,10 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
logger.log("Scene coordinator will handle a route", level: .info, category: .coordinator)
sessionManager.launchSessionProvider.openedFromExternalSource = true

AppEventQueue.wait(for: [.startupFlowComplete, .tabRestoration(sceneCoordinator.windowUUID)]) {
AppEventQueue.wait(for: [.startupFlowComplete, .tabRestoration(sceneCoordinator.windowUUID)]) { [weak self] in
self?.logger.log("Start up flow and restoration done, will handle route",
level: .info,
category: .coordinator)
sceneCoordinator.findAndHandle(route: route)
}
}
Expand Down
7 changes: 6 additions & 1 deletion firefox-ios/Client/Coordinators/BaseCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ open class BaseCoordinator: NSObject, Coordinator {
for child in matchingCoordinator.childCoordinators {
guard child.isDismissable else { continue }

logger.log("Dismissing child of the matching coordinator", level: .debug, category: .coordinator)
matchingCoordinator.router.dismiss()
matchingCoordinator.remove(child: child)
}
Expand All @@ -64,6 +65,7 @@ open class BaseCoordinator: NSObject, Coordinator {
func find(route: Route) -> Coordinator? {
// Check if the current coordinator can handle the route.
if canHandle(route: route) {
logger.log("Can handle the route with \(self)", level: .debug, category: .coordinator)
savedRoute = nil
return self
}
Expand All @@ -73,13 +75,16 @@ open class BaseCoordinator: NSObject, Coordinator {
if let matchingCoordinator = childCoordinator.find(route: route) {
savedRoute = nil

logger.log("Can handle route with child coordinator \(matchingCoordinator)",
level: .debug,
category: .coordinator)
return matchingCoordinator
}
}

// If no matching coordinator is found, return nil and save the Route to be passed along when it next navigates
savedRoute = route
logger.log("Saved a route", level: .info, category: .coordinator)
logger.log("No coordinator found, saved a route", level: .info, category: .coordinator)
return nil
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ class BookmarksCoordinator: BaseCoordinator,
}

func showBookmarkDetail(for node: FxBookmarkNode, folder: FxBookmarkNode, completion: (() -> Void)? = nil) {
TelemetryWrapper.recordEvent(category: .action, method: .change, object: .bookmark, value: .bookmarksPanel)
let bookmarksTelemetry = BookmarksTelemetry()
bookmarksTelemetry.editBookmark(eventLabel: .bookmarksPanel)
if isBookmarkRefactorEnabled {
router.push(makeDetailController(for: node, folder: folder))
} else {
Expand Down
14 changes: 2 additions & 12 deletions firefox-ios/Client/Coordinators/Router/RouteBuilder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ final class RouteBuilder: FeatureFlaggable {
}
} else if urlScanner.isHTTPScheme {
TelemetryWrapper.gleanRecordEvent(category: .action, method: .open, object: .asDefaultBrowser)
RatingPromptManager.isBrowserDefault = true
DefaultBrowserUtil.isBrowserDefault = true
// Use the last browsing mode the user was in
return .search(url: url, isPrivate: isPrivate, options: [.focusLocationField])
} else {
Expand All @@ -158,8 +158,7 @@ final class RouteBuilder: FeatureFlaggable {

// If the user activity has a webpageURL, it's a deep link or an old history item.
// Use the URL to create a new search tab.
if let url = userActivity.webpageURL,
isBrowsingActivity(userActivity) {
if let url = userActivity.webpageURL {
return .search(url: url, isPrivate: false)
}

Expand Down Expand Up @@ -207,15 +206,6 @@ final class RouteBuilder: FeatureFlaggable {
}
}

private func isBrowsingActivity(_ userActivity: NSUserActivity) -> Bool {
if featureFlags.isFeatureEnabled(.universalLinks, checking: .buildOnly) {
return userActivity.activityType == NSUserActivityTypeBrowsingWeb ||
userActivity.activityType == browsingActivityType
} else {
return true
}
}

// MARK: - Telemetry

private func recordTelemetry(input: DeeplinkInput.Host, isPrivate: Bool) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
<string>Default</string>
</array>
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:blog.mozilla.org</string>
</array>
<array/>
<key>com.apple.developer.authentication-services.autofill-credential-provider</key>
<true/>
<key>com.apple.developer.networking.multipath</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
<key>aps-environment</key>
<string>production</string>
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:blog.mozilla.org</string>
</array>
<array/>
<key>com.apple.developer.authentication-services.autofill-credential-provider</key>
<true/>
<key>com.apple.developer.networking.multipath</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class GleanPlumbContextProvider {
}

private var isDefaultBrowser: Bool {
return userDefaults.bool(forKey: RatingPromptManager.UserDefaultsKey.keyIsBrowserDefault.rawValue)
return userDefaults.bool(forKey: DefaultBrowserUtil.UserDefaultsKey.keyIsBrowserDefault.rawValue)
}

private var numberOfAppLaunches: Int32 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ enum CoreFeatureFlagID {
case adjustEnvironmentProd
case useMockData
case useStagingContileAPI
case useStagingSponsoredPocketStoriesAPI
case useStagingFakespotAPI
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,15 +158,11 @@ class LegacyFeatureFlagsManager: HasNimbusFeatureFlags {
coreFeatures[.useMockData] = useMockData

let useStagingContileAPI = CoreFlaggableFeature(withID: .useStagingContileAPI,
enabledFor: [.beta, .developer])
let useStagingSponsoredPocketStoriesAPI = CoreFlaggableFeature(withID: .useStagingSponsoredPocketStoriesAPI,
enabledFor: [.beta, .developer])

enabledFor: [.developer])
let useStagingFakespotAPI = CoreFlaggableFeature(withID: .useStagingFakespotAPI,
enabledFor: [])

coreFeatures[.useStagingContileAPI] = useStagingContileAPI
coreFeatures[.useStagingSponsoredPocketStoriesAPI] = useStagingSponsoredPocketStoriesAPI
coreFeatures[.useStagingFakespotAPI] = useStagingFakespotAPI
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ enum NimbusFeatureFlagID: String, CaseIterable {
case splashScreen
case unifiedAds
case unifiedSearch
case universalLinks
case toolbarRefactor
case toolbarOneTapNewTab
case toolbarNavigationHint
Expand Down Expand Up @@ -138,7 +137,6 @@ struct NimbusFlaggableFeature: HasNimbusSearchBar {
.splashScreen,
.unifiedAds,
.unifiedSearch,
.universalLinks,
.toolbarRefactor,
.toolbarOneTapNewTab,
.toolbarNavigationHint,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import Storage
class ActionProviderBuilder {
private var actions = [UIAction]()
private var taskId = UIBackgroundTaskIdentifier(rawValue: 0)
private let bookmarksTelemetry = BookmarksTelemetry()

func build() -> [UIAction] {
return actions
Expand Down Expand Up @@ -44,12 +45,9 @@ class ActionProviderBuilder {
title: .ContextMenuBookmarkLink,
image: UIImage.templateImageNamed(StandardImageIdentifiers.Large.bookmark),
identifier: UIAction.Identifier("linkContextMenu.bookmarkLink")
) { _ in
) { [weak self] _ in
addBookmark(url.absoluteString, title, nil)
TelemetryWrapper.recordEvent(category: .action,
method: .add,
object: .bookmark,
value: .contextMenu)
self?.bookmarksTelemetry.addBookmark(eventLabel: .contextMenu)
}
)
}
Expand All @@ -60,12 +58,9 @@ class ActionProviderBuilder {
title: .RemoveBookmarkContextMenuTitle,
image: UIImage.templateImageNamed(StandardImageIdentifiers.Large.cross),
identifier: UIAction.Identifier("linkContextMenu.removeBookmarkLink")
) { _ in
) { [weak self] _ in
removeBookmark(url, title, nil)
TelemetryWrapper.recordEvent(category: .action,
method: .delete,
object: .bookmark,
value: .contextMenu)
self?.bookmarksTelemetry.deleteBookmark(eventLabel: .contextMenu)
}
)
}
Expand Down
Loading