SiriServerCore icon indicating copy to clipboard operation
SiriServerCore copied to clipboard

PersonSearch

Open Devil-of-Chaos opened this issue 13 years ago • 8 comments

On PersonSearch relationship you will get error..

class': 'CommandFailed', 'group': 'com.apple.ace.system', 'properties': {'reason': 'Relationship not supported'},

Devil-of-Chaos avatar Mar 26 '12 16:03 Devil-of-Chaos

To fix you have to edit contactObject PersonSearch relationship to relatedNames

Devil-of-Chaos avatar Mar 26 '12 16:03 Devil-of-Chaos

Yes!

jimmykane avatar Mar 26 '12 16:03 jimmykane

I have send an commit to fix this^^

Devil-of-Chaos avatar Mar 26 '12 16:03 Devil-of-Chaos

I think I marked the contactObjects as a ToDo there will be a an update which recreates all contactObjects

janrueth avatar Mar 27 '12 09:03 janrueth

Hm I just redid that class but to 100% it should look like this:

      class ABPersonSearch(ClientBoundCommand):
    def __init__(self, refId):
        super(ABPersonSearch, self).__init__("PersonSearch", "com.apple.ace.contact", None, refId)
        self.targetAppId = None # @"NSURL"
        self.accountIdentifier = None # @"NSURL"
        self.address = None # @"SALocation"
        self.birthday = None # @"NSDate"
        self.company = None # @"NSString"
        self.email = None # @"SAEmail"
        self.me = None # @"NSNumber"
        self.name = None # @"NSString"
        self.phone = None # @"SAPhone"
        self.relationship = None # @"NSString"
        self.scope = None # @"NSString"


    def to_plist(self):
        self.add_property('targetAppId')
        self.add_property('accountIdentifier')
        self.add_property('address')
        self.add_property('birthday')
        self.add_property('company')
        self.add_property('email')
        self.add_property('me')
        self.add_property('name')
        self.add_property('phone')
        self.add_property('relationship')
        self.add_property('scope')
        return super(ABPersonSearch, self).to_plist()

janrueth avatar Mar 27 '12 09:03 janrueth

Or can you give an example plist (from 4S) where relatedNames is send during this request?

janrueth avatar Mar 27 '12 10:03 janrueth

I have written search code for what is my brothers adress if I'll take relationship it says 'properties': {'reason': 'Relationship not supported'},

If I change to relatedNames it works great

Devil-of-Chaos avatar Mar 27 '12 17:03 Devil-of-Chaos

sure I bet if you change it to: "I_dont_give_a_fuck" it will also work. I think you are just using it wrong, set the relationship property to None and it should work (ps. use the AB version)

janrueth avatar Mar 28 '12 07:03 janrueth