1. 程式人生 > >iOS the file "xxx.app" couldn't be opened because you don't have permission to view it.

iOS the file "xxx.app" couldn't be opened because you don't have permission to view it.

最近重構專案,增加target來區分環境進行差異化編譯配置。

報錯the file "xxx.app" couldn't be opened because you don't have permission to view it.


後發現


對應target的info檔案中的欄位Executable file (CFBundleExecutable)值是VANCL,而build settings欄中的Packaging中的Product Name 值是VANCL-Demo,這2個值不一致就會導致上述截圖的問題。而值相同的話,就沒有問題。


so,將Executable file的值改為$(PRODUCT_NAME),使得2個值保持一致,再次build,ok,編譯通過。