blitz-time アプリ開発ブログ

Androidアプリ開発などのTips集

【SwiftUI開発】Cannot assign to property: 'self' is immutable

「Cannot assign to property: 'self' is immutable」がたまに出てきます。「immutable」は「不変」という意味です。変更できないプロパティです。という意味ですね。 なので、変更できるようにしてあげましょう。「@State」をつけてあげてください!なぜ「i…

【SwiftUI開発】Fatal error: UnsafeRawBufferPointer with negative count

Swift UIでiOSアプリ開発をしている際によく遭遇するエラー。 CoreDataを使用してデータベースを作成し、ビルド。ビルドは正常に終了するので、アプリを実行すると、直後に下記のエラーが発生する。 Fatal error: UnsafeRawBufferPointer with negative coun…

【Flutter開発】Invalid Bundle. The bundle Runner.app/Frameworks/Flutter.framework does not support the minimum OS Version specified in the Info.plist.

以前作成したFlutterプロジェクトをXcode13でビルドし、AppStoreへアップロードすると、初めてみる下記のエラー。 >|| Invalid Bundle. The bundle Runner.app/Frameworks/Flutter.framework does not support the minimum OS Version specified in the Info…

【Flutter開発】Unable to prepare iPhone for development / Please check the connection to the device, and review all errors in the Devices and Simulators window.

FlutterプロジェクトをiPhone13(iOS15)の実機で実行しようとすると、実機が繋がらない。。。。 Unable to prepare iPhone for development Please check the connection to the device, and review all errors in the Devices and Simulators window.iPhone…

【Flutter開発】新規プロジェクト作成時のお決まりごと

デバッグモードのバナーの非表示 画面向きを縦固定にする。 デバッグモードのバナーの非表示 スクショ撮る時など、デバッグモードで出てくるバナー表示は邪魔なので初めから非表示にしておく。 「debugShowCheckedModeBanner: false」を追加する。 class MyA…

【Flutter開発】画面を縦固定にしようとしたら発生したエラー

縦画面を固定にしたく、下記のコードをmain()内のrunApp()前に実行すると、 void main() { // 画面の向きを固定. SystemChrome.setPreferredOrientations([ DeviceOrientation.portraitUp, ]); runApp(MyApp()); }下記エラーが発生しました。 [VERBOSE-2:ui_…

【Flutter開発】Command Line Tool - Error - xcrun: error: unable to find utility "xcodebuild", not a developer tool or in PATH

githubから取得したFlutterのプロジェクトのiOSビルドをしようとしたところ、 Command Line Tool - Error - xcrun: error: unable to find utility "xcodebuild", not a developer tool or in PATHというエラーが出ました。調べたところ、下記の設定を行うこ…