Entitlements fileのエラーを修正する
エラー文
error: Entitlements file "projectname.entitlements" was modified during the build, which is not supported. You can disable this error by setting 'CODE_SIGN_ALLOW_ENTITLEMENTS_MODIFICATION' to 'YES', however this may cause the built product's code signature or provisioning profile to contain incorrect entitlements.
修正方法
Xcode の Project をクリック後、
ターゲット一覧からプロジェクトターゲットをクリックし、Build Settingsタブをクリックする。
選択したタブの下にある、+ ボタンをクリックし
CODE_SIGN_ALLOW_ENTITLEMENTS_MODIFICATION
を追加し、YESに設定する。
別の修正方法
私自身は試していませんが、Clean Build Folder で治ることもあるらしいです。
Macのスピーカーからプツプツ音が出た時の対処
sudo kill -9 `ps ax|grep 'coreaudiod' | awk '{print $1}'`
もしくは
sudo kill -9 `ps ax|grep 'coreaudio[a-z]' | awk '{print $1}'`
SwiftUIで複数の遷移先を配列に格納して遷移する方法
複数の遷移を配列に格納する
let destinations: [AnyView] = [ AnyView(FirstView()), AnyView(SecondView()), AnyView(ThirdView()) ]
遷移する
var body: some View { ScrollView(.horizontal, showsIndicators: false) { HStack { ForEach(destinations.indices) { index in NavigationLink( destination: destinations[index]) { Circle() .foregroundColor(.blue) .frame(width: 100, height: 100, alignment: .center) } } } } }
おわりに
いつ使うかわかりませんが、 自分自身、複数のメニューをHStackでカードビューを並べて作りたいときに、どのようにしてNavigationLinkを使うのか悩んだときにこれで解決しました。
他にもっといい方法がありそう。
【Unity】【ARFoundation】 実機でカメラが真っ黒になる対処法
原因
- camera usage description未設定
- Plug in ProvidersでARKitにチェックが入っていない
camera usage description未設定
Edit > Player Settings > Player > OtherSettings > Configuration > Camera Usage Descriptionに説明を書く
書かないと、Unityのビルドでもなんか言ってくれる。
実機の実行時に書かないと動かない。
Plug in ProvidersでARKitにチェックが入っていない
これがみんな陥りがちな気がする。
あまりみんなARFoundation使用するときの説明で書かれていない