Skip to content
This repository was archived by the owner on Feb 24, 2025. It is now read-only.

Commit

Permalink
Merged the latest from main
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoreymendez committed Dec 20, 2024
2 parents b712681 + b5dac56 commit 0f9a9ca
Show file tree
Hide file tree
Showing 54 changed files with 829 additions and 264 deletions.
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

25 changes: 0 additions & 25 deletions .eslintrc

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/adhoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:

jobs:
make-adhoc:
runs-on: macos-14-xlarge
runs-on: macos-15-xlarge
name: Make ad-hoc build

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/alpha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ on:

jobs:
make-alpha:
runs-on: macos-14-xlarge
runs-on: macos-15-xlarge
name: Make TestFlight Alpha Build
timeout-minutes: 30

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/end-to-end.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
build-end-to-end-tests:
name: Build End to End Tests
runs-on: macos-14-xlarge
runs-on: macos-15-xlarge
timeout-minutes: 30

steps:
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
end-to-end-tests:
name: End to end Tests
needs: build-end-to-end-tests
runs-on: macos-14
runs-on: macos-15
timeout-minutes: 90
strategy:
matrix:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
atb-ui-tests:
name: ATB UI Tests
runs-on: macos-14-xlarge
runs-on: macos-15-xlarge
timeout-minutes: 30

steps:
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:

fingerprinting-ui-tests:
name: Fingerprinting UI Tests
runs-on: macos-14-xlarge
runs-on: macos-15-xlarge
timeout-minutes: 30

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/promote_testflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
promote-testflight-to-appstore:
runs-on: macos-14
runs-on: macos-15

steps:
- name: Check out the code
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ on:
jobs:
make-release:
if: github.event.action == 0 || (github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'Merge triggers release')) # empty string returns 0; for case when workflow is triggered manually
runs-on: macos-14-xlarge
runs-on: macos-15-xlarge
name: Make App Store Connect Release

steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sync-end-to-end.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
build-for-sync-end-to-end-tests:
name: Build for Sync End To End Tests
runs-on: macos-14-xlarge
runs-on: macos-15-xlarge
timeout-minutes: 30

steps:
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
sync-end-to-end-tests:
name: Sync End To End Tests
needs: build-for-sync-end-to-end-tests
runs-on: macos-14
runs-on: macos-15
timeout-minutes: 90
strategy:
matrix:
Expand Down
2 changes: 1 addition & 1 deletion .xcode-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.1
16.2
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import SwiftUI
import BrowserServicesKit
import Core
import Common
import os.log

class CredentialProviderViewController: ASCredentialProviderViewController {

Expand All @@ -37,7 +38,11 @@ class CredentialProviderViewController: ASCredentialProviderViewController {
tld: tld)

private lazy var secureVault: (any AutofillSecureVault)? = {
try? AutofillSecureVaultFactory.makeVault(reporter: SecureVaultReporter())
if findKeychainItemsWithV4() {
return try? AutofillSecureVaultFactory.makeVault(reporter: SecureVaultReporter())
} else {
return nil
}
}()

private lazy var tld: TLD = TLD()
Expand Down Expand Up @@ -110,7 +115,9 @@ class CredentialProviderViewController: ASCredentialProviderViewController {
installChildViewController(hostingController)

Task {
await credentialIdentityStoreManager.populateCredentialStore()
if findKeychainItemsWithV4() {
await credentialIdentityStoreManager.populateCredentialStore()
}
}

Pixel.fire(pixel: .autofillExtensionEnabled)
Expand Down Expand Up @@ -203,4 +210,31 @@ class CredentialProviderViewController: ASCredentialProviderViewController {
}
}
}

private func findKeychainItemsWithV4() -> Bool {
var itemsWithV4: [String] = []

let query: [String: Any] = [
kSecClass as String: kSecClassGenericPassword,
kSecReturnAttributes as String: kCFBooleanTrue!,
kSecMatchLimit as String: kSecMatchLimitAll
]

var result: AnyObject?

let status = SecItemCopyMatching(query as CFDictionary, &result)

if status == errSecSuccess, let items = result as? [[String: Any]] {
for item in items {
if let service = item[kSecAttrService as String] as? String,
service.contains("v4") {
itemsWithV4.append(service)
}
}
} else {
Logger.autofill.debug("No items found or error: \(status)")
}

return !itemsWithV4.isEmpty
}
}
2 changes: 1 addition & 1 deletion Configuration/Version.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
MARKETING_VERSION = 7.150.0
MARKETING_VERSION = 7.149.1
10 changes: 10 additions & 0 deletions Core/Pixel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,16 @@ public struct PixelParameters {

public static let appState = "state"
public static let appEvent = "event"

public static let firstBackgroundTimestamp = "firstBackgroundTimestamp"
public static let secondBackgroundTimestamp = "secondBackgroundTimestamp"
public static let didReceiveMemoryWarningTimestamp = "didReceiveMemoryWarningTimestamp"
public static let didReceiveMXPayloadTimestamp = "didReceiveMXPayloadTimestamp"
public static let didReceiveUNNotification = "didReceiveUNNotification"
public static let didStartRemoteMessagingClientBackgroundTask = "didStartRemoteMessagingClientBackgroundTask"
public static let didStartAppConfigurationFetchBackgroundTask = "didStartAppConfigurationFetchBackgroundTask"
public static let didPerformFetchTimestamp = "didPerformFetchTimestamp"
public static let numberOfBackgrounds = "numberOfBackgrounds"
}

public struct PixelValues {
Expand Down
7 changes: 7 additions & 0 deletions Core/PixelEvent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,9 @@ extension Pixel {
case dbCrashDetectedDaily
case crashOnCrashHandlersSetUp

case crashReportCRCIDMissing
case crashReportingSubmissionFailed

case dbMigrationError
case dbRemovalError
case dbDestroyError
Expand Down Expand Up @@ -968,6 +971,7 @@ extension Pixel {

// MARK: Lifecycle
case appDidTransitionToUnexpectedState
case appDidConsecutivelyBackground
}

}
Expand Down Expand Up @@ -1480,6 +1484,8 @@ extension Pixel.Event {

case .dbCrashDetected: return "m_d_crash"
case .dbCrashDetectedDaily: return "m_d_crash_daily"
case .crashReportCRCIDMissing: return "m_crashreporting_crcid-missing"
case .crashReportingSubmissionFailed: return "m_crashreporting_submission-failed"
case .crashOnCrashHandlersSetUp: return "m_d_crash_on_handlers_setup"
case .dbMigrationError: return "m_d_dbme"
case .dbRemovalError: return "m_d_dbre"
Expand Down Expand Up @@ -1934,6 +1940,7 @@ extension Pixel.Event {

// MARK: Lifecycle
case .appDidTransitionToUnexpectedState: return "m_debug_app-did-transition-to-unexpected-state"
case .appDidConsecutivelyBackground: return "m_debug_app-did-consecutively-background"

}
}
Expand Down
Loading

0 comments on commit 0f9a9ca

Please sign in to comment.