Skip to content
Merged
Show file tree
Hide file tree
Changes from 81 commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
1305eff
remove redundant argument
caldrian Jan 28, 2026
09ebe6c
clean up unused code
caldrian Jan 28, 2026
5843473
some renaming
caldrian Jan 28, 2026
00eb258
prepare for refactoring
caldrian Jan 28, 2026
96fc35a
remove unused code
caldrian Jan 28, 2026
4e4cf14
start migrating SearchTask to Swift Concurrency
caldrian Jan 28, 2026
93c6687
don't send empty search requests
caldrian Jan 28, 2026
2f72db4
some more cleanup
caldrian Jan 28, 2026
f7a594f
add note
caldrian Jan 28, 2026
93c2a54
refactoring
caldrian Jan 29, 2026
f5b2e87
minor fix
caldrian Jan 29, 2026
6ac778f
note
caldrian Jan 30, 2026
63898f4
Merge branch 'develop' of github.com:wireapp/wire-ios into chore/repl…
caldrian Jan 30, 2026
a287b76
prepare for isolating search subtasks
caldrian Jan 30, 2026
1e0cb6f
migrate performRemoteSearchForServices
caldrian Jan 30, 2026
7784c55
migrate performLocalLookup
caldrian Jan 30, 2026
23c3923
migrate performLocalSearch
caldrian Jan 30, 2026
b590360
migrate performRemoteSearchForTeamUser
caldrian Jan 30, 2026
14627e3
migrate performTeamMembershipLookup
caldrian Jan 30, 2026
1790d7b
migrate performUserLookup
caldrian Jan 30, 2026
a381efd
minor fix
caldrian Jan 30, 2026
b801764
some cleanup
caldrian Jan 30, 2026
22a43b3
some cleanup, add notes
caldrian Jan 30, 2026
8ddbf74
add guard let self
caldrian Feb 2, 2026
7f2baf7
rename local result variables
caldrian Feb 2, 2026
e14a0c5
rename member variable result
caldrian Feb 2, 2026
2d8616f
add guard let self
caldrian Feb 2, 2026
fe96e5b
format code
caldrian Feb 2, 2026
5354345
Merge branch 'develop' of github.com:wireapp/wire-ios into chore/impr…
caldrian Feb 2, 2026
91fa5a0
Merge branch 'chore/improve-code-readability-WPB-20362' into chore/re…
caldrian Feb 2, 2026
f6969a1
attempt to fix build errors
caldrian Feb 2, 2026
a6d81e1
minor fix
caldrian Feb 2, 2026
63f647a
remove unused code
caldrian Feb 2, 2026
596b7d1
minor change
caldrian Feb 2, 2026
f7c96a4
Merge branch 'chore/improve-code-readability-WPB-20362' into chore/re…
caldrian Feb 2, 2026
2aa37e6
remove unused code
caldrian Feb 2, 2026
60e932a
remove comment
caldrian Feb 2, 2026
290b40b
revert some changes
caldrian Feb 2, 2026
9ad0541
escape plus character in query items
caldrian Feb 2, 2026
333369c
fix one test
caldrian Feb 2, 2026
0634115
Merge branch 'chore/improve-code-readability-WPB-20362' into chore/re…
caldrian Feb 2, 2026
7a9b596
add async throws
caldrian Feb 2, 2026
5ff02d7
chore: improve code readability of SearchTask.swift - WPB-20362 (#4241)
caldrian Feb 2, 2026
8ba8e98
Merge remote-tracking branch 'github/gh-readonly-queue/develop/pr-424…
caldrian Feb 2, 2026
5da848e
Merge branch 'chore/improve-code-readability-WPB-20362' into chore/re…
caldrian Feb 2, 2026
a05c7ed
fix another test
caldrian Feb 2, 2026
89357c2
fix some tests
caldrian Feb 2, 2026
b615da1
partially fix SearchTaskTests
caldrian Feb 2, 2026
7365013
Merge remote-tracking branch 'github/gh-readonly-queue/develop/pr-424…
caldrian Feb 2, 2026
ebca331
uncomment code
caldrian Feb 2, 2026
e4b92ba
Merge branch 'chore/improve-code-readability-WPB-20362' into chore/re…
caldrian Feb 2, 2026
9ad2748
fix crashes
caldrian Feb 2, 2026
eae2185
fix more tests
caldrian Feb 2, 2026
70ea913
format code
caldrian Feb 2, 2026
05ed094
delete ContextProvider.searchContext
caldrian Feb 2, 2026
45ac179
fix build errors in WireSyncEngine
caldrian Feb 2, 2026
9e23597
add notes
caldrian Feb 2, 2026
3c94a08
several fixes
caldrian Feb 2, 2026
bfbe31f
minor fixes
caldrian Feb 3, 2026
d03e77a
add debugging output
caldrian Feb 3, 2026
cc6b255
typo
caldrian Feb 3, 2026
76d7560
Merge branch 'develop' of github.com:wireapp/wire-ios into chore/dele…
caldrian Feb 3, 2026
ffe95b7
add note
caldrian Feb 3, 2026
bc95f36
fix build error
caldrian Feb 3, 2026
cae02ce
Revert "add debugging output"
caldrian Feb 3, 2026
3bc6a9d
remove unused code
caldrian Feb 3, 2026
b0ca485
fix build errors in sync engine
caldrian Feb 3, 2026
1f2192e
fix build errors in wire-ios
caldrian Feb 3, 2026
7295e04
remove ZMUser.selfUser(inUserSession:)
caldrian Feb 3, 2026
6e22fe1
Merge branch 'chore/delete-zmselfuser-inusersession-WPB-20362' into c…
caldrian Feb 3, 2026
18b47db
Trigger CI
caldrian Feb 3, 2026
75f527f
revert change
caldrian Feb 4, 2026
ea8cf2b
Merge branch 'chore/delete-zmselfuser-inusersession-WPB-20362' into c…
caldrian Feb 4, 2026
440d668
Merge branch 'develop' of github.com:wireapp/wire-ios into chore/refa…
caldrian Feb 4, 2026
c2b8c2a
clean up searchMOC properties
caldrian Feb 4, 2026
aae73ce
Merge branch 'chore/delete-search-context-WPB-20362' into chore/refac…
caldrian Feb 4, 2026
471d2c1
fix merge conflicts
caldrian Feb 4, 2026
4138780
fix API violation
caldrian Feb 4, 2026
9078d19
fix comment
caldrian Feb 4, 2026
f5b16d1
remove comments
caldrian Feb 4, 2026
99c9312
resolve TODOs
caldrian Feb 4, 2026
3b9e4be
Merge remote-tracking branch 'github/gh-readonly-queue/develop/pr-426…
caldrian Feb 4, 2026
af607dd
Merge branch 'chore/delete-zmselfuser-inusersession-WPB-20362' into c…
caldrian Feb 4, 2026
c9bbcf8
Merge branch 'develop' of github.com:wireapp/wire-ios into chore/dele…
caldrian Feb 6, 2026
654fcfe
Merge remote-tracking branch 'github/gh-readonly-queue/develop/pr-424…
caldrian Feb 6, 2026
d40857e
Merge branch 'chore/delete-search-context-WPB-20362' into chore/refac…
caldrian Feb 6, 2026
33d0b06
add cancellation
caldrian Feb 6, 2026
6a885cb
revert changes
caldrian Feb 6, 2026
c1afe5c
fix issue
caldrian Feb 6, 2026
b419e16
fix build error
caldrian Feb 6, 2026
9b89654
Merge branch 'develop' of github.com:wireapp/wire-ios into chore/refa…
caldrian Feb 6, 2026
6e552f0
Merge branch 'develop' of github.com:wireapp/wire-ios into chore/refa…
caldrian Feb 6, 2026
146d288
Merge branch 'develop' of github.com:wireapp/wire-ios into chore/refa…
caldrian Feb 9, 2026
80ecd07
Merge branch 'develop' into chore/refactor-searchtask-WPB-20362
caldrian Feb 10, 2026
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
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
var viewContext: NSManagedObjectContext { get }
func newBackgroundContext() -> NSManagedObjectContext
var syncContext: NSManagedObjectContext { get }
var searchContext: NSManagedObjectContext { get }
var eventContext: NSManagedObjectContext { get }

}
Expand Down Expand Up @@ -138,8 +137,6 @@
return context
}()

