Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Resolve compilation errors

  • Loading branch information
mahmoud-adam85 committed May 15, 2018
1 parent bff808f commit 41496590961fc9b0f28fec8d30a5ed405a904dc6
@@ -4,16 +4,16 @@ github "sleroux/Deferred" "Swift3.0"
github "SnapKit/SnapKit" "3.1.2"
github "rs/SDWebImage" "4.1.0"
github "swisspol/GCDWebServer" "3.3.2"
github "kif-framework/KIF" "v3.6.0"
github "kif-framework/KIF" "v3.7.3"
# Cliqz: Disable Adjust Integration
#github "adjust/ios_sdk" "v4.11.5"
#github "adjust/ios_sdk" "v4.12.1"
github "AgileBits/onepassword-app-extension" "add-framework-support"
github "jrendel/SwiftKeychainWrapper" "3.0.1"
github "jrendel/SwiftKeychainWrapper" "master"
github "DaveWoodCom/XCGLogger" "Version_4.0.0"
github "cezheng/Fuzi" "1.0.1"
github "cezheng/Fuzi" "2.0.2"
github "SwiftyJSON/SwiftyJSON" "3.1.4"
github "farhanpatel/JSONSchema.swift" "master"
github "google/EarlGrey" "1.12.1"
github "google/EarlGrey" "1.13.0"
# Cliqz: Disable FireFox Telemetry
#github "mozilla-mobile/telemetry-ios" "v1.0.10"
github "mozilla-mobile/MappaMundi" "master"
24 Cartfile.resolved 100755 → 100644
@@ -1,17 +1,15 @@
github "getsentry/sentry-cocoa" "3.11.1"
github "Alamofire/Alamofire" "4.3.0"
github "sleroux/Deferred" "35b8927c1b94ce074e10793c57e1f80d0e2227fa"
github "cezheng/Fuzi" "1.0.1"
github "swisspol/GCDWebServer" "3.3.2"
github "kif-framework/KIF" "v3.6.0"
github "SnapKit/SnapKit" "3.1.2"
github "jrendel/SwiftKeychainWrapper" "3.0.1"
github "DaveWoodCom/XCGLogger" "Version_4.0.0"
github "adjust/ios_sdk" "v4.12.1"
github "AgileBits/onepassword-app-extension" "bcc4cc97fed9a6e73fa204f2e61138e353cb3ef7"
github "Alamofire/Alamofire" "4.7.2"
github "DaveWoodCom/XCGLogger" "Version_4.0.0"
github "SnapKit/SnapKit" "3.1.2"
github "SwiftyJSON/SwiftyJSON" "3.1.4"
github "cezheng/Fuzi" "2.0.2"
github "farhanpatel/JSONSchema.swift" "1c052b83baa8c497e12cde6a8afca0f54574612f"
github "google/EarlGrey" "1.12.1"
github "rs/SDWebImage" "4.1.0"
github "mozilla-mobile/telemetry-ios" "v1.1.0"
github "getsentry/sentry-cocoa" "3.11.1"
github "google/EarlGrey" "1.13.0"
github "jrendel/SwiftKeychainWrapper" "46e5980ee7630be015aae6a6307c2fe1e8f3661d"
github "kif-framework/KIF" "v3.7.3"
github "mozilla-mobile/MappaMundi" "0b4f70e2feb941f4d56bd9e27e408d4300656a87"
github "rs/SDWebImage" "4.1.0"
github "sleroux/Deferred" "35b8927c1b94ce074e10793c57e1f80d0e2227fa"
github "swisspol/GCDWebServer" "3.3.2"
27 Client.xcodeproj/project.pbxproj 100755 → 100644
@@ -886,11 +886,9 @@
EB11A1052044A90E0018F749 /* TrackingProtectionPageStats.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB11A1022044A90D0018F749 /* TrackingProtectionPageStats.swift */; };
EB11A1062044A90E0018F749 /* ContentBlockerHelper+TabContentScript.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB11A1032044A90E0018F749 /* ContentBlockerHelper+TabContentScript.swift */; };
EB2A63341F3B49A7004EF8B0 /* ContentBlockerHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB2A63251F3B49A7004EF8B0 /* ContentBlockerHelper.swift */; };
EB3A38A02032673E004C6E67 /* DatabaseFixtureTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB3A38912032673D004C6E67 /* DatabaseFixtureTest.swift */; };
EB54A8762028CE4000018880 /* disconnect-advertising.json in Resources */ = {isa = PBXBuildFile; fileRef = EB54A8722028CE4000018880 /* disconnect-advertising.json */; };
EB54A8772028CE4000018880 /* disconnect-analytics.json in Resources */ = {isa = PBXBuildFile; fileRef = EB54A8732028CE4000018880 /* disconnect-analytics.json */; };
EB54A8782028CE4000018880 /* disconnect-content.json in Resources */ = {isa = PBXBuildFile; fileRef = EB54A8742028CE4000018880 /* disconnect-content.json */; };
EB54A8792028CE4000018880 /* disconnect-social.json in Resources */ = {isa = PBXBuildFile; fileRef = EB54A8752028CE4000018880 /* disconnect-social.json */; };
EBA31D791F7999030055463D /* SyncPingCentre.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBA31D781F7999030055463D /* SyncPingCentre.swift */; };
EBA31D7B1F79990C0055463D /* SyncTelemetryEvents.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBA31D7A1F79990C0055463D /* SyncTelemetryEvents.swift */; };
EBA31D7D1F79996E0055463D /* SyncTelemetryUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBA31D7C1F79996E0055463D /* SyncTelemetryUtils.swift */; };
@@ -2341,7 +2339,6 @@
EB11A1022044A90D0018F749 /* TrackingProtectionPageStats.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TrackingProtectionPageStats.swift; sourceTree = "<group>"; };
EB11A1032044A90E0018F749 /* ContentBlockerHelper+TabContentScript.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "ContentBlockerHelper+TabContentScript.swift"; sourceTree = "<group>"; };
EB2A63251F3B49A7004EF8B0 /* ContentBlockerHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContentBlockerHelper.swift; sourceTree = "<group>"; };
EB3A38912032673D004C6E67 /* DatabaseFixtureTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DatabaseFixtureTest.swift; sourceTree = "<group>"; };
EB54A8722028CE4000018880 /* disconnect-advertising.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "disconnect-advertising.json"; sourceTree = "<group>"; };
EB54A8732028CE4000018880 /* disconnect-analytics.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "disconnect-analytics.json"; sourceTree = "<group>"; };
EB54A8742028CE4000018880 /* disconnect-content.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "disconnect-content.json"; sourceTree = "<group>"; };
@@ -3634,8 +3631,8 @@
AF77B88F209A05E200E7A0C4 /* ConnectionManager.swift */,
);
path = "Anti-Phishing";
sourceTree = "<group>";
};
sourceTree = "<group>";
};
AF77B8B5209B130400E7A0C4 /* HomePanel */ = {
isa = PBXGroup;
children = (
@@ -4911,7 +4908,6 @@
7BEB64431C7345600092C02E /* Sources */,
7BEB64461C7345600092C02E /* Frameworks */,
7BEB64471C7345600092C02E /* Resources */,
E4A69F612048AFEA00D9017B /* Copy Carthage Frameworks */,
);
buildRules = (
);
@@ -5109,7 +5105,6 @@
E6639F191BF11E3A002D0853 /* Conditionally Add Settings Bundle */,
E6B09CD31C74EEDB00C63FA1 /* Copy Frameworks */,
D6D515078BA2F8059B3DB387 /* [CP] Embed Pods Frameworks */,
1A527F88887E49C5B18E6A66 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
@@ -5797,7 +5792,6 @@
0BA1E00E1B03FB0B007675AF /* NetError.html in Resources */,
E4A961381AC06FA50069AD6F /* ReaderViewLoading.html in Resources */,
1EBB08B92068FC9700C6DFFE /* Eula.html in Resources */,
EB2A633F1F3B514B004EF8B0 /* disconnect-social.json in Resources */,
AFA1DE072088AF9600B27B8A /* AdBlocker in Resources */,
E4ECCDAE1AB131770005E717 /* FiraSans-Medium.ttf in Resources */,
D0E17FB6201F847600F1FCB5 /* FxASignIn.js in Resources */,
@@ -5847,21 +5841,6 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
1A527F88887E49C5B18E6A66 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Client/Pods-Client-resources.sh\"\n";
showEnvVarsInLog = 0;
};
7B604F8F1C494AAA006EEEC3 /* Copy Carthage Dependencies */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@@ -5888,7 +5867,7 @@
shellPath = /bin/sh;
shellScript = "/usr/local/bin/carthage copy-frameworks";
};
8D3BD4867AA1ACEA46E5F50B /* [CP] Check Pods Manifest.lock */ = {
8D3BD4867AA1ACEA46E5F50B /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
@@ -103,9 +103,8 @@ class LeanPlumClient {
// to prompting with native push permissions.
/* Cliqz: Disable LeanPlum Integration
private var useFxAPrePush: LPVar = LPVar.define("useFxAPrePush", with: false)
<<<<<<< HEAD
*/
var introScreenVars = LPVar.define("IntroScreen", with: IntroCard.defaultCards().flatMap({ $0.asDictonary() }))
*/

private func isPrivateMode() -> Bool {
// Need to be run on main thread since isInPrivateMode requires to be on the main thread.
@@ -132,6 +131,7 @@ class LeanPlumClient {
}

func recordSyncedClients(with profile: Profile?) {
/* Cliqz: Disable LeanPlum Integration
guard let profile = profile as? BrowserProfile else {
return
}
@@ -143,6 +143,7 @@ class LeanPlumClient {
self.prefs?.setInt(Int32(clients.count), forKey: FxaDevicesCountPrefKey)
Leanplum.setUserAttributes([LPAttributeKey.fxaDeviceCount: clients.count])
}
*/
}

fileprivate func start() {
@@ -125,6 +125,7 @@ class IntroViewController: UIViewController {
}

func syncViaLP() {
/* Cliqz: comment references to LeanPlumClient
let startTime = Date.now()
LeanPlumClient.shared.introScreenVars?.onValueChanged({ [weak self] in
guard let newIntro = LeanPlumClient.shared.introScreenVars?.object(forKey: nil) as? [[String: Any]] else {
@@ -161,6 +162,7 @@ class IntroViewController: UIViewController {
self?.viewDidLayoutSubviews()
})
*/
}

override func viewDidLayoutSubviews() {
@@ -677,10 +677,16 @@ class SendFeedbackSetting: Setting {

class SendAnonymousUsageDataSetting: BoolSetting {
init(prefs: Prefs, delegate: SettingsDelegate?) {
// Cliqz: upgrade to swift 4.1
let statusText = NSMutableAttributedString()
statusText.append(NSAttributedString(string: Strings.SendUsageSettingMessage, attributes: [NSForegroundColorAttributeName: SettingsUX.TableViewHeaderTextColor]))
statusText.append(NSAttributedString(string: " "))
statusText.append(NSAttributedString(string: Strings.SendUsageSettingLink, attributes: [NSForegroundColorAttributeName: UIConstants.HighlightBlue]))

super.init(
prefs: prefs, prefKey: AppConstants.PrefSendUsageData, defaultValue: true,
attributedTitleText: NSAttributedString(string: Strings.SendUsageSettingTitle),
attributedStatusText: createStatusText(),
attributedStatusText: statusText,
settingDidChange: {
AdjustIntegration.setEnabled($0)
LeanPlumClient.shared.set(attributes: [LPAttributeKey.telemetryOptIn: $0])
@@ -95,9 +95,16 @@ class DeviceNameSetting: StringSetting {
set { super.Padding = newValue }
}

/* Cliqz: upgrade to swift 4.1
init(settings: SettingsTableViewController) {
super.init(defaultValue: DeviceInfo.defaultClientName(), placeholder: "", accessibilityIdentifier: "DeviceNameSetting", persister: DeviceNamePersister(profile: settings.profile), settingIsValid: self.settingIsValid)
}
*/

init(settings: SettingsTableViewController) {
let settingsIsValid: (String?) -> Bool = { !($0?.isEmpty ?? true) }
super.init(defaultValue: DeviceInfo.defaultClientName(), placeholder: "", accessibilityIdentifier: "DeviceNameSetting", persister: DeviceNamePersister(profile: settings.profile), settingIsValid: settingsIsValid)
}

override func onConfigureCell(_ cell: UITableViewCell) {
super.onConfigureCell(cell)
@@ -250,6 +250,13 @@ extension CliqzSearchViewController {
}
}

//MARK: - Handle Key Commands
extension CliqzSearchViewController {
func handleKeyCommands(sender: UIKeyCommand) {
return //function not supported
}
}

//MARK: - Util
extension CliqzSearchViewController {
func showOpenSettingsAlert(_ notification: Notification) {
@@ -18,9 +18,9 @@ class CliqzOnOffSetting: Setting {
override var style: UITableViewCellStyle { return .value1 }
override var accessoryType: UITableViewCellAccessoryType { return .disclosureIndicator }

init(settings: SettingsTableViewController) {
init(settings: SettingsTableViewController, title: String) {
self.profile = settings.profile
super.init(title: NSAttributedString(string: getTitle(), attributes: [NSForegroundColorAttributeName: SettingsUX.TableViewRowTextColor]))
super.init(title: NSAttributedString(string: title, attributes: [NSForegroundColorAttributeName: SettingsUX.TableViewRowTextColor]))
}

override var status: NSAttributedString {
@@ -41,10 +41,6 @@ class CliqzOnOffSetting: Setting {
}

// MARK:- Abbstract methods
func getTitle() -> String {
return ""
}

func isOn() -> Bool {
return false
}
@@ -67,8 +67,9 @@ class RegionalSetting: Setting {

class HumanWebSetting: CliqzOnOffSetting {

override func getTitle() -> String {
return NSLocalizedString("Human Web", tableName: "Cliqz", comment: "[Settings] Human Web")
init(settings: SettingsTableViewController) {
let title = NSLocalizedString("Human Web", tableName: "Cliqz", comment: "[Settings] Human Web")
super.init(settings: settings, title: title)
}

override func isOn() -> Bool {
@@ -118,8 +119,9 @@ class CliqzSearchSetting: Setting, SearchEnginePickerDelegate {

class AutoForgetTabSetting: CliqzOnOffSetting {

override func getTitle() -> String {
return NSLocalizedString("Automatic Forget Tab", tableName: "Cliqz", comment: " [Settings] Automatic Forget Tab")
init(settings: SettingsTableViewController) {
let title = NSLocalizedString("Automatic Forget Tab", tableName: "Cliqz", comment: " [Settings] Automatic Forget Tab")
super.init(settings: settings, title: title)
}

override func isOn() -> Bool {
@@ -134,8 +136,9 @@ class AutoForgetTabSetting: CliqzOnOffSetting {


class LimitMobileDataUsageSetting: CliqzOnOffSetting {
override func getTitle() -> String {
return NSLocalizedString("Limit Mobile Data Usage", tableName: "Cliqz", comment: "[Settings] Limit Mobile Data Usage")
init(settings: SettingsTableViewController) {
let title = NSLocalizedString("Limit Mobile Data Usage", tableName: "Cliqz", comment: "[Settings] Limit Mobile Data Usage")
super.init(settings: settings, title: title)
}

override func isOn() -> Bool {
@@ -149,8 +152,9 @@ class LimitMobileDataUsageSetting: CliqzOnOffSetting {
}

class AdBlockerSetting: CliqzOnOffSetting {
override func getTitle() -> String {
return NSLocalizedString("Block Ads", tableName: "Cliqz", comment: "[Settings] Block Ads")
init(settings: SettingsTableViewController) {
let title = NSLocalizedString("Block Ads", tableName: "Cliqz", comment: "[Settings] Block Ads")
super.init(settings: settings, title: title)
}

override func isOn() -> Bool {
@@ -210,8 +214,9 @@ class ReportWebsiteSetting: ShowCliqzPageSetting {
}

class SendCrashReportsSetting: CliqzOnOffSetting {
override func getTitle() -> String {
return NSLocalizedString("Send Crash Reports", tableName: "Cliqz", comment: "[Settings] Send Crash Reports")
init(settings: SettingsTableViewController) {
let title = NSLocalizedString("Send Crash Reports", tableName: "Cliqz", comment: "[Settings] Send Crash Reports")
super.init(settings: settings, title: title)
}

override func isOn() -> Bool {
@@ -34,10 +34,6 @@ class CliqzTabLocationView: TabLocationView {
return videoDownloadButton
}()

required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}

override init(frame: CGRect) {
super.init(frame: frame)
addSubview(videoDownloadButton)
@@ -50,14 +46,17 @@ class CliqzTabLocationView: TabLocationView {
lockImageView.tintColor = UIColor.black
}

required init(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}

override func updateConstraints() {
super.updateConstraints()
urlTextField.snp.remakeConstraints { make in
make.top.bottom.equalTo(self)

if lockImageView.isHidden {
make.leading.equalTo(self).offset(TabLocationViewUX.LocationContentInset)
make.leading.equalTo(self).offset(TabLocationViewUX.Spacing)
} else {
make.leading.equalTo(self.lockImageView.snp.trailing).offset(TabLocationViewUX.URLBarPadding)
}

0 comments on commit 4149659

Please sign in to comment.