ryuryu0226 / ARMap

1 stars 0 forks source link

iOS: ビルドしたプロジェクトを2つ用意してBundle identifierを使い回す。 #1

Closed hzuika closed 2 years ago

hzuika commented 2 years ago

一度に作れるAppの数に制限がある.最大になってしまったので,今は別のAppleIDを使っている. Bundle Identifierを使いまわせないと,いずれ枯渇するので調査する.

✅Solved?

ビルドするときに,新しいフォルダ(Build220616/)を作って,そこにビルド. Xcodeを開いて,既存(Build/)のBundle Identifierが使える. 以降は,Build220616にReplaceしてもAppendしてもいい. 大事なのは,削除されていないXcodeプロジェクトのBundle Identifierを使うということ?

hzuika commented 2 years ago

参考

バンドルとは?

*.appのように本当はフォルダだけど,ファイルのように見えるもの. 実行ファイル以外のファイルなども入っている. その中に,info.plistファイルがあり,その中に,バンドルIDがコピーされる.

バンドルIDによって,アプリを特定する.

UnityでBundle IDの設定

Edit > Project Settings ... > Player

を使って生成される.com.<Company Name>.<Product Name>

上書きしたい場合は,Other Settings > Identification > Override Default Bundle Identifier にチェックを入れる.

hzuika commented 2 years ago

前回ビルド成功していたプロジェクトに対して,Replaceではなく,Appendでビルド. 生成されたXcodeプロジェクトを開く. エラー

Failed to register bundle identifier
The app identifier "com.DefaultCompany.ARMap" 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.DefaultCompany.ARMap' were found
Xcode couldn't find any iOS App Development provisioning profiles matching 'com.DefaultCompany.ARMap'.
image

Bundle Identifierをユニークな文字列に変更すると,やはりエラーがなくなる.

hzuika commented 2 years ago

Failed to register bundle identifi… | Apple Developer Forums

developer.apple.comで既存のidentifierを削除すると,使えるようになるらしい. developer.apple.comではなく,ローカルで作ったidentifierなので,削除するなら別の方法になる.

hzuika commented 2 years ago

Xcodeの実機(build)エラー”Failed to register bundle identifier.” | kamiblog

新しいプロジェクトを作成したときに,既存のbundle identifierを使えないエラーである. ということは,UnityのBuildによって,毎回新しいXcodeプロジェクトが作成されるため,bundle identifierの重複エラーが起きているということになる.

hzuika commented 2 years ago

【Unity】iOSビルド時に無料アカウントのチームID(Personal Team ID)の入力を自動化する - LIGHT11

Edit > Project Settings ... > Player > Other Settings > Identification > Signing Team ID に値を入れてビルド. Xcodeプロジェクトを開くと,Automatically managing signingのチェックが外れているが,Teamの指定はされていた. ただ,結局,Automatically managing signingを指定すると,Teamの指定が一度外れる.

hzuika commented 2 years ago

⚠️

ユニークな文字列に変更すると成功する.

ユニークな文字列を追加しすぎると,エラーになる.

Communication with Apple failed.
Your maximum App ID limit has been reached. You may create up to 10 App IDs every 7 days.
hzuika commented 2 years ago

XcodeでWindow > Devices and Simulators デバイスを右クリックして,Show provisioning profilesにあるプロファイルを削除しても意味がなかった.

hzuika commented 2 years ago

ビルドするときに,新しいフォルダ(Build220616/)を作って,そこにビルド. Xcodeを開いて,既存(Build/)のBundle Identifierが使える. 以降は,Build220616にReplaceしてもAppendしてもいい. 大事なのは,削除されていないXcodeプロジェクトのBundle Identifierを使うということ?