Skip to content

Commit c08426d

Browse files
#259 Build fails using cordova-ios@4
1 parent bac4290 commit c08426d

File tree

4 files changed

+8
-12
lines changed

4 files changed

+8
-12
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cordova-plugin-calendar",
3-
"version": "4.4.5",
3+
"version": "4.4.6",
44
"description": "This plugin allows you to manipulate the native calendar.",
55
"cordova": {
66
"id": "cordova-plugin-calendar",

plugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
xmlns="http://apache.org/cordova/ns/plugins/1.0"
44
xmlns:android="http://schemas.android.com/apk/res/android"
55
id="cordova-plugin-calendar"
6-
version="4.4.5">
6+
version="4.4.6">
77

88
<name>Calendar</name>
99

src/android/nl/xservices/plugins/accessor/AbstractCalendarAccessor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@ private Event[] fetchEventInstances(String title, String location, long startFro
205205
if (!"".equals(selection)) {
206206
selection += " AND ";
207207
}
208-
selection += Events.EVENT_LOCATION + "=?";
209-
selectionList.add(location);
208+
selection += Events.EVENT_LOCATION + " LIKE ?";
209+
selectionList.add("%" + location + "%");
210210
}
211211

212212
String[] selectionArgs = new String[selectionList.size()];

src/ios/Calendar.m

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,10 @@ @implementation Calendar
99
@synthesize eventStore;
1010
@synthesize interactiveCallbackId;
1111

12-
#pragma mark Initialisation functions
12+
#pragma mark Initialization functions
1313

14-
- (CDVPlugin*) initWithWebView:(UIWebView*)theWebView {
15-
self = (Calendar*)[super initWithWebView:theWebView];
16-
if (self) {
14+
- (void) pluginInitialize {
1715
[self initEventStoreWithCalendarCapabilities];
18-
}
19-
return self;
2016
}
2117

2218
- (void) initEventStoreWithCalendarCapabilities {
@@ -313,11 +309,11 @@ - (NSArray*) findEKEventsWithTitle: (NSString *)title
313309
}
314310
if (location != (id)[NSNull null] && location.length > 0) {
315311
location = [location stringByReplacingOccurrencesOfString:@"'" withString:@"\\'"];
316-
[predicateStrings addObject:[NSString stringWithFormat:@"location == '%@'", location]];
312+
[predicateStrings addObject:[NSString stringWithFormat:@"location contains[c] '%@'", location]];
317313
}
318314
if (notes != (id)[NSNull null] && notes.length > 0) {
319315
notes = [notes stringByReplacingOccurrencesOfString:@"'" withString:@"\\'"];
320-
[predicateStrings addObject:[NSString stringWithFormat:@"notes == '%@'", notes]];
316+
[predicateStrings addObject:[NSString stringWithFormat:@"notes contains[c] '%@'", notes]];
321317
}
322318

323319
NSString *predicateString = [predicateStrings componentsJoinedByString:@" AND "];

0 commit comments

Comments
 (0)