xamarin.ios

Async/Await in portable class library targeting Windows Store, iOS and Droid

浪尽此生 提交于 2020-01-22 15:35:07
问题 Developping an MvvmCross application targeting Android and iOS (Xamarin/Mono) and Windows Store (because it's so easy/fast to debug compared to iOS/Android). The Core of the app is PCL based. Is it possible to use Async/Await in the Core library? Xamarin mono supports Async/Await, and Windows Store supports it. However, when selecting only Net4.5, Windows Store, Mono Android and MonoTouch as the PCL targets, SL4 and WP7.5 get automatically selected and Async/Await is not availlable anymore.

Parsing Multidimensional JSON Array with Newtonsoft Json.NET

孤街浪徒 提交于 2020-01-22 10:04:11
问题 I have Json returning as the following: [{"CreatedBy":"GIS_DB","CreatedDate":"3/8/2012 10:44:00 AM","Id":39,"ModifiedBy":"","ModifiedDate":"","Name":"CF-39","StatusId":1,"TrailCoordinates":[{"CreatedBy":"GIS_DB","CreatedDate":"3/8/2012 10:44:00 AM","Id":1637,"Latitude":32.76004207,"Longitude":-97.34006853,"ModifiedBy":"","ModifiedDate":"","SortOrder":1,"TrailId":39},{"CreatedBy":"GIS_DB","CreatedDate":"3/8/2012 10:44:00 AM","Id":1638,"Latitude":32.76004333,"Longitude":-97.34012121,"ModifiedBy

System.IO.IOException: Sharing violation on path in C#

大憨熊 提交于 2020-01-22 02:21:05
问题 I have used below code to save the file in xamarin forms ios but give me System.IO.IOException: Sharing violation please help me. FileStream fileStream = File.Open(pdfPath, FileMode.Create); stream.Position = 0; stream.CopyTo(fileStream); fileStream.Flush(); fileStream.Close(); 回答1: Have you checked that your app has permission for accessing files on the system? Also i would to a check to see if the files exist before opening it with File.Exists(); . Also there are better ways of reading and

How to serialize using System.Json in MonoTouch

风格不统一 提交于 2020-01-21 18:03:16
问题 My other question seems to be too generic, so I tought I'd create a new one on the details. Sorry if that is considered bad practice. I am trying to serialize C# objects to JSON strings with MonoTouch and the System.Json namespace in a way that doesn't require me to descend through the object(s) myself. Is that possible? If yes, how to do it properly? De-serialization works well by implicitly casting a JsonValue to a string, int, whatever. Also, descending in the hierarchy is no problem. Like

How to serialize using System.Json in MonoTouch

北慕城南 提交于 2020-01-21 18:02:43
问题 My other question seems to be too generic, so I tought I'd create a new one on the details. Sorry if that is considered bad practice. I am trying to serialize C# objects to JSON strings with MonoTouch and the System.Json namespace in a way that doesn't require me to descend through the object(s) myself. Is that possible? If yes, how to do it properly? De-serialization works well by implicitly casting a JsonValue to a string, int, whatever. Also, descending in the hierarchy is no problem. Like

How to serialize using System.Json in MonoTouch

 ̄綄美尐妖づ 提交于 2020-01-21 18:02:27
问题 My other question seems to be too generic, so I tought I'd create a new one on the details. Sorry if that is considered bad practice. I am trying to serialize C# objects to JSON strings with MonoTouch and the System.Json namespace in a way that doesn't require me to descend through the object(s) myself. Is that possible? If yes, how to do it properly? De-serialization works well by implicitly casting a JsonValue to a string, int, whatever. Also, descending in the hierarchy is no problem. Like

How to serialize using System.Json in MonoTouch

夙愿已清 提交于 2020-01-21 18:02:11
问题 My other question seems to be too generic, so I tought I'd create a new one on the details. Sorry if that is considered bad practice. I am trying to serialize C# objects to JSON strings with MonoTouch and the System.Json namespace in a way that doesn't require me to descend through the object(s) myself. Is that possible? If yes, how to do it properly? De-serialization works well by implicitly casting a JsonValue to a string, int, whatever. Also, descending in the hierarchy is no problem. Like

In Xamarin iOS designer, how can I prevent code from being run in ViewDidLoad?

核能气质少年 提交于 2020-01-21 17:53:08
问题 In the Xamarin iOS Storyboard designer, the ViewDidLoad code of the ViewController gets built and run automatically when just looking at the storyboard. This is great for programmatic design elements because I can see them in designer view without having to start the simulator, but I also need to make an API call from ViewDidLoad and that crashes the designer with the error "Custom components are not being rendered because problems were detected" . public async override void ViewDidLoad() {

In Xamarin iOS designer, how can I prevent code from being run in ViewDidLoad?

筅森魡賤 提交于 2020-01-21 17:52:49
问题 In the Xamarin iOS Storyboard designer, the ViewDidLoad code of the ViewController gets built and run automatically when just looking at the storyboard. This is great for programmatic design elements because I can see them in designer view without having to start the simulator, but I also need to make an API call from ViewDidLoad and that crashes the designer with the error "Custom components are not being rendered because problems were detected" . public async override void ViewDidLoad() {

Custom SQLite functions in Xamarin.iOS

非 Y 不嫁゛ 提交于 2020-01-21 09:46:10
问题 I am working on custom function of Sqlite on Xamarin.iOS. I got answer from here : Show markers on map within a given radius (Xamarin.Android) but I am running into issue of Attempting to JIT compile method '(wrapper native-to-managed) Mono.Data.Sqlite.SqliteFunction:ScalarCallback (intptr,int,intptr)' while running with --aot-only. After searching on stack I found that here is a solution: custom functions SQLite with Mono but solution mention there is tough for me to understand. I am not