Hi i am trying to build AR App in Xamarin.iOS, to get my custom 3d model displayed i neede to use ModelSceneSymbol and also publish my custom 3d model into arcgis by zipping it, so that later in runtime i can unzip it and use it.
To complete the Constructor it takes two parameters 1) Uri and the second one is scale factor arcgis has used datamanager to return the uri by calling the getdatafolder which takes the parameters(the id of the uploaded sample and the name of the 3d model) it later calls sample info and uses 3 different files to store and display the model on the map.
when i tried to import this i found out that it can't be called so i copied all the files created classes and called it, by fixing a lot of errors i have called the exact id code of the sample and name of the sample displayed in this example https://developers.arcgis.com/net/ios/sample-code/animate-3d-graphic/
but still i keep getting errors and the most important one System.IO.FileException-File not found
can anyone help me with debugging it i am providing datamanager code here
Great to see that you are using our AR functionality.
DataManager
is a utility only meant for use in the sample viewer. It is not very portable. I recommend writing your own data download code. We use attributes to determine what data is downloaded for a sample. The viewer downloads the data when a sample is opened. All portal items are downloaded in this method. You could modify the DataManager
class to work without SampleInfo
, then verify that it downloads your item to your intended folder.
A different solution could be including the model in your app as a bundle resource. You could skip the online workflow and access the file locally with Path.Combine(NSBundle.MainBundle.BundlePath, "YourPath")
.