Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swift Package Manager and M1 Support #9507

Merged
merged 85 commits into from
Jan 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
e5f6acf
move app services to swift packages
skhamis Oct 7, 2021
59e72df
added references to specific components to compile
skhamis Oct 12, 2021
7acc889
fixed dependency issues
skhamis Oct 12, 2021
e54052a
switched to repo and updated glean script
skhamis Oct 13, 2021
52353e7
fixed test dependecies
skhamis Oct 13, 2021
44bb75f
added sdk_generator.sh to repo and removed references to getting it f…
skhamis Oct 14, 2021
59408d3
fix merge conflict
skhamis Oct 22, 2021
7ca2ef6
bumped a-s version to include glean metrics
skhamis Oct 26, 2021
ded1e82
remove bitrise step for moving, copying sdk_generator
skhamis Nov 15, 2021
f86b7b7
simplify & depedency with RustLog
skhamis Nov 15, 2021
2a5707d
simplify deps to funnel through Shared lib
skhamis Nov 16, 2021
9508a8c
cleaned & fixed loose references
skhamis Nov 18, 2021
4fa81d1
adjust new test to use glean instead of umbrella header
skhamis Nov 18, 2021
3c73973
move appservices to its own target
skhamis Nov 19, 2021
97b6c47
fixed tests deps, removed cycle deps
skhamis Nov 19, 2021
898bea7
removed accidental homebrew
skhamis Nov 19, 2021
3063fb8
hybrid approach with SPM and Carthage that is working only on simulator
nbhasin2 Jan 6, 2022
9e53bc5
Moved GCDWebServer to SPM
nbhasin2 Jan 7, 2022
59cfcf2
- Moved KIF from Carthage to SPM
nbhasin2 Jan 7, 2022
9e8cfb0
- Added Glean separately
nbhasin2 Jan 7, 2022
c8a86db
Merge branch 'main' into nb/spm_partial
nbhasin2 Jan 8, 2022
1fbd84d
moved copy bundle resolure
nbhasin2 Jan 9, 2022
49a9164
temp commit - 1
nbhasin2 Jan 10, 2022
9d81bf5
temp commit -2: added fxa client to copy framework
nbhasin2 Jan 10, 2022
b6dcc96
temp commit -3: added missing info plist
nbhasin2 Jan 10, 2022
9510aa8
temp commit -4: cleanup
nbhasin2 Jan 10, 2022
dd8527f
temp commit -5: Disable find implicit dependency and Manual order in …
nbhasin2 Jan 10, 2022
bbec326
temp commit -6: removed Shared and Sync framework dependency from Cre…
nbhasin2 Jan 10, 2022
e615b20
Revert "temp commit -6: removed Shared and Sync framework dependency …
nbhasin2 Jan 10, 2022
15b18c0
temp commit -7: cleanup of names and added RUST
nbhasin2 Jan 10, 2022
31122e6
test updating r-c-s to use sync15 as a target (#9753)
skhamis Jan 11, 2022
24e7640
Temp commit -9: Removed Sync15 and modified rust places, login, and p…
nbhasin2 Jan 11, 2022
38fc217
temp commit -9: removed credential provider dependency
nbhasin2 Jan 11, 2022
037e345
temp commit -10: Firefox Beta implicit dependency is set to False (No)
nbhasin2 Jan 11, 2022
95d9bdb
temp commit -11: Parallel build and implicit dependency set to true
nbhasin2 Jan 12, 2022
d385168
temo commit -12: Added Credential Provider as dependency to Client
nbhasin2 Jan 12, 2022
46069ff
temp commit -13: Added runscript to remove framework from extension
nbhasin2 Jan 12, 2022
3265093
temp commit -14: removed swift keychain dependency from RustFxAClient
nbhasin2 Jan 12, 2022
77183dd
temp commit -15: updated rust components so that it doesn't include s…
nbhasin2 Jan 12, 2022
93ed431
temp commit -16: info.plist cleanup
nbhasin2 Jan 13, 2022
a71c8f3
temp commit -17: Removed appServices unlinked framework
nbhasin2 Jan 13, 2022
84ee745
temp commit -18: Removed EarlGrey, Leanplum and Telemetry unlinked fr…
nbhasin2 Jan 13, 2022
2602003
temp commit -19: Rust framework info plist cleanup
nbhasin2 Jan 13, 2022
e169374
temp commit -20: Rust framework info plist cleanup part 2 and mark it…
nbhasin2 Jan 13, 2022
9a9c262
temp commit -21: Rust framework info plist cleanup part 3
nbhasin2 Jan 13, 2022
8294014
temp commit -22: Rust framework info plist cleanup part 4
nbhasin2 Jan 13, 2022
1971481
temp commit -23: Added swiftkeychain wrapper back to RustFxAClient an…
nbhasin2 Jan 13, 2022
85e0098
temp commit -24: Added AdjustSDK
nbhasin2 Jan 13, 2022
690a80f
temp commit -25: Trying out a workaround script (maybe solution)
nbhasin2 Jan 17, 2022
9c5998f
temp commit -26: Added Sentry via spm and removed from carthage. (see…
nbhasin2 Jan 18, 2022
e46becd
temp commit -27: Added Snapkit via spm and removed from carthage. (se…
nbhasin2 Jan 18, 2022
3c0083f
temp commit -28: Added SDWebImage via spm and removed from carthage. …
nbhasin2 Jan 18, 2022
7347ca7
temp commit -29: Carthage cleanup for removing sdwebimage
nbhasin2 Jan 18, 2022
0b0c27f
temp commit -30: Carthage resolved cleanup for sentry, snapkit and sd…
nbhasin2 Jan 18, 2022
0af7422
temp commit -31: Added XCGlogger via spm and removed from carthage. (…
nbhasin2 Jan 18, 2022
0fdf65a
temp commit -32: Added Fuzi via spm and removed from carthage. (see n…
nbhasin2 Jan 18, 2022
446e051
temp commit -33: Fixed info.plist path for Snapkit, SDWebimage and XC…
nbhasin2 Jan 18, 2022
d9aee5a
temp commit -34: Removed 1Password Dependency (See IMPT note)
nbhasin2 Jan 18, 2022
73a6f8d
temp commit -35: [ONLY FOR TESTING] Disabled Mappamundi and A-Star in…
nbhasin2 Jan 18, 2022
68b9888
temp commit -36: [Breaking Change - Review me] Fixed content blocker …
nbhasin2 Jan 18, 2022
51169e9
temp commit -37: updated gitignore to ignore shavar prod list
nbhasin2 Jan 18, 2022
3e9dd50
temp commit -38: Added ObjcExceptionBridging where required
nbhasin2 Jan 18, 2022
fe24f6d
temp commit -39: Added Fuzi to copy frameworks path and XClogger Objc…
nbhasin2 Jan 18, 2022
960f285
temp commit -40: Remove swiftkeychain wrapper and added it as part of…
nbhasin2 Jan 20, 2022
78a75b0
temp commit -41: Temporarily adding carthage files for BR to build bu…
nbhasin2 Jan 20, 2022
2498ca1
temp commit -42: Minor improvements to temporarily adding carthage fi…
nbhasin2 Jan 20, 2022
a31c794
temp commit -43: Trying to fix multiple produce issue from ObjcExcept…
nbhasin2 Jan 21, 2022
d2e320e
emp commit -44: Part 2 - Trying to fix multiple produce issue from Ob…
nbhasin2 Jan 21, 2022
93daaf5
temp commit -45: Made M1 simulator work
nbhasin2 Jan 22, 2022
d09cc6a
temp commit -46: Fixing duplicate dependency by removing objcExceptio…
nbhasin2 Jan 22, 2022
5592367
temp commit -47: Removed snapkit from embedded frameworks where it wa…
nbhasin2 Jan 22, 2022
ebdf8c3
temp commit -48: Updated Firefox scheme to have parallel buildables a…
nbhasin2 Jan 24, 2022
13178d4
temp commit -49: Removed carthage completely, still need to update Bi…
nbhasin2 Jan 25, 2022
c255db4
temp commit -50: Added mappamundi package to XCUITests target
nbhasin2 Jan 25, 2022
572b24f
temp commit -51: Commented MMTest for now
nbhasin2 Jan 25, 2022
6034460
temp commit -52: Re-added sync15 so that it can be imported for `sync…
nbhasin2 Jan 25, 2022
022d89e
Merge branch 'main' into spm
nbhasin2 Jan 26, 2022
c576547
temp commit -53: Removed stale 1password related code. If required we…
nbhasin2 Jan 26, 2022
63bc5d1
temp commit -54: Updated Bitrise with SPM flavours of prod, beta and …
nbhasin2 Jan 26, 2022
a53fdbb
Fixed breaking changes from places uniffication (#9734)
lougeniaC64 Jan 27, 2022
1ea6ed8
temp commit -55: Updated Glean package to 43.0.2 (latest)
nbhasin2 Jan 27, 2022
4a54df8
temp commit -56: Updated A~S v90.0.2 (main branch) and added Client /…
nbhasin2 Jan 31, 2022
c518a56
temp commit -57: Added places and sdwebimage framework to XCUitest
nbhasin2 Jan 31, 2022
581e3ed
temp commit -58: updated readme
nbhasin2 Jan 31, 2022
c7d0e32
Merge branch 'main' into spm
nbhasin2 Jan 31, 2022
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
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,4 @@ Client/Assets/*.js.LICENSE.txt
# L10n
/firefoxios-l10n
/ios-l10n-scripts

# Glean
sdk_generator.sh
/shavar-prod-lists
6 changes: 3 additions & 3 deletions Account/FxAPushMessageHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import Shared
import SwiftyJSON
import SyncTelemetry
import Account
import SwiftKeychainWrapper
import os.log
import FxAClient

private let log = Logger.syncLogger

Expand All @@ -31,7 +31,7 @@ extension FxAPushMessageHandler {
/// This method then decrypts it according to the content-encoding (aes128gcm or aesgcm)
/// and then effects changes on the logged in account.
@discardableResult func handle(userInfo: [AnyHashable: Any]) -> PushMessageResult {
let keychain = KeychainWrapper.sharedAppContainerKeychain
let keychain = MZKeychainWrapper.sharedClientAppContainerKeychain
guard let pushReg = keychain.object(forKey: KeychainKey.fxaPushRegistration) as? PushRegistration else {
return deferMaybe(PushMessageError.accountError)
}
Expand All @@ -57,7 +57,7 @@ extension FxAPushMessageHandler {

guard let string = plaintext else {
// The app will detect this missing, and re-register. see AppDelegate+PushNotifications.swift.
keychain.removeObject(forKey: KeychainKey.apnsToken, withAccessibility: .afterFirstUnlock)
keychain.removeObject(forKey: KeychainKey.apnsToken, withAccessibility: MZKeychainItemAccessibility.afterFirstUnlock)
return deferMaybe(PushMessageError.notDecrypted)
}

Expand Down
2 changes: 1 addition & 1 deletion Account/SyncAuthState.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Foundation
import Shared
import XCGLogger
import SwiftyJSON
import MozillaAppServices
import FxAClient


public let FxAClientErrorDomain = "org.mozilla.fxa.error"
Expand Down
16 changes: 0 additions & 16 deletions Cartfile

This file was deleted.

16 changes: 0 additions & 16 deletions Cartfile.resolved

This file was deleted.

2,797 changes: 2,394 additions & 403 deletions 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
@@ -1,14 +1,140 @@
{
"object": {
"pins": [
{
"package": "AStar",
"repositoryURL": "https://github.com/Dev1an/A-Star",
"state": {
"branch": null,
"revision": "036256f9a8d1dda44085a2b92fa58199446a8339",
"version": "3.0.0-beta-1"
}
},
{
"package": "Fuzi",
"repositoryURL": "https://github.com/nbhasin2/Fuzi.git",
"state": {
"branch": "master",
"revision": "04170682baf5c013a41270963c689c87ba0d1374",
"version": null
}
},
{
"package": "GCDWebServer",
"repositoryURL": "https://github.com/nbhasin2/GCDWebServer.git",
"state": {
"branch": "master",
"revision": "14f9eedb296c5b71fec971d8256ef3bfc20a2245",
"version": null
}
},
{
"package": "Glean",
"repositoryURL": "https://github.com/mozilla/glean-swift",
"state": {
"branch": null,
"revision": "e8fef341610de380b55cd5a057f9a3adf7cebb44",
"version": "43.0.2"
}
},
{
"package": "Adjust",
"repositoryURL": "https://github.com/adjust/ios_sdk",
"repositoryURL": "https://github.com/adjust/ios_sdk.git",
"state": {
"branch": null,
"revision": "43c5bb5eb8f77c72da856637dac5c46087c27848",
"version": "4.29.6"
}
},
{
"package": "KIF",
"repositoryURL": "https://github.com/kif-framework/KIF.git",
"state": {
"branch": null,
"revision": "709adbc64f2d8d40d48136cdd56b0a706010904b",
"version": "3.8.6"
}
},
{
"package": "MappaMundi",
"repositoryURL": "https://github.com/nbhasin2/MappaMundi.git",
"state": {
"branch": "master",
"revision": "7fcd2b7910550227088480490ac19ea66044b3d1",
"version": null
}
},
{
"package": "MozillaRustComponentsSwift",
"repositoryURL": "https://github.com/skhamis/rust-components-swift",
"state": {
"branch": "update-for-fxios",
"revision": "1f1aba21157b0da730a5f3c7029bfca448cbec5e",
"version": null
}
},
{
"package": "SDWebImage",
"repositoryURL": "https://github.com/SDWebImage/SDWebImage.git",
"state": {
"branch": null,
"revision": "7ef9a314b12c1a31edb0d09d41fcba93143fe772",
"version": "5.4.0"
}
},
{
"package": "Sentry",
"repositoryURL": "https://github.com/getsentry/sentry-cocoa.git",
"state": {
"branch": null,
"revision": "bb3c1d852980432907cd314e4fa984fc9a78c9f3",
"version": "4.4.3"
}
},
{
"package": "SnapKit",
"repositoryURL": "https://github.com/SnapKit/SnapKit.git",
"state": {
"branch": null,
"revision": "d458564516e5676af9c70b4f4b2a9178294f1bc6",
"version": "5.0.1"
}
},
{
"package": "SwiftProtobuf",
"repositoryURL": "https://github.com/apple/swift-protobuf.git",
"state": {
"branch": null,
"revision": "7e2c5f3cbbeea68e004915e3a8961e20bd11d824",
"version": "1.18.0"
}
},
{
"package": "SwiftyJSON",
"repositoryURL": "https://github.com/SwiftyJSON/SwiftyJSON",
"state": {
"branch": null,
"revision": "b3dcd7dbd0d488e1a7077cb33b00f2083e382f07",
"version": "5.0.1"
}
},
{
"package": "Telemetry",
"repositoryURL": "https://github.com/mozilla-mobile/telemetry-ios",
"state": {
"branch": null,
"revision": "68f2d813320c9fda2fb4aee4548c64293500200a",
"version": "2.0.0"
}
},
{
"package": "XCGLogger",
"repositoryURL": "https://github.com/DaveWoodCom/XCGLogger.git",
"state": {
"branch": null,
"revision": "a9c4667b247928a29bdd41be2ec2c8d304215a54",
"version": "7.0.1"
}
}
]
},
Expand Down
26 changes: 11 additions & 15 deletions Client.xcodeproj/xcshareddata/xcschemes/Firefox.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,18 @@
buildConfiguration = "Firefox"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
language = "en"
region = "US"
shouldUseLaunchSchemeArgsEnv = "YES">
region = "US">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F84B21BD1A090F8100AAB793"
BuildableName = "Client.app"
BlueprintName = "Client"
ReferencedContainer = "container:Client.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
Expand Down Expand Up @@ -134,17 +143,6 @@
</SkippedTests>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F84B21BD1A090F8100AAB793"
BuildableName = "Client.app"
BlueprintName = "Client"
ReferencedContainer = "container:Client.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Firefox"
Expand Down Expand Up @@ -173,8 +171,6 @@
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Firefox"
Expand Down
28 changes: 12 additions & 16 deletions Client.xcodeproj/xcshareddata/xcschemes/FirefoxBeta.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "NO"
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
Expand All @@ -26,9 +26,18 @@
buildConfiguration = "FirefoxBeta"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
language = "en"
region = "US"
shouldUseLaunchSchemeArgsEnv = "YES">
region = "US">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F84B21BD1A090F8100AAB793"
BuildableName = "Client.app"
BlueprintName = "Client"
ReferencedContainer = "container:Client.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
Expand Down Expand Up @@ -134,17 +143,6 @@
</SkippedTests>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F84B21BD1A090F8100AAB793"
BuildableName = "Client.app"
BlueprintName = "Client"
ReferencedContainer = "container:Client.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "FirefoxBeta"
Expand Down Expand Up @@ -173,8 +171,6 @@
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "FirefoxBeta"
Expand Down
8 changes: 4 additions & 4 deletions Client/Application/AppDelegate+PushNotifications.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Sync
import XCGLogger
import UserNotifications
import Account
import SwiftKeychainWrapper
import FxAClient

private let log = Logger.browserLogger

Expand Down Expand Up @@ -52,7 +52,7 @@ extension AppDelegate {
NotificationCenter.default.addObserver(forName: .constellationStateUpdate, object: nil, queue: nil) { notification in
if let newState = notification.userInfo?["newState"] as? ConstellationState {
if newState.localDevice?.pushEndpointExpired ?? false {
KeychainWrapper.sharedAppContainerKeychain.removeObject(forKey: KeychainKey.apnsToken, withAccessibility: .afterFirstUnlock)
MZKeychainWrapper.sharedClientAppContainerKeychain.removeObject(forKey: KeychainKey.apnsToken, withAccessibility: MZKeychainItemAccessibility.afterFirstUnlock)
NotificationCenter.default.post(name: .RegisterForPushNotifications, object: nil)
}
}
Expand All @@ -61,8 +61,8 @@ extension AppDelegate {
// Use sync event as a periodic check for the apnsToken.
// The notification service extension can clear this token if there is an error, and the main app can detect this and re-register.
NotificationCenter.default.addObserver(forName: .ProfileDidStartSyncing, object: nil, queue: .main) { _ in
let kc = KeychainWrapper.sharedAppContainerKeychain
if kc.object(forKey: KeychainKey.apnsToken, withAccessibility: .afterFirstUnlock) == nil {
let kc = MZKeychainWrapper.sharedClientAppContainerKeychain
if kc.object(forKey: KeychainKey.apnsToken, withAccessibility: MZKeychainItemAccessibility.afterFirstUnlock) == nil {
NotificationCenter.default.post(name: .RegisterForPushNotifications, object: nil)
}
}
Expand Down
1 change: 0 additions & 1 deletion Client/Application/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import AVFoundation
import XCGLogger
import MessageUI
import SDWebImage
import SwiftKeychainWrapper
import SyncTelemetry
import LocalAuthentication
import SyncTelemetry
Expand Down
2 changes: 1 addition & 1 deletion Client/Application/NavigationRouter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import Foundation
import Shared
import MozillaAppServices
import Glean

struct FxALaunchParams {
var query: [String: String]
Expand Down
1 change: 0 additions & 1 deletion Client/Configuration/Common.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ DEVELOPMENT_TEAM = 43AQ936H96
ENABLE_BITCODE = NO
ENABLE_TESTABILITY = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
FRAMEWORK_SEARCH_PATHS = $(PROJECT_DIR)/Carthage/Build/iOS
GCC_DYNAMIC_NO_PIC = NO;
HEADER_SEARCH_PATHS = $(inherited) /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include $(SRCROOT) $(SDKROOT)/usr/include/libxml2
INCLUDE_SETTINGS_BUNDLE = NO
Expand Down
2 changes: 1 addition & 1 deletion Client/Experiments/Experiments.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0

import Foundation
import MozillaAppServices
import Nimbus
import Shared
import XCGLogger

Expand Down
Loading