Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How Single App Binary Supports 64-bit and 32-bit Apps

We can see apple announcement here.. According to this doc, we can submit same binary with supporting 32-bit and also 64-bit. I found one stack overflow answer here. But According to this answer, we should set deployment target as IO7+. But apple doc said, you can submit this with IOS 7 and IOS 6 support? My question is, How can we generate binary with supporting 32-bit and 64-bit by deployment target IOS6+?

Note: I'm using xcode 5.0

Update: Question above is fixed by using xcode 5.0.2. But I get confused how can I make code for 32-bit as well 64-bit. I know one thing, we must do code for two separately in some times. But How can I do?. for example, if one method in deprecated in ios6 means, we provide code for ios 6 and ios7 also. In same case also followed here or do some other technic for this.

like image 538
Mani Avatar asked Jan 18 '14 05:01

Mani


People also ask

What is difference between 32 bit and 64 bit applications?

As its name suggests, the 32 bit OS can store and handle lesser data than the 64 bit OS. More specifically, it addresses a maximum of 4,294,967,296 bytes (4 GB) of RAM. The 64 bit OS, on the other hand, can handle more data than the 32 bit OS.

Can I run a 64-bit program on 32-bit?

The 64-bit versions of Windows don't provide support for 16-bit binaries or 32-bit drivers. Programs that depend on 16-bit binaries or 32-bit drivers can't run on the 64-bit versions of Windows unless the program manufacturer provides an update for the program.

How can I run 32-bit software on 64-bit Ubuntu?

As far as I know, the same approach should work for 32 on 64 and for 64 on 32. Just change dpkg --add-architecture i386 to dpkg --add-architecture amd64 .

What's the difference between a 32 and 64-bit processor?

What Are 32-Bit and 64-Bit? When it comes to computers, the difference between 32-bit and a 64-bit is all about processing power. Computers with 32-bit processors are older, slower, and less secure, while a 64-bit processor is newer, faster, and more secure.


1 Answers

Xcode can build your app with both 32-bit and 64-bit binaries included so it works across all devices running iOS 7. If you wish to continue to support iOS 6 then you will need to build for 32-bit only. Next month we will be making changes that will allow you create a single app binary that supports 32-bit on iOS 6, as well as 32-bit and 64-bit on iOS 7.

Converting Your App to a 64-Bit Binary

At a high level, here are the steps to create an app that targets both the 32-bit and the 64-bit runtime environments:

1.Install Xcode 5.0.1.

2.Open your project. Xcode prompts you to modernize your project. Modernizing the project adds new warnings and errors that are important when compiling your app for 64-bit.

3.Update your project settings to support iOS 5.1.1 or later. You can’t build a 64-bit project if it targets an iOS version earlier than iOS 5.1.

4.Change the Architectures build setting in your project to “Standard Architectures (including 64-bit).”

5.Update your app to support the 64-bit runtime environment. The new compiler warnings and errors will help guide you through this process. However, the compiler doesn’t do all of the work for you; use the information in this document to help guide you through investigating your own code.

6.Test your app on actual 64-bit hardware. iOS Simulator can also be helpful during development, but some changes, such as the function calling conventions, are visible only when your app is running on a device.

7.Use Instruments to tune your app’s memory performance.

8.Submit an app that includes both architectures for approval.

The remainder of this chapter describes problems that frequently occur when porting a Cocoa Touch app to the 64-bit runtime environment. Use these sections to guide your own efforts to investigate your code.

From https://developer.apple.com/library/ios/documentation/General/Conceptual/CocoaTouch64BitGuide/ConvertingYourAppto64-Bit/ConvertingYourAppto64-Bit.html#//apple_ref/doc/uid/TP40013501-CH3-SW1

like image 197
codercat Avatar answered Sep 20 '22 07:09

codercat