It seems unbelievable that you will not use or consider Parse.com for something like this ...
(If not Parse, some other bAAs with a similar feature set.)
NOTE. - Now Parse is on back4app.com.
1) Parse is the easiest way to do using the iOS application
2) the whole idea of Parse is that you have the cloud code, and it's incredibly simple,
https://parse.com/docs/cloud_code_guide
, "cron", . Parse!
, - " " iOS Parse.
,
-(void)tableView:(UITableView *)tableView
commitEditingStyle:(UITableViewCellEditingStyle)editingStyle
forRowAtIndexPath:(NSIndexPath *)indexPath
{
int thisRow = indexPath.row;
PFUser *delFriend = [self.theFriends objectAtIndex:thisRow];
NSLog(@"you wish to delete .. %@", [delFriend fullName] );
[PFCloud callFunctionInBackground:@"clientRequestFriendRemove"
withParameters:@{
@"removeThisFriendId":delFriend.objectId
}
block:^(NSString *serverResult, NSError *error)
{
if (!error)
{
NSLog(@"ok, Return (string) %@", serverResult);
}
}];
[self back];
}
, "clientRequestFriendRemove". , , Parse,
Parse.Cloud.define("clientRequestHandleInvite", function(request, response)
{
var thisUserObj = request.user;
var invitorPersonId = request.params.invitorPersonId;
var theMode = request.params.theMode;
console.log( "clientRequestAcceptInvite called.... invitorPersonId " + invitorPersonId + " By user: " + thisUserObj.id );
console.log( "clientRequestAcceptInvite called.... theMode is " + theMode );
if ( invitorPersonId == undefined || invitorPersonId == "" )
{
response.error("Problem in clientRequestAcceptInvite, 'invitorPersonId' missing or blank?");
return;
}
var query = new Parse.Query(Parse.User);
query.get(
invitorPersonId,
{
success: function(theInvitorPersonObject)
{
console.log("clientRequestFriendRemove ... internal I got the userObj ...('no response' mode)");
if ( theMode == "accept" )
{
createOneNewHaf( thisUserObj, theInvitorPersonObject );
createOneNewHaf( theInvitorPersonObject, thisUserObj );
}
deleteFromInvites( theInvitorPersonObject, thisUserObj );
deleteFromInvites( thisUserObj, theInvitorPersonObject );
},
error: function(object,error)
{
console.log("clientRequestAcceptInvite ... internal unusual failure: " + error.code + " " + error.message);
response.error("Problem, internal problem?");
return;
}
}
);
}
);
( ... fooobar.com/questions/1097047/...)
3) , Push Parse, , " "
, Parse, Push...
function runAPush( ownerQueryForPush, description )
// literally run a push, given an ownerQuery
// (could be 1 to millions of devices pushed to)
{
var pushQuery = new Parse.Query(Parse.Installation);
pushQuery.matchesQuery('owner', ownerQueryForPush);
Parse.Push.send
(
{
where: pushQuery,
data:
{
swmsg: "reload",
alert: description,
badge: "Increment",
title: "YourClient"
}
},
{
success: function()
{ console.log("did send push w txt message, to all..."); },
error: function(error)
{ console.log("problem! sending the push"); }
}
);
}
4) , , nosql. , Parse
5) ( , ) -
6) , , Parse ( , )
, , - . , .