概要 iOS 9以上ではApp Transport Securityの導入により、HTTPリクエストを実行するとエラーが発生する。その対応。 Info.plistの設定変更 <プロジェクト名>.iOS以下にあるInfo.plistを開き、以下の設定を追加する。 NSAppTransportSecurityについては以下を…
概要 System.Net.Http.HttpContent.ReadAsStringAsync()メソッドを使用した際に以下のエラーが発生した場合の対応方法。 System.NotSupportedException: Encoding 932 data could not be found. Make sure you have correct international codeset assembly …
概要 バッチファイル内で使用する変数として、別ファイル内に書かれているバージョン番号を取得して使用する。 以下ではAndroidアプリ開発で使用するbuild.gradleファイル内からバージョン番号を取得する。 build.gradleファイル 以下のversionName "1.0.0"…
概要 XamarinでSystem.Net.Http.HttpClientを使用してHTTPのGETリクエストを行う。 docs.microsoft.com サンプルコード static readonly HttpClient client = new HttpClient(); // A) async void OnButtonClicked(System.Object sender, System.EventArgs e…
概要 ファイルの読み書きを行う。 サンプルコード System.IO.Fileクラスを使用する。 public MainPage() { InitializeComponent(); // サンプルファイルパスの取得 String documentDir = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);…
Summary PDFKit has a method thumbnailOfSize: for create thumbnail but when you create thumbnail of all page by this method, memory consumption is increasing and it's cause of app crash. Solution You have to release PDFDocument instance tha…
Outline You can add any files in your iOS application at build phase and use it in the app. Add files Add any files to your Xcode project. The following example add text file sample.txt. When you add files to the Xcode project, Xcode add t…