开发者

iPhone/iPad universal build problem with firmware version

I was doing a project as Universal binary for iPhone/iPad. I created the iPhone app side and I was doing to complete the iPad too. I noticed one thing, on iPad classe开发者_如何学Pythons I use the UIPopoverController class, means that when I build now for 3.2 in the Simulator, it runs te iPad one and it works fine, BUT if I want to see the iPhone version app, means 3.1.3, It give me an error of framework missing in the iPad classes.

I have no idea how to solve this problem because I cannot anymore see the iPhone version of the app and make changes. I can only remove all the iPad classes and after reimport again.

thanks guys!


With the 3.2 SDK the Simulator will only run as an iPad.

If you want to test your iPhone side, you will have to wrap the 3.2 specific code in preprocessor conditions to make it compile with 3.1.3.

If you have a device, you should be able to compile both the iPad and the iPhone version using the 3.2 SDK by setting the "Deployment Target" setting in your target's build settings. Set it to the lowest version of iPhone OS you're willing to support, for example, 3.1.3 and compile using 3.2. You will also need to "weak link" against any new 3.2 frameworks, such as Core Text.

Finally, if you're not already, you should be using runtime checks to make sure your iPhone version doesn't try to make use of any 3.2 features, such as popovers.

This way, you won't have to remove your popover references and you should be able to compile. However, as I said, this will only be useful if you have a physical device to test with.

If you want to use the simulator, you'll have to follow the preprocessor conditions method.


You can only build with 3.2 Base SDK and iPhone OS Deployment Target 3.1.3 (or earlier). When you do this, the simulator will only run as 3.2/iPad. That's just how it is.

You will therefore need to debug on an actual device for iPhone testing.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