質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Xcode

Xcodeはソフトウェア開発のための、Appleの統合開発環境です。Mac OSXに付随するかたちで配布されています。

Swift

Swiftは、アップルのiOSおよびOS Xのためのプログラミング言語で、Objective-CやObjective-C++と共存することが意図されています

Q&A

解決済

1回答

3281閲覧

エラーについて教えてください

Ytan

総合スコア39

Xcode

Xcodeはソフトウェア開発のための、Appleの統合開発環境です。Mac OSXに付随するかたちで配布されています。

Swift

Swiftは、アップルのiOSおよびOS Xのためのプログラミング言語で、Objective-CやObjective-C++と共存することが意図されています

0グッド

0クリップ

投稿2020/02/22 08:47

2020-02-22 00:35:12.466429-0800 MyCamera[28822:3987040] [LayoutConstraints] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(
"<NSLayoutConstraint:0x2821e4960 UIView:0x102f02860.width == - 16 (active)>"
)

Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x2821e4960 UIView:0x102f02860.width == - 16 (active)>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.
2020-02-22 00:35:14.054578-0800 MyCamera[28822:3987321] [access] This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSCameraUsageDescription key with a string value explaining to the user how the app uses this data.
(lldb)

Thread 7: signalSIGABRT でこちらのエラーが出ました。
カメラアプリを作っていて、カメラボタンを押すとクラッシュしたので、layoutを外してもう一度設定したのですが、うまくエラーを抜けれません。

xcode 11.3.1

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

警告とエラーが出てます。

2020-02-22 00:35:12.466429-0800 MyCamera[28822:3987040] [LayoutConstraints] Unable to simultaneously satisfy constraints.

これは AutoLayout に関する警告で、制約が矛盾してるからなんとかしろってことです。
警告なので、表示はおかしくなる可能性がありますが、落ちることはないはず。

2020-02-22 00:35:14.054578-0800 MyCamera[28822:3987321] [access] This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSCameraUsageDescription key with a string value explaining to the user how the app uses this data.

問題はこれです。iOS アプリでカメラなどのプライバシーに絡む機能を使用する場合、Info.plist てやつにカメラなどの使用目的を記述する必要があります。詳しくは以下の記事をお読みください。
iOS10ではカメラアクセスなどの目的を明示しないと強制終了する - Qiita
iOS11 ではフォトライブラリへ書き込むとき NSPhotoLibraryAddUsageDescription を書いてないとクラッシュする - Qiita

投稿2020/02/22 09:05

hoshi-takanori

総合スコア7895

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問