blitz-time アプリ開発ブログ

Androidアプリ開発などのTips集

SwiftUI開発

【SwiftUI開発】ボタンがタッチしても反応しない事象

SwiftUIにてボタンをタッチしても反応しない事象に遭遇しました。 SwiftUIのボタンをタッチしても反応がない Xcode 14.2 iOS 16.2操作手順は以下の通り。 TextFieldをタップし、キーボードを表示 sheetで画面Aを表示 端末の電源ボタンを押して画面ロック 画…

【Swift】Realm利用時に「Migration is required due to the following errors」というエラーが出る

iOSアプリ開発でRealmのインスタンス作成時に「Migration is required due to the following errors」というエラーが発生する場合があります。 realm = try Realm()Error Domain=io.realm Code=10 "Migration is required due to the following errors: - Pr…

【Swift開発】Undefined symbols for architecture arm64

RealmSwiftを利用したiOSアプリを開発しておりましたが、いざリリースビルドのために「Archive」を実施したところ、下記のエラーが出ました。 Undefined symbols for architecture arm64: "_$s10RealmSwift0A14CollectionImplPAAE12makeIteratorAA11RLMItera…

【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…