When I look at my schemes in xcode 4 after I connect my iPad, I see two schemes listed for my device (one to the right of my project name in the drop down list, and one right underneath it). I don't see any discernible difference in the schemes when I select Edit Scheme, but when I try to build the topmost one, I always get errors such as:
Cannot find protocol declaration for 'NSXMLParserDelegate'
Does anyone know why there are two device schemes or why the topmost one gets errors like the above one (but not the second one)?
I had the same problem. I found two SDKs in my Xcode.app
:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/
iPhoneOS4.3.sdk
iPhoneOS5.1.sdk
I delete an old SDK iPhoneOS4.3.sdk
, now everything is ok.
These device entries were actually labelled in some previous versions of Xcode as -
Xcode is displaying a device scheme for each of the iOS SDKs you have on your system.
If you want to remove those duplicate devices, you can either delete or move old SDK versions out of the system folder they reside in -
MACHD/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/...
Delete or transfer the old SDKs and relaunch Xcode to notice the updated device schemes. I'm not sure if you really want to be removing those SDKs... but that will get rid of those extra duplicate devices.
I had the same problem with an Xcode3 project when I upgraded it to Xcode4. I would have 5 "device" entries appear for each device I connected, but only the bottom-most one in the list would actually build successfully. I couldn't find any combination of settings that would resolve it, so I exported the scheme (which looked fine), deleted it, and let Xcode generate a new one. It's working fine now, so it must be some issue in the migration path.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With