Can I send message using SiriKit or SiriKit could send messages only by using external services?In method handle(sendMessage intent: INSendMessageIntent, completion: @escaping (INSendMessageIntentResponse) -> Void)there is a comment saying // Implement your application logic to send a message here.In my case I want to send a message the same way the MFMessageComposeViewController doesIs that possible?
Post
Replies
Boosts
Views
Activity
Is there an issue with distanceToLocation:fromLocation CloudKit predicate?I am trying to fetch some results from cloud db using the following code:CGFloat radius = 1000.00; // in meters
CLLocation *currentLocation =
[[CLLocation alloc] initWithLatitude:42.713834 longitude:23.264086];
CKLocationSortDescriptor *sortDescriptor =
[[CKLocationSortDescriptor alloc] initWithKey:@"location" relativeLocation:currentLocation];
[NSPredicate predicateWithFormat:@"distanceToLocation:fromLocation:(location, %@) < %f",
currentLocation, radius];I am expecting four records but result contains seven. Three of them exceed my predicate rule.Result:lat:42.713402 long:23.275190 distance:910.919712lat:42.710781 long:23.271160 distance:671.444867lat:42.734921 long:23.247850 distance:2693.570884lat:42.724411 long:23.281340 distance:1837.812711lat:42.721882 long:23.270849 distance:1051.719189lat:42.714920 long:23.263790 distance:123.055994lat:42.715111 long:23.261801 distance:234.863830Distance in the result above was measured for every record with:[[record objectForKey:@"location"] distanceFromLocation:currentLocation];Sort descriptor also does not work properly.By documentation sort descriptor should sort results in ascending order - but it is not truehttps://developer.apple.com/library/prerelease/ios/documentation/CloudKit/Reference/CKLocationSortDescriptor_class/index.html#//apple_ref/occ/instm/CKLocationSortDescriptor/initWithKey:relativeLocation: