简体   繁体   中英

Xcode 3 projects in Xcode 4

I just upgraded from Xcode 3 to 4. Have been playing around a bit first to get used to the new interface and trying to find where everything has moved to... (pfffff). New projects seem to work fine but it's definitely a large transition.

Now I tried opening some older projects but something strange happens... ALL my projects are iPhone projects, none is for OS X but when opened in Xcode 4 it says in the left most pane: 1 target, missing base SDK. In the right pane I see: Mac OS X Application Target, everything in the Targets Section is related to OS X and NOT to iPhone.

I tried adding a target for iPhone, but still the target is missing. I then deleted the OS X target and see in the left pane: 1 target, IOS SDK 4.3 but the "Run" option in Project menu is still disabled.

I also tried this with sample files from tutorials I used in the past (eg Beginning iPhone 3 Development en More iPhone 3 development) but I have the same problem!

1) Shouldn't Xcode open those Xcode 3 projects just fine? 2) What can I do to have the "Run" option working again?

You need to set two Build Settings:

  1. For Base SDK - set this to Latest iOS
  2. For Deployment Target - set this to iOS 4.3 (or whatever the minimum SDK is that you want your app to work on.

Related to point 1 - if you hard code the SDK version here, then whenever it's upgraded, you'll likely get error messages about missing SDKs if the old one is removed

Yo have to try this You have to select your project then in middle pane you have to select "Targets" and then go to "Build Settings" tab and in base SDK select "IOS 4.3".

Your project -->Targets(your Project Name) -->Build Settings -->Base SDK --> IOS 4.3

You need to set Base SDK and IOS Deployment Target. My Xcode 3 projects works fine after that.

If you select your project, in the editor window you get the PROJECT and TARGETS to work with. You can set proper values their.

You may need to do more things. In Xcode4 configurations are managed using Scheme. So, Go to Menu -> Product -> Manage Scheme , Select your scheme, and Edit your scheme.

You may relieved off some issues there.

You need to follow both answer, set the base SDK and manage the SCHEME.some times you may not see the iphone simulator option in the dropdown list then go to Manage scheme change debug to release then you may see the iphone simulator in dropdown and change it back to debug mode.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM