QBChat Pending Contacts - quickblox

I am trying to access [QBChat instance].contactList.pending
It says that their is no object "pending" on the object QBContactList.
On your documentation page, it says that the above line "[QBChat instance].contactList.pending works.
The only two objects that can get called are: contacts and pendingApproval.
Thanks!

Greg,
Try adding the method:
-(void) chatDidReceiveContactAddRequestFromUser:(NSUInteger)userID {
//insert functionality here
}
Make sure this is added to the file that is being used as your chat delegate. Hopefully this answers your question.

It should be
[QBChat instance].contactList.pendingApproval

Related

Laravel scope not responding

I am using laravel for my backend api.
My question is about an scopefilter, the problem is that it is not responding when I call to it.
I have a lot of examples for using scopefilters.
So I looked at each of them to see if I did something wrong.
But I can't seem to find the problem.
When I call to this model in laravel, I use a parameter to define too the scopefilter to use a specific function.
The point only is that it never gets to this function, I don't get a response when I have put a log in this function.
I assume it is a syntax problem but maybe someone else can find the problem for this.
public static $scopeFilters = [
"supplierArticleClientId" => "bySupplierArticleClientId"
];
public function scopeBySupplierArticleClientId($query, $clientId) {
\Log::info([$clientId]);
}
In this case I expect that I see an clientId in my log.
You have to create a Custom validation function Implementing Rule Class
please go through this link for reference

How do I just add a custome variable to a Survey Monkey?

I am handling existing surveys via the API.
As part of this, I need each survey to have a custom variable defined for it.
I would like to use the API to add the custom variable, but the documentation states the FETCH would not do that, and PUT will replace rather than update the survey.
I am handling existing surveys, which I would not like to delete and replace, or am I miss-reading the docs?
Can I just send via PUT the following structure and it will keep everything else in place?
{
id : 112223333, //id of survey
custom_variables: {
'custom1':'custom1',
'custom2':'custom2'
}
}
I do see it resets the title, so, is this method safe? (i.e. wont remove any other data associated to this survey).
You're on the right track. You're going to want to use a PATCH HTTP request. That will only make updates, whereas a PUT request will replace the survey with the content you provide.
So your request will likely look something like this:
PATCH /v3/surveys/<survey_id>
{
"custom_variables": {
"custom1_name": "custom1_label",
"custom2_name": "custom2_label"
}
}
And that should only update your custom variables to the values you set. The docs do appear to suggest custom_variables won't get updated with a PATCH request but I think it does work.

Reading and setting tags using the PodioKit

