问题
I am getting the following error when I try to run my Apple Watch app on my device:
error: WatchKit App doesn't contain any WatchKit Extensions. Verify that the value of NSExtensionPointIdentifier in your WatchKit Extension's Info.plist is set to com.apple.watchkit.
The value of NSExtensionPointIdentifier is set correctly.
Has anyone else experienced this error?
回答1:
I fixed the issue by changing the deployment target to 9.0 in the Extension's Build Settings.
回答2:
Every time I met same situation, below actions solved:
1.clean your project and close Xcode.
2.remove pod-related-files(Podfile.lock, Pods, ProjectName.xcworkspace)
3.remove derived file
4.pod update(install)
or, executing following shell(2,3,4) may help you.
#!/bin/sh
# remove derived file
rm -rf ~/Library/Developer/Xcode/DerivedData/
# remove pod-related-file
rm Podfile.lock
rm -rf Pods
rm -rf *.xcworkspace
# pod install(update)
pod install
# open projects
open ProjectName.xcworkspace
回答3:
Had the same issue, please check that watch extension's source files' targets are properly set.
回答4:
I ran into this issue recently, the problem for me ended up being Mach-O Type was set to static
Go to build settings of watchkit app/extension and make sure:
Mach-O Type = Executable
回答5:
Even though the error message from the following StackOverflow question is the opposite (extension doesn't contain app, instead of app doesn't contain extension), temporarily changing the product name in the watch app's build settings and then changing it back fixed the problem for me:
https://stackoverflow.com/a/41675320/462162
来源:https://stackoverflow.com/questions/32041382/nsextensionpointidentifier-error-only-on-real-device