public lazy var searchContext: NSManagedObjectContext = messagesContainer.newBackgroundContext()

public lazy var eventContext: NSManagedObjectContext = eventsContainer.newBackgroundContext()

public let accountContainer: URL
Expand Down Expand Up @@ -253,7 +250,6 @@

viewContext.tearDown()
syncContext.tearDown()
searchContext.tearDown()
eventContext.tearDown()
closeStores()
}
Expand Down Expand Up @@ -311,7 +307,6 @@
await configureContextReferences()
await configureViewContext(viewContext)
await configureSyncContext(syncContext)
await configureSearchContext(searchContext)

} catch {
WireLogger.localStorage.critical(
Expand Down Expand Up @@ -374,7 +369,7 @@

func configureViewContext(_ context: NSManagedObjectContext) async {
context.markAsUIContext()
await context.perform {

Check warning on line 372 in wire-ios-data-model/Source/ManagedObjectContext/CoreDataStack.swift

View workflow job for this annotation

GitHub Actions / Test Results

Capture of 'self' with non-Sendable type 'CoreDataStack' in a '@Sendable' closure

Capture of 'self' with non-Sendable type 'CoreDataStack' in a '@sendable' closure

Check warning on line 372 in wire-ios-data-model/Source/ManagedObjectContext/CoreDataStack.swift

View workflow job for this annotation

GitHub Actions / Test Results

Capture of 'self' with non-Sendable type 'CoreDataStack' in a '@Sendable' closure

Capture of 'self' with non-Sendable type 'CoreDataStack' in a '@sendable' closure
context.localDomain = self.localDomain
context.isFederationEnabled = self.isFederationEnabled
context.createDispatchGroups()
Expand All @@ -386,17 +381,17 @@
}

func configureContextReferences() async {
await viewContext.perform {

Check warning on line 384 in wire-ios-data-model/Source/ManagedObjectContext/CoreDataStack.swift

View workflow job for this annotation

GitHub Actions / Test Results

Capture of 'self' with non-Sendable type 'CoreDataStack' in a '@Sendable' closure

Capture of 'self' with non-Sendable type 'CoreDataStack' in a '@sendable' closure

Check warning on line 384 in wire-ios-data-model/Source/ManagedObjectContext/CoreDataStack.swift

View workflow job for this annotation

GitHub Actions / Test Results

Capture of 'self' with non-Sendable type 'CoreDataStack' in a '@Sendable' closure

Capture of 'self' with non-Sendable type 'CoreDataStack' in a '@sendable' closure
self.viewContext.zm_sync = self.syncContext
}
await syncContext.perform {

Check warning on line 387 in wire-ios-data-model/Source/ManagedObjectContext/CoreDataStack.swift

View workflow job for this annotation

GitHub Actions / Test Results

Capture of 'self' with non-Sendable type 'CoreDataStack' in a '@Sendable' closure

Capture of 'self' with non-Sendable type 'CoreDataStack' in a '@sendable' closure

Check warning on line 387 in wire-ios-data-model/Source/ManagedObjectContext/CoreDataStack.swift

View workflow job for this annotation

GitHub Actions / Test Results

Capture of 'self' with non-Sendable type 'CoreDataStack' in a '@Sendable' closure

Capture of 'self' with non-Sendable type 'CoreDataStack' in a '@sendable' closure
self.syncContext.zm_userInterface = self.viewContext
}
}

func configureSyncContext(_ context: NSManagedObjectContext) async {
// Note: markAsSyncContext() is now called in the lazy initializer
await context.perform {

Check warning on line 394 in wire-ios-data-model/Source/ManagedObjectContext/CoreDataStack.swift

View workflow job for this annotation

GitHub Actions / Test Results

Capture of 'self' with non-Sendable type 'CoreDataStack' in a '@Sendable' closure

Capture of 'self' with non-Sendable type 'CoreDataStack' in a '@sendable' closure

Check warning on line 394 in wire-ios-data-model/Source/ManagedObjectContext/CoreDataStack.swift

View workflow job for this annotation

GitHub Actions / Test Results

Capture of 'self' with non-Sendable type 'CoreDataStack' in a '@Sendable' closure

Capture of 'self' with non-Sendable type 'CoreDataStack' in a '@sendable' closure
context.localDomain = self.localDomain
context.isFederationEnabled = self.isFederationEnabled
context.createDispatchGroups()
Expand All @@ -413,22 +408,9 @@
}
}

func configureSearchContext(_ context: NSManagedObjectContext) async {
context.markAsSearch()
await context.perform {
context.localDomain = self.localDomain
context.isFederationEnabled = self.isFederationEnabled
context.createDispatchGroups()
self.dispatchGroup.map(context.addGroup(_:))
context.setupLocalCachedSessionAndSelfUser()
context.undoManager = nil
context.mergePolicy = NSMergePolicy(merge: .rollbackMergePolicyType)
}
}

func configureEventContext(_ context: NSManagedObjectContext) async {
await context.perform {
context.createDispatchGroups()

Check warning on line 413 in wire-ios-data-model/Source/ManagedObjectContext/CoreDataStack.swift

View workflow job for this annotation

GitHub Actions / Test Results

Capture of 'self' with non-Sendable type 'CoreDataStack' in a '@Sendable' closure

Capture of 'self' with non-Sendable type 'CoreDataStack' in a '@sendable' closure

Check warning on line 413 in wire-ios-data-model/Source/ManagedObjectContext/CoreDataStack.swift

View workflow job for this annotation

GitHub Actions / Test Results

Capture of 'self' with non-Sendable type 'CoreDataStack' in a '@Sendable' closure

Capture of 'self' with non-Sendable type 'CoreDataStack' in a '@sendable' closure
self.dispatchGroup.map(context.addGroup(_:))
}
}
Expand Down Expand Up @@ -557,7 +539,7 @@
}

// MARK: -

Check warning on line 542 in wire-ios-data-model/Source/ManagedObjectContext/CoreDataStack.swift

View workflow job for this annotation

GitHub Actions / Test Results

Class 'PersistentContainer' must restate inherited '@unchecked Sendable' conformance

Class 'PersistentContainer' must restate inherited '@unchecked Sendable' conformance

Check warning on line 542 in wire-ios-data-model/Source/ManagedObjectContext/CoreDataStack.swift

View workflow job for this annotation

GitHub Actions / Test Results

Class 'PersistentContainer' must restate inherited '@unchecked Sendable' conformance

Class 'PersistentContainer' must restate inherited '@unchecked Sendable' conformance
public class PersistentContainer: NSPersistentContainer {

var storeURL: URL? {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
@interface NSManagedObjectContext (zmessagingTests)

- (void)markAsSyncContext;
- (void)markAsSearchContext;
- (void)markAsUIContext;
- (void)disableObjectRefresh;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

extern NSString * _Nonnull const IsUserInterfaceContextKey;
extern NSString * _Nonnull const IsSyncContextKey;
extern NSString * _Nonnull const IsSearchContextKey;
extern NSString * _Nonnull const IsEventContextKey;

@interface NSManagedObjectContext (zmessaging)
Expand All @@ -37,9 +36,6 @@ extern NSString * _Nonnull const IsEventContextKey;
/// Inverse of @c zm_isSyncContext
@property (readonly) BOOL zm_isUserInterfaceContext;

/// Returns @c YES if the receiver is a context that is used for searching.
@property (readonly) BOOL zm_isSearchContext;

/// Returns @c YES if the context should refresh objects following the policy for the sync context
@property (readonly) BOOL zm_shouldRefreshObjectsWithSyncContextPolicy;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#import <WireDataModel/WireDataModel-Swift.h>

NSString * const IsSyncContextKey = @"ZMIsSyncContext";
NSString * const IsSearchContextKey = @"ZMIsSearchContext";
NSString * const IsUserInterfaceContextKey = @"ZMIsUserInterfaceContext";
NSString * const IsEventContextKey = @"ZMIsEventDecoderContext";

Expand Down Expand Up @@ -88,7 +87,7 @@ @implementation NSManagedObjectContext (zmessaging)

- (BOOL)zm_isValidContext
{
return self.zm_isSyncContext || self.zm_isUserInterfaceContext || self.zm_isSearchContext;
return self.zm_isSyncContext || self.zm_isUserInterfaceContext;
}

- (id)validUserInfoValueOfClass:(Class)class forKey:(NSString *)key
Expand Down Expand Up @@ -128,11 +127,6 @@ - (BOOL)zm_isUserInterfaceContext
return [[self validUserInfoValueOfClass:[NSNumber class] forKey:IsUserInterfaceContextKey] boolValue];
}

- (BOOL)zm_isSearchContext
{
return [self.userInfo[IsSearchContextKey] boolValue];
}

- (NSManagedObjectContext*)zm_syncContext
{
if (self.zm_isSyncContext) {
Expand Down Expand Up @@ -539,13 +533,6 @@ - (void)markAsSyncContext;
}];
}

- (void)markAsSearchContext;
{
[self performBlockAndWait:^{
self.userInfo[IsSearchContextKey] = @YES;
}];
}

- (void)markAsUIContext
{
[self performBlockAndWait:^{
Expand All @@ -558,7 +545,6 @@ - (void)resetContextType
[self performBlockAndWait:^{
self.userInfo[IsSyncContextKey] = @NO;
self.userInfo[IsUserInterfaceContextKey] = @NO;
self.userInfo[IsSearchContextKey] = @NO;
}];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
// along with this program. If not, see http://www.gnu.org/licenses/.
//

import Foundation

extension UserType {

func isFederating(with otherUser: UserType) -> Bool {
Expand Down
36 changes: 16 additions & 20 deletions wire-ios-data-model/Source/Model/User/ZMSearchUser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public class ZMSearchUser: NSObject, UserType {
user?.objectId ?? remoteIdentifier!
}

fileprivate weak var contextProvider: ContextProvider?
fileprivate weak var viewContext: NSManagedObjectContext?
private let searchUsersCache: SearchUsersCache?

fileprivate var internalDomain: String?
Expand Down Expand Up @@ -162,16 +162,12 @@ public class ZMSearchUser: NSObject, UserType {
}

public var isFederated: Bool {
guard let contextProvider else {
return false
}

return ZMUser.selfUser(inUserSession: contextProvider).isFederating(with: self)
guard let viewContext else { return false }
return ZMUser.selfUser(in: viewContext).isFederating(with: self)
}

public var isSelfUser: Bool {
guard let user else { return false }

return user.isSelfUser
}

Expand Down Expand Up @@ -265,8 +261,8 @@ public class ZMSearchUser: NSObject, UserType {
}

public var oneToOneConversation: ZMConversation? {
if isTeamMember, let uiContext = contextProvider?.viewContext {
materialize(in: uiContext)?.oneToOneConversation
if isTeamMember, let viewContext {
materialize(in: viewContext)?.oneToOneConversation
} else {
user?.oneToOneConversation
}
Expand Down Expand Up @@ -482,7 +478,7 @@ public class ZMSearchUser: NSObject, UserType {

@objc
public required init(
contextProvider: ContextProvider,
viewContext: NSManagedObjectContext,
name: String,
handle: String?,
accentColor: ZMAccentColor?,
Expand All @@ -503,10 +499,10 @@ public class ZMSearchUser: NSObject, UserType {
self.internalDomain = domain
self.remoteIdentifier = existingUser?.remoteIdentifier ?? remoteIdentifier
self.teamIdentifier = existingUser?.teamIdentifier ?? teamIdentifier
self.contextProvider = contextProvider
self.viewContext = viewContext
self.searchUsersCache = searchUsersCache

let selfUser = ZMUser.selfUser(inUserSession: contextProvider)
let selfUser = ZMUser.selfUser(in: viewContext)
self.internalIsTeamMember = teamIdentifier != nil && selfUser.teamIdentifier == teamIdentifier
self.internalIsConnected = internalIsTeamMember

Expand All @@ -524,7 +520,7 @@ public class ZMSearchUser: NSObject, UserType {
searchUsersCache: SearchUsersCache?
) {
self.init(
contextProvider: contextProvider,
viewContext: contextProvider.viewContext,
name: user.name ?? "",
handle: user.handle,
accentColor: user.zmAccentColor,
Expand Down Expand Up @@ -556,7 +552,7 @@ public class ZMSearchUser: NSObject, UserType {
let accentColorRawValue = (payload["accent_id"] as? NSNumber)?.int16Value ?? 0

self.init(
contextProvider: contextProvider,
viewContext: contextProvider.viewContext,
name: name,
handle: handle,
accentColor: .from(rawValue: accentColorRawValue) ?? .default,
Expand Down Expand Up @@ -611,7 +607,7 @@ public class ZMSearchUser: NSObject, UserType {
}

public func connect(completion: @escaping (Error?) -> Void) {
let selfUser = ZMUser.selfUser(inUserSession: contextProvider!)
let selfUser = ZMUser.selfUser(in: viewContext!)
selfUser.sendConnectionRequest(to: self) { [weak self] result in
switch result {
case .success:
Expand All @@ -628,7 +624,7 @@ public class ZMSearchUser: NSObject, UserType {
private func updateLocalUser() {
guard
let userID = remoteIdentifier,
let viewContext = contextProvider?.viewContext
let viewContext
else {
return
}
Expand All @@ -637,7 +633,7 @@ public class ZMSearchUser: NSObject, UserType {
}

private func notifySearchUserChanged() {
contextProvider?.viewContext.searchUserObserverCenter.notifyUpdatedSearchUser(self)
viewContext?.searchUserObserverCenter.notifyUpdatedSearchUser(self)
}

public func accept(completion: @escaping (Error?) -> Void) {
Expand Down Expand Up @@ -671,7 +667,7 @@ public class ZMSearchUser: NSObject, UserType {

if let user {
user.requestPreviewProfileImage()
} else if let notificationContext = contextProvider?.viewContext.notificationContext {
} else if let notificationContext = viewContext?.notificationContext {
NotificationInContext(
name: .searchUserDidRequestPreviewAsset,
context: notificationContext,
Expand All @@ -686,7 +682,7 @@ public class ZMSearchUser: NSObject, UserType {

if let user {
user.requestCompleteProfileImage()
} else if let notificationContext = contextProvider?.viewContext.notificationContext {
} else if let notificationContext = viewContext?.notificationContext {
NotificationInContext(
name: .searchUserDidRequestCompleteAsset,
context: notificationContext,
Expand Down Expand Up @@ -731,7 +727,7 @@ public class ZMSearchUser: NSObject, UserType {
internalCompleteImageData = imageData
}

contextProvider?.viewContext.searchUserObserverCenter.notifyUpdatedSearchUser(self)
viewContext?.searchUserObserverCenter.notifyUpdatedSearchUser(self)
}

public func update(from payload: [String: Any]) {
Expand Down
11 changes: 0 additions & 11 deletions wire-ios-data-model/Source/Model/User/ZMUser.m
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
@end



Check warning on line 157 in wire-ios-data-model/Source/Model/User/ZMUser.m

View workflow job for this annotation

GitHub Actions / Test Results

Property 'connectionRequestMessage' requires method 'connectionRequestMessage' to be defined - use @synthesize, @dynamic or provide a method implementation in this class implementation

Property 'connectionRequestMessage' requires method 'connectionRequestMessage' to be defined - use @synthesize, @dynamic or provide a method implementation in this class implementation

Check warning on line 157 in wire-ios-data-model/Source/Model/User/ZMUser.m

View workflow job for this annotation

GitHub Actions / Test Results

Property 'isPendingMetadataRefresh' requires method 'isPendingMetadataRefresh' to be defined - use @synthesize, @dynamic or provide a method implementation in this class implementation

Property 'isPendingMetadataRefresh' requires method 'isPendingMetadataRefresh' to be defined - use @synthesize, @dynamic or provide a method implementation in this class implementation

Check warning on line 157 in wire-ios-data-model/Source/Model/User/ZMUser.m

View workflow job for this annotation

GitHub Actions / Test Results

Property 'isPendingMetadataRefresh' requires method 'setIsPendingMetadataRefresh:' to be defined - use @synthesize, @dynamic or provide a method implementation in this class implementation

Property 'isPendingMetadataRefresh' requires method 'setIsPendingMetadataRefresh:' to be defined - use @synthesize, @dynamic or provide a method implementation in this class implementation
@implementation ZMUser

+ (NSSet<NSString *> *)keyPathsForValuesAffectingIsApp
Expand Down Expand Up @@ -717,17 +717,6 @@
@end


@implementation ZMUser (Utilities)

+ (ZMUser<ZMEditableUserType> *)selfUserInUserSession:(id<ZMContextProvider>)session
{
VerifyReturnNil(session != nil);
return [self selfUserInContext:session.viewContext];
}

@end




@implementation ZMUser (Editable)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ extension NSManagedObjectContext {
}
}

public class SearchUserSnapshot {
public final class SearchUserSnapshot {

/// Keys that we want to be notified for
static let observableKeys: [String] = [
Expand Down
9 changes: 0 additions & 9 deletions wire-ios-data-model/Source/Public/ZMUser.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,6 @@ typedef NS_ENUM(int16_t, ZMBlockState) {
@end


@protocol ZMEditableUserType;

@interface ZMUser (Utilities)

+ (ZMUser<ZMEditableUserType> *_Nonnull)selfUserInUserSession:(id<ZMContextProvider> _Nonnull)session;

@end




@interface ZMUser (Connections)
Expand Down

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 @@ -170,7 +170,7 @@ final class SearchUserObserverCenterTests: ModelObjectsTests {
user: ZMUser? = nil
) -> ZMSearchUser {
ZMSearchUser(
contextProvider: coreDataStack,
viewContext: coreDataStack.viewContext,
name: name,
handle: handle,
accentColor: accentColor,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ final class SearchUserObserverTests: NotificationDispatcherTestBase {
user: ZMUser? = nil
) -> ZMSearchUser {
ZMSearchUser(
contextProvider: coreDataStack,
viewContext: coreDataStack.viewContext,
name: name,
handle: name.lowercased(),
accentColor: .amber,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ final class SearchUserSnapshotTests: ZMBaseManagedObjectTest {
user: ZMUser? = nil
) -> ZMSearchUser {
ZMSearchUser(
contextProvider: coreDataStack,
viewContext: coreDataStack.viewContext,
name: name,
handle: handle,
accentColor: accentColor,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ final class ZMSearchUserTests_Connections: ModelObjectsTests {
func testThatConnectSendsAConnectToUserNotification() {
// given
let searchUser = ZMSearchUser(
contextProvider: coreDataStack,
viewContext: coreDataStack.viewContext,
name: "John Doe",
handle: "johndoe",
accentColor: .turquoise,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ final class ZMSearchUserTests_ProfileImages: ZMBaseManagedObjectTest {
user: ZMUser? = nil
) -> ZMSearchUser {
ZMSearchUser(
contextProvider: coreDataStack,
viewContext: coreDataStack.viewContext,
name: name,
handle: name.lowercased(),
accentColor: .amber,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ final class ZMSearchUserTests_TeamUser: ModelObjectsTests {

private func makeSearchUser(teamIdentifier: UUID?) -> ZMSearchUser {
ZMSearchUser(
contextProvider: coreDataStack,
viewContext: coreDataStack.viewContext,
name: "Foo",
handle: "foo",
accentColor: .amber,
Expand Down
Loading
Loading