-
Notifications
You must be signed in to change notification settings - Fork 21
MSGraphContact - missing in action? #37
Comments
I believe you need to install the MSGraphClientModels pod file. Let me know if that works. |
Michael; Hey Thanks - that got the files.... Can you point out where I missed this in the documentation? When I examine the MSGraphContact class it is not clear how I would assign 'Categories' to this class. Please clarify how that is accomplished using this new class? Steve |
You didn't miss it - we missed it. I just checked, we don't have it mentioned in the readme. I'll add it to the readme. Regarding setting Categories, it is an NSArray of strings. The setter is defined here: https://github.com/microsoftgraph/msgraph-sdk-objc-models/blob/master/GeneratedModels/MSGraphOutlookItem.h#L13 . |
The repo for the models is here: There are some great resources here to help you: https://developer.microsoft.com/en-us/graph/get-started/ios |
Michael; Thanks for your help so far! It occurs here: There error is: The contact has a single email address constructed like this: Can you clarify 2 things:
I am opening this same issue in 'models' GitHub you mention above just to make sure.... |
@SteveDCronin I see nothing wrong with how you created the contact. Does NSJSONSerialization.isValidJSONObject(emailAddress) return true? |
From code: From log: Huh? |
Michael; You responded to my question about assigning Categories and the online document mentioned above delineates 'categories' as string collection. I have successfully used the HTTP post mechanism to work around the issues in using the MSGraphContact class. |
@SteveDCronin I'm not familiar with the categories feature. I suggest that you first search on Stack Overflow for the [microsoft-graph] tag and categories. There is already a lot of Q&A for this subject. Otherwise, post your question to Stack Overflow with the microsoft-graph tag. I do not understand why the MSGraphEmailAddress is not a valid JSON object. We will need to check whether other complex types are valid JSON objects. |
I can tell you that MSGraphPhysicalAddress also fails with the same error. |
I'm using CocoaPods:
...
pod 'MSGraphClientSDK'
pod 'MSGraphMSALAuthProvider'
...
running 'pod install' yields:
...
Installing MSAL (0.5.0)
Installing MSGraphClientSDK (1.0.0)
Installing MSGraphMSALAuthProvider (0.2.0)
...
There are no conflicts noted!
The online docs here:
https://docs.microsoft.com/en-us/graph/api/user-post-contacts?view=graph-rest-1.0&tabs=objc
have a code sample for ObjectiveC which includes this statement:
...
MSGraphContact *contact = [[MSGraphContact alloc] init];
My application has:
#import <MSGraphClientSDK/MSGraphClientSDK.h>
...
MSGraphContact *contact = [[MSGraphContact alloc] init];
...
I get an 'undeclared identifier' compiler error for 'MSGraphContact'
I cannot find any instance of the MSGraphContact class in the Pods/MSGraphClientSDK/**
Please clarify what I am missing or what I am misunderstanding!
The text was updated successfully, but these errors were encountered: