willhains / Kotoba

Quickly search the built-in iOS dictionary to see definitions of words. Collect words you want to remember.
MIT License
547 stars 59 forks source link

Failed to install the requested application #78

Closed PinYuanChen closed 1 year ago

PinYuanChen commented 1 year ago

I download the zip file and follow the instructions to modify values in info.plist. But I can't build the project. It keeps showing alert with title "Failed to install the requested application" and says "The application's Info.plist does not contain a valid CFBundleVersion. Ensure your bundle contains a valid CFBundleVersion." Does anyone have the same problem?

movsb commented 1 year ago

I encountered the same issue, it took me hours to address what the problem is, but I can't.

image
willhains commented 1 year ago

@PinYuanChen @movsb Please check the targets "Kotoba" and "ShareExtension", in the "General" tab. What do you see in the "Version" and "Build" fields?

movsb commented 1 year ago

Hi willhains, For the Kotoba, there're values.

图片

For the ShareExtension, Build is empty.

图片

But it doesn't work even though I fill a value.

图片

And then, I tried to edit the ShareExtension's Info.plist directly using Vim, but when I click the Run again, it goes back to empty.

图片
willhains commented 1 year ago

@movsb Thanks for the screenshots. This might be caused by one of the Build Phases, which (sorry) assumes you are running from a cloned Git repo. I guess you downloaded the zip file?

Try this for both the "Kotoba" target, and the "ShareExtension" target:

  1. Select the target, then select the "Build Phases" tab.
  2. Find the "Run Script" phase that contains buildNumber in it.
  3. Click the trash can icon to delete that build phase.
  4. Go back to the "General" tab, and double-check it has values in both the "Version" and "Build" fields.

Finally, build and run.

Screenshot showing the items described in the steps above

movsb commented 1 year ago

Yes, I downloaded the zip archive instead of cloning the entire repository.

Unfortunately, it still doesn't work. But... this time I can edit the Info.plist file and no background process reverts it back.

I can now run this exciting app, thanks for your great help.

willhains commented 1 year ago

Great!