若き研究者の日常

技術寄りの事かポエムを書く。

拾ってきたSwiftプロジェクトを使って実機テストをしようとした際,ビルドができない

GitHubリポジトリから拾ってきた野良コードを実機テストしてみようとしました.

github.com

すると,,,以下のようなエラーが

Failed to register bundle identifier
The app identifier "com.nb.SimpleReminderNotification" cannot be registered to your development team because it is not available. Change your bundle identifier to a unique string to try again.
No profiles for 'com.nb.SimpleReminderNotification' were found
Xcode couldn't find any iOS App Development provisioning profiles matching 'com.nb.SimpleReminderNotification'.

ビルド失敗.

Bundle Identifierとはなんぞやということですが,Swiftアプリを識別するためのものみたい.異なるユーザ間であっても全世界で同一のBundle Identifierがあってはいけないみたいです.

qiita.com

Bundle Identifierに日付とか入れてみると解決.

その他,Untrusted DeveloperがiPhoneに書き込もうとしてるぜ的なエラーもでた.実機の方でSetting->General->VPN&Device ManagementからDeveloperアカウントをTrustすれば解決.

実機の方でtrustする

ついでに,XcodeのメニューのWindow->Device and Simulator->Deviceで,Connect via networkにチェックをつけると次からWi-Fi経由でアプリ配布可能らしい(初回はmacと実機を繋げる必要がある).

参考:

【Xcode】実機のiPhoneに自作アプリをビルドする方法!