概要 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…
概要 iOS版PDFKitではPDFPageクラスにサムネイル生成用のメソッドthumbnailOfSize:が用意されている。このメソッドを使用して全ページのサムネイル画像を生成していくと、PDFによってはメモリ消費量がどんどん増加していき、アプリがクラッシュする。 解決策…
概要 アプリ内に任意のファイルを埋め込んでおき、プログラムからそのファイルにアクセスして利用する。 ファイルの追加 Xcodeプロジェクト内にファイルを追加する。以下ではテキストファイルsample.txtを追加している。 ファイルを追加すると、自動的にプロ…
概要 Apple Developer Program(年間11,800円)に登録せずに無料のAppleアカウントで実機のiOSデバイスにアプリをインストールする。 手順 Xamarinプロジェクトを作成する。 通常通り、Xamarinプロジェクトを作成します。以下ではアプリケーションIDがcom.comp…