Installation Failed “Invalid argument” when trying

2019-01-13 14:57发布

I added a vanilla Today Application Extension and run with the new scheme created by XCode.
After it finishes building ("Build Succeeded" pops up), it failed straight away with this error:

Installation Failed
Invalid argument

I've been trying to find answers for 6 hours now, no luck so far. Please help!

11条回答
劫难
2楼-- · 2019-01-13 15:30

Maybe you are bundling a conflicting "contents" referenced (blue) folder.

Hint: change the name of said "contents" folder :)

查看更多
Viruses.
3楼-- · 2019-01-13 15:33

Check if the Bundle Identifier isn't empty in the Info.plist

查看更多
The star\"
4楼-- · 2019-01-13 15:38

Try this:

  1. Quit Xcode
  2. Clean out ~/Library/Developer/Xcode/DerivedData manually
  3. rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache"
  4. iOS Simulator > Reset Content and Settings
查看更多
何必那么认真
5楼-- · 2019-01-13 15:39

I was getting the same error - although in different conditions - and it took me a while to realise that I had inadvertently messed with the Info.plist (thank you user2866588!) via a Search & Replace operation.

Once fixed that file, the error went away. It's a long shot, but you never know...

查看更多
Lonely孤独者°
6楼-- · 2019-01-13 15:40

This issue occurred in my case when the phone's memory was too low to install the app. I've cleaned up the phone and voila!

Another hint might be this post.

查看更多
ら.Afraid
7楼-- · 2019-01-13 15:42

I got this error when my test phone had low memory (around 288MB free). After restart and clearing some cached data, I was able to install my app.

查看更多
登录 后发表回答