I try to set an item's tags using the PodioKit-API in Objective-C/Cocoa. The only thing that looks like tags was the definition of
PKTReferenceTypeTag
inside the PodioKit-Pod. I didn't find any information inside the API manual. The tag field is not shown when I walk through the available fields either:
[[PKTApp fetchAppWithID:appId] onComplete:^(PKTApp *app, NSError *error) {
_appFields = [app fields];
for (PKTAppField *pktAppField in _appFields) {
NSString *pktAppFieldExtId = [pktAppField externalID];
NSLog(#"Field_externalid %#", pktAppFieldExtId);
}
}];
Maybe someone had the same problem or just has a tip into the right direction...
Thanks, Michael / Hamburg
Sebastian from Podio here. Tags are not yet supported since the SDK is still in beta, but I will look into it and try to add it as soon as possible.

Missing Get_favicon function in new Simplepie Release

In the new release the get_favicon method was removed as shown in the Changes in this Release section of documentation.
When I try $item->get_favicon() I only get Call to undefined method SimplePie_Item::get_favicon()
How am I able to get the favicons from the RSS Feeds?
Same here. I've seeing the same error... Even searched through the code and there is no reference to anything related to favicon
get_favicon is a method for the feed itself, not its items. I believe $item->, means you are looping through the feed items.
$feed = new SimplePie();
$feed->set_feed_url($xmlurl);
$feed->set_output_encoding('UTF-8');
$feed->set_cache_durat
$feed->enable_order_by_date(false);ion(30);
$feed->get_favicon();
I think where you are in your code is inside the foreach going through each item. I dont think you can call the get_favicon method on the items.
foreach ($feed->get_items() as $item):

Programmatically adding to a Core Data entity (like IB binding 'add')

I have a core data model with an entity called clients that is made up of the following attributes:
If I click on an 'add client' button and bring up the following window:
what would be the correct method to programmatically add a new entry for each property simultaneously (in a similar fashion to how a bound IB 'add' button would work with an NSArrayController) and have them appear in the textfields of the 'add client' window to edit? The textfields in the 'add client' window are bound to the corresponding properties (with one or two still missing) of the client entity. The code I have at the moment is:
- (IBAction)addNewClient:(id)sender;
{
[addClientsWindow makeKeyAndOrderFront:self];
//NSManagedObjectContext *clientsMoc= [clientsController managedObjectContext];
//[clientsMoc addObject:[clientsMoc newObject]];
[clientsController addObject:[clientsController newObject]];
}
Which worked for other entities in this project but isn't working for client since I added relationship types (it throws up KVC errors in the console). I imagine it's because I am addressing the NSArrayController rather than the NSManagedObjectContext but the commented out code isn't working for me. This attempt follows on from a previous question as the question has changed a lot and I'm struggling to implement the advice given. I really need a good starting point and the apple dev docs aren't helping me make sense of this.
Thanks in advance!
---- Update ----
Am I explaining things badly in this question? I'm new here but thought there might be an attempt at an answer. Googling this was hard for some reason. I may have found something similar to a solution through an unrelated Google search. Luckily it was relevant to this.
- (IBAction)addNewClient:(id)sender;
{
[addClientsWindow makeKeyAndOrderFront:self];
NSManagedObjectContext *clientsMoc= [clientsController managedObjectContext];
NSManagedObject *clientsEntity = [NSEntityDescription
insertNewObjectForEntityForName:#"Clients"
inManagedObjectContext:clientsMoc];
[clientsEntity setValue:#"name" forKey:#"clientName"];
[clientsEntity setValue:#"company" forKey:#"clientCompany"];
[clientsEntity setValue:#"address" forKey:#"clientAddress"];
[clientsEntity setValue:#"11111111" forKey:#"clientLandline"];
[clientsEntity setValue:#"email#gmail.com" forKey:#"clientEmail"];
}
This created a full new entry for the clients entity - I didn't realise I would have to do an individual value for each property. The KVC errors continued though and I couldn't find a solution at all. Apple dev docs were actually helpful on this one, here, and adding NSBindingDebugLogLevel 1 to the “Arguments to be passed at launch” list gave me details of exactly what was causing the problem. It was an old binding to an NSTableColumn that hadn't been updated.
This may be the solution I was after:
- (IBAction)addNewClient:(id)sender;
{
[addClientsWindow makeKeyAndOrderFront:self];
NSManagedObjectContext *clientsMoc= [clientsController managedObjectContext];
NSManagedObject *clientsEntity = [NSEntityDescription
insertNewObjectForEntityForName:#"Clients"
inManagedObjectContext:clientsMoc];
[clientsEntity setValue:#"name" forKey:#"clientName"];
[clientsEntity setValue:#"company" forKey:#"clientCompany"];
[clientsEntity setValue:#"address" forKey:#"clientAddress"];
[clientsEntity setValue:#"11111111" forKey:#"clientLandline"];
[clientsEntity setValue:#"email#gmail.com" forKey:#"clientEmail"];
}
This created a full new entry for the clients entity - I didn't realise I would have to do an individual value for each property. The KVC errors continued though and I couldn't find a solution at all. Apple dev docs were actually helpful on this one, here, and adding NSBindingDebugLogLevel 1 to the “Arguments to be passed at launch” list gave me details of exactly what was causing the problem. It was an old binding to an NSTableColumn that hadn't been updated.