-
Notifications
You must be signed in to change notification settings - Fork 423
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/develop' into graeme/ios-nightly…
…-builds
- Loading branch information
Showing
52 changed files
with
2,654 additions
and
1,198 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# For most projects, this workflow file will not need changing; you simply need | ||
# to commit it to your repository. | ||
# | ||
# You may wish to alter this file to override the set of languages analyzed, | ||
# or to provide custom queries or build logic. | ||
# | ||
# ******** NOTE ******** | ||
# We have attempted to detect the languages in your repository. Please check | ||
# the `language` matrix defined below to confirm you have the correct set of | ||
# supported CodeQL languages. | ||
# | ||
name: "CodeQL" | ||
|
||
on: | ||
schedule: | ||
- cron: '0 2 * * *' # Run at 2 AM UTC | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: macos-13 | ||
timeout-minutes: 60 | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: 'swift' | ||
|
||
- name: Select Xcode | ||
run: sudo xcode-select -s /Applications/Xcode_$(<.xcode-version).app/Contents/Developer | ||
|
||
- name: Build | ||
run: | | ||
xcodebuild clean build \ | ||
-target "DuckDuckGo" \ | ||
-scheme "DuckDuckGo" \ | ||
-destination "platform=iOS Simulator,name=iPhone 14,OS=16.4" | ||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 | ||
with: | ||
category: "/language:swift" |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// | ||
// Configuration-Alpha.xcconfig | ||
// DuckDuckGo | ||
// | ||
// Copyright © 2023 DuckDuckGo. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
|
||
#include "DuckDuckGoDeveloper.xcconfig" | ||
#include? "ExternalDeveloper.xcconfig" | ||
#include? "Version.xcconfig" | ||
|
||
// The app bundle identifier | ||
APP_ID = com.duckduckgo.mobile.ios.alpha | ||
|
||
// A prefix for group ids. Must start with "group.". | ||
GROUP_ID_PREFIX = group.com.duckduckgo.alpha |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
MARKETING_VERSION = 7.86.0 | ||
MARKETING_VERSION = 7.88.0 |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// | ||
// SetAsDefaultStatistics.swift | ||
// DuckDuckGo | ||
// | ||
// Copyright © 2023 DuckDuckGo. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
|
||
import Foundation | ||
|
||
/// Measuring set as default usage. To be removed mid-end October. | ||
public class SetAsDefaultStatistics { | ||
|
||
@UserDefaultsWrapper(key: .defaultBrowserUsageLastSeen, defaultValue: nil) | ||
var defaultBrowserUsageLastSeen: Date? | ||
|
||
/// We assume we're default if we the app was launched with a URL in the last 7 days | ||
public var isDefault: Bool { | ||
guard let lastSeen = defaultBrowserUsageLastSeen, | ||
let days = Calendar.current.numberOfDaysBetween(lastSeen, and: Date()) else { return false } | ||
return (0...7).contains(days) | ||
} | ||
|
||
public init() { } | ||
|
||
public func openedAsDefault() { | ||
defaultBrowserUsageLastSeen = Date() | ||
} | ||
|
||
public func setAsDefaultOpened() { | ||
Pixel.fire(pixel: .onboardingSetDefaultOpened) | ||
} | ||
|
||
public func setAsDefaultSkipped() { | ||
Pixel.fire(pixel: .onboardingSetDefaultSkipped) | ||
} | ||
|
||
public func fireDailyActiveUser() { | ||
DailyPixel.fire(pixel: .dailyActiveUser, withAdditionalParameters: [ | ||
PixelParameters.defaultBrowser: "\(isDefault)" | ||
]) | ||
} | ||
|
||
} |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.