Onedrive graph client crashing on iOS 17

Phunction 301 Reputation points
2024-02-13T00:32:47.7933333+00:00

I have my app connected with onedrive using the graph client, works fine in iOS 16 and lower.

However, in iOS 17, this line now causes and exception:

folder = await this.graphClient.Drive.Root.Request().Expand(expandValue).GetAsync();

Error creating 'Microsoft.Graph.DerivedTypeConverter'. ---> Newtonsoft.Json.JsonException: No parameterless constructor defined for 'Microsoft.Graph.DerivedTypeConverter'.

Does anyone know what changed? I have googled and only get a few tidbits about mac os.

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,377 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,328 questions
OneDrive
OneDrive
A Microsoft file hosting and synchronization service.
1,322 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Phunction 301 Reputation points
    2024-02-19T20:01:16.7633333+00:00

    It looks like the issue was the new SDK. Now I do this:

    var driveItems = await graphClient.Drives[driveItem.Id].Items["root"].Children.GetAsync();

    However, I cannot find an example or even much info on what driveItems actually is?

    How do I use that to get a list of available files? It does not appear to be a collection of DriveItem's.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.