简体   繁体   English

如何使iPhone4及以下版本的应用程序兼容iPhone5?

[英]How to make iPhone4 and below version app compatible for iPhone5?

I have an application in iphone market which works for iPhone 4s and lower version. 我在iphone市场有一个适用于iPhone 4s和更低版本的应用程序。 So now iPhone 5 has been launched which bigger size screen, my question is what all changes i have to do in my application so that it will be compatible with iPhone 5 also. 所以现在iPhone 5已经推出更大尺寸的屏幕,我的问题是我在我的应用程序中所做的所有更改,以便它也将与iPhone 5兼容。

1) Do i have to rebuild my app for iPhone 5? 1)我是否需要为iPhone 5重建我的应用程序?

2) Do i have to make changes only in UI ? 2)我是否必须仅在UI中进行更改?

3) Will the iPhone 5 will its make it compatible? 3)iPhone 5是否会兼容它?

Your valuable replies will help me a lot. 您的宝贵回复将对我有所帮助。 Thanks in advance. 提前致谢。

Here is my answers, 这是我的答案,

1) Do i have to rebuild my app for iPhone 5? 1)我是否需要为iPhone 5重建我的应用程序?

If you want to utilize the complete screen space, you can add Default-568h@2x.png and rebuild the app and release it. 如果要使用整个屏幕空间,可以添加Default-568h@2x.png并重新Default-568h@2x.png应用程序并将其释放。

2) Do i have to make changes only in UI ? 2)我是否必须仅在UI中进行更改?

You can utilize the complete screen space for iphone 5. You can code for screen modifications in case of other iPhones. 您可以使用iphone 5的完整屏幕空间。您可以编码其他iPhone的屏幕修改代码。

3) Will the iPhone 5 will its make it compatible? 3)iPhone 5是否会兼容它?

Yes. 是。 It will make it automatically compatible. 它会使它自动兼容。 It will add a black strip on top and bottom to compensate for the extra space in the screen unless you add Default-568h@2x.png . 它将在顶部和底部添加黑条以补偿屏幕中的额外空间,除非您添加Default-568h@2x.png

If your app uses the standard UIKit provided by Apple, you only need to add a 4 inch launch image to your app, and it will automatically resized itself. 如果您的应用使用Apple提供的标准UIKit,您只需要在应用中添加4英寸的启动图像,它就会自动调整大小。 But if your app using custom controls or graphics-heavy like in games, you might want to adjust the images and take advantage of the larger screen. 但是,如果您的应用程序使用自定义控件或类似于游戏中的图形,您可能需要调整图像并利用更大的屏幕。

You also have to make sure the methods you used do not deprecated on iOS6 to prevent the app from crashing. 您还必须确保在iOS6上不要弃用您使用的方法以防止应用程序崩溃。 Some references if you need further reading. 如果您需要进一步阅读,请参考

To make older app compatible with iPhone 5 You need to look for Following things. 要使旧版应用与iPhone 5兼容您需要寻找以下内容。

  1. Latest Xcode version 4.5. 最新的Xcode版本4.5。

  2. Open your project and select Upgrade settings for new version. 打开项目,然后选择“升级新版本的设置”。

  3. Add Default-568h@2x.png for new resolution . 添加Default-568h@2x.png以获得新的分辨率。

  4. For UI you have to change your xib's object autoresizing property.When you select View Go to inspector and select size property It will show you None, Full Screen, Retina 4 options . 对于UI,您必须更改xib的对象自动调整属性。当您选择View Go to inspector并选择size属性时它将显示None,Full Screen,Retina 4选项。 Set autoresize property for all your Buttons , labels and check xib for retina 4 and None both.It is same like you set it for Landscape and portrait . 设置所有按钮,标签的自动调整属性,并检查视网膜4和无两者的xib。它与为横向和纵向设置它相同。

5.Some other changed will be in code because some method has been depreciated for ios 6.0. 5.其他一些更改将在代码中,因为某些方法已针对ios 6.0进行了折旧。 6. After doing all this .You can run it on iphone 5 simulator for testing. 6.完成所有这些后。您可以在iphone 5模拟器上运行它进行测试。

I have an app that was using GLKMatrix3 and its supporting functions. 我有一个使用GLKMatrix3及其支持功能的应用程序。 I found that the GLKMatrix3Multiply function would always crash on iPhone 5 hardware. 我发现GLKMatrix3Multiply功能总是会在iPhone 5硬件上崩溃。 Easy to workaround using GLKMatrix4 instead, but the point is that I would never have found the problem without actually trying my app on iPhone 5 hardware. 使用GLKMatrix4轻松解决方法,但重点是,如果不在iPhone 5硬件上实际尝试我的应用程序,我将永远不会发现问题。

I was told to file a bug for the GLKMatrix3 problem, so maybe this will be fixed. 我被告知要为GLKMatrix3问题提交一个错误,所以可能会修复这个问题。 But the code runs just fine in the iOS 6 simulator. 但是代码在iOS 6模拟器中运行得很好。

I learned from this that, whether or not you need to rebuild your app for iPhone 5, you do need to at least run your app on a device before advertising support for that device. 我从中了解到,无论您是否需要为iPhone 5重建应用程序,您都需要在广告支持该设备之前至少在设备上运行您的应用程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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