Behlül
Behlül

Reputation: 3452

Xcode cannot run using the selected device (Weird error)

I'm trying to debug an application on my iphone. I was able to do it before I updated Facebook client library yesterday. After updating, something weird happened and now I got the "Xcode cannot run using the selected device" error.

Error screenshot

Error can be seen from the screenshot. Note that in the upper middle it says "Finished running FacebookSDK on baysungur's iPhone", which is weird because my app's name is different.

I tried some things like adding architectures to build settings, decreasing minimum deployment target, etc. They did not work.

Anyone has any idea?

I'm using Mountain Lion and Xcode 4.4.1. I'm trying to connect to a iphone 4.

Note: I was able to connect to device before updating that facebook client.

edit: Well, a similar thing also happens for simulator. Now I basically can not debug my app in any way.

Upvotes: 2

Views: 3364

Answers (2)

Behlül
Behlül

Reputation: 3452

Facebook library had a file named Info.plist, which caused xcode's head to be confused.

Weird thing is that I was seeing correct settings in project's settings. I mean everything seemed correct in that UI but appearantly xcode was using wrong Info.plist in action.

Deleting that second Info.plist solved the issue.

Upvotes: 4

Mitesh Khatri
Mitesh Khatri

Reputation: 3955

Is device is connected in organizer? If yes then quit your xcode and also restart your device and choose valid provisioning profile and try again.

thanks

Upvotes: 0

Related Questions