Firstly,when you are using Cocoapods to Develop iOS projects,you need to open the project with .xcodeworkspace
file instead of .xcodeproj
file.

Secondly you can Show Package Contents
with .xcworkspace
file,you will find the contents.xcworkspacedata
file.

<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:BluetoothColorLamp24G.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
</Workspace>
pay attention to this line:
location = "group:BluetoothColorLamp24G.xcodeproj"
The .xcworkspace
file has reference with the .xcodeproj
file.
If you find there is no file or wrong path about the location,you can link to your .xcodeproj
file,which works for me.
Development Environment:
macOS 10.14
Xcode 10.1