tl;dr
info_plist_path
の実体が xcodeproj + ".." + plist_path
になるようにパラメータを書け
どういうこと?
update_app_identifier()
とか update_info_plist()
とかは、 iOS向けビルドを作るために fastlane にお仕事してもらう際、アプリのBundle IDとかアプリ名称とかを変更してもらう時に使う。
Dev版と本番で名前変えたいとかそういうたぐい。こんな使い方。
update_app_identifier(
xcodeproj: PROJ_PATH,
plist_path: PLIST_PATH,
app_identifier: "com.example.testapp.dev"
)
update_info_plist(
xcodeproj: PROJ_PATH,
plist_path: PLIST_PATH,
display_name: "[dev] example app"
)
んで、カンで 「xcodeproj と plist_path それぞれそのものを示してればいいんだろうなー」と考えて設定していたが、どうしてもfastlaneがその .plist を見つけられない。
原因は
この2つ、 .plist へのパスをこんな風に作ってやがりました。
info_plist_path = File.join(params[:xcodeproj], '..', params[:plist_path])
('A`)なんで
遠因は
この時いじっていたのが ionic だったので、プロジェクトフォルダが ./platforms/ios/target.xcodeproj
とかにあり、真面目に相対パス書いてたのでこのパスの作り方の地雷を踏んだ形。
update_info_plist(
xcodeproj: "./platforms/ios/target.xcodeproj",
plist_path: "./platforms/ios/target/target-Info.plist"
)
↓
info_plist_path = "./platforms/ios/platforms/ios/target/target-Info.plist"
そりゃそんな所には何もありませんわ....
対処は
別に xcodeproj に指定してるパスに対して何かをしてるわけではなさそうなので、出来上がる info_plist_path
を想像しながら
update_info_plist(
xcodeproj: "./target.xcodeproj",
plist_path: "target/target-Info.plist"
)
とか書いてやりゃあいい。
地雷踏んでた ionic の例だとこう。
update_info_plist(
xcodeproj: "./platforms/ios/target.xcodeproj",
plist_path: "target/target-Info.plist"
)