From deaec0bd7b87bd6cd9d2c9c3361c5f2a1f96a4e1 Mon Sep 17 00:00:00 2001 From: Ivan Zakharyaschev Date: Tue, 19 Jul 2016 19:15:18 +0300 Subject: [PATCH] An attempt to fix the unrecognized selector exception (by writing the queries analoguously to the other ones) --- ActiveSync/SOGoMailObject+ActiveSync.m | 12 ++++++------ ActiveSync/iCalEvent+ActiveSync.m | 4 ++-- ActiveSync/iCalToDo+ActiveSync.m | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ActiveSync/SOGoMailObject+ActiveSync.m b/ActiveSync/SOGoMailObject+ActiveSync.m index ef8e65593..e0ae53314 100644 --- a/ActiveSync/SOGoMailObject+ActiveSync.m +++ b/ActiveSync/SOGoMailObject+ActiveSync.m @@ -1003,7 +1003,7 @@ struct GlobalObjectId { [s appendFormat: @"%@", [globalObjId activeSyncRepresentationInContext: context]]; // We set the right message type - we must set AS version to 14.1 for this - if ([[context valueForKey: @"ASProtocolVersion"] floatValue] >= 14.1) + if ([[context objectForKey: @"ASProtocolVersion"] floatValue] >= 14.1) [s appendFormat: @"%d", 1]; [s appendString: @""]; @@ -1169,7 +1169,7 @@ struct GlobalObjectId { truncated = 0; } - if ([[context valueForKey: @"ASProtocolVersion"] isEqualToString: @"2.5"]) + if ([[context objectForKey: @"ASProtocolVersion"] isEqualToString: @"2.5"]) { [s appendFormat: @"%@", content]; [s appendFormat: @"%d", truncated]; @@ -1204,7 +1204,7 @@ struct GlobalObjectId { { int i; - if ([[context valueForKey: @"ASProtocolVersion"] isEqualToString: @"2.5"]) + if ([[context objectForKey: @"ASProtocolVersion"] isEqualToString: @"2.5"]) [s appendString: @""]; else [s appendString: @""]; @@ -1219,12 +1219,12 @@ struct GlobalObjectId { // FileReference must be a unique identifier across the whole store. We use the following structure: // mail// // mail/INBOX/2 - if ([[context valueForKey: @"ASProtocolVersion"] isEqualToString: @"2.5"]) + if ([[context objectForKey: @"ASProtocolVersion"] isEqualToString: @"2.5"]) [s appendFormat: @"mail/%@/%@/%@", [[[self container] relativeImap4Name] stringByEscapingURL], [self nameInContainer], [value objectForKey: @"path"]]; else [s appendFormat: @"mail/%@/%@/%@", [[[self container] relativeImap4Name] stringByEscapingURL], [self nameInContainer], [value objectForKey: @"path"]]; - if ([[context valueForKey: @"ASProtocolVersion"] isEqualToString: @"2.5"]) + if ([[context objectForKey: @"ASProtocolVersion"] isEqualToString: @"2.5"]) { [s appendFormat: @"%d", 1]; [s appendFormat: @"%d", [[value objectForKey: @"size"] intValue]]; @@ -1273,7 +1273,7 @@ struct GlobalObjectId { [s appendFormat: @""]; } - if ([[context valueForKey: @"ASProtocolVersion"] floatValue] >= 14.0) + if ([[context objectForKey: @"ASProtocolVersion"] floatValue] >= 14.0) { id value; NSString *reference; diff --git a/ActiveSync/iCalEvent+ActiveSync.m b/ActiveSync/iCalEvent+ActiveSync.m index 7f0943360..121f0b11b 100644 --- a/ActiveSync/iCalEvent+ActiveSync.m +++ b/ActiveSync/iCalEvent+ActiveSync.m @@ -244,7 +244,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // otherwise it'll prevent WP8 phones from sync'ing. See #3028 for details. o = [o activeSyncRepresentationInContext: context]; - if ([[context valueForKey: @"ASProtocolVersion"] isEqualToString: @"2.5"]) + if ([[context objectForKey: @"ASProtocolVersion"] isEqualToString: @"2.5"]) { [s appendFormat: @"%@", o]; [s appendString: @"0"]; @@ -487,7 +487,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. } // FIXME: merge with iCalToDo - if ([[context valueForKey: @"ASProtocolVersion"] isEqualToString: @"2.5"]) + if ([[context objectForKey: @"ASProtocolVersion"] isEqualToString: @"2.5"]) { if ((o = [theValues objectForKey: @"Body"])) [self setComment: o]; diff --git a/ActiveSync/iCalToDo+ActiveSync.m b/ActiveSync/iCalToDo+ActiveSync.m index fa610f987..3db426146 100644 --- a/ActiveSync/iCalToDo+ActiveSync.m +++ b/ActiveSync/iCalToDo+ActiveSync.m @@ -127,7 +127,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // otherwise it'll prevent WP8 phones from sync'ing. See #3028 for details. o = [o activeSyncRepresentationInContext: context]; - if ([[context valueForKey: @"ASProtocolVersion"] isEqualToString: @"2.5"]) + if ([[context objectForKey: @"ASProtocolVersion"] isEqualToString: @"2.5"]) { [s appendFormat: @"%@", o]; [s appendString: @"0"]; @@ -161,7 +161,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. [self setSummary: o]; // FIXME: merge with iCalEvent - if ([[context valueForKey: @"ASProtocolVersion"] isEqualToString: @"2.5"]) + if ([[context objectForKey: @"ASProtocolVersion"] isEqualToString: @"2.5"]) { if ((o = [theValues objectForKey: @"Body"])) [self setComment: o];