Show: Delphi C++
Display Preferences

Using iOS 7

From RAD Studio
Jump to: navigation, search

Go Up to iOS Mobile Application Development


RAD Studio contains FireMonkey support for iOS 7. This includes:

  • FireMonkey iOS 7 style and resource files.
  • Automatic iOS 7 user interface styling at run time on your iOS 7 device.
  • The iOS version style selector in the FireMonkey Mobile Form Designer:
    • Sets the iOS style version to be used in design time for iOS apps (you can choose either iOS 6 or iOS 7).
      MobileToolbarWiOSSelector2.png

Contents

Creating and Enabling App Icons for iOS 7 (App Store Requirement)

To build an iOS 7 application for the Apple App Store, you need to create and add two new app icons for iPhone and iPad devices: a high-resolution app icon and a standard-resolution app icon. These app icons are not required for ad hoc distribution of your iOS app.

Sizes of app icons in iOS 7 and in XE5 are as shown in the following table:

App Icons: Sizes Required for iOS 7 vs. Sizes Supported in XE5

Target Device   Resolution   Size
for iOS 7  
Size
for iOS 6.1 (XE5)

iPhone, iPod

High

120x120

114x114

Standard

60x60

57x57

iPad

High

152x152

144x144

Standard

76x76

72x72

Creating App Icons for iOS 7

You need to create two app icons that have the following resolutions:

  • 120x120 pixels
  • 152x152 pixels

These app icons should have the .png file extension.

To create your icons, use any graphics program that can produce .png files of these resolutions.

Enabling iOS 7 App Icons in RAD Studio XE5

You must create and use a custom Info.plist file in order to use the two new app icons required for iOS 7.

When you use a custom Info.plist file, you start by creating your iOS application as usual, and setting up your artwork and icons (not including the two icons that you created for iOS 7), and so forth. Then you add a custom Info.plist file to your project, using the following steps:

  1. Build your iOS application. For this example, the project name is Project1, and the target is the iOS Device, Debug configuration.
  2. Locate the generated Info.plist file that the IDE creates for you when you build your iOS app. For example:
    C:\Users\yourname.EMBARCADERO\Documents\RAD Studio\Projects\iOSDevice\Debug\Project1.Info.plist
    Copy the generated Info.plist file to a different directory, so that it cannot be overwritten during product builds.
    For example, if you open a Command window and navigate to your \Projects directory, enter the following command to copy Project1.Info.plist from the \iOSDevice\Debug directory to your \Projects directory:
    copy .\iOSDevice\Debug\Project1.info.plist .
  3. In the IDE, add your custom Info.plist file to your project by selecting Project > Add to Project.
    Tip: This step is not required, but doing this makes it easier to find the file later when you want to edit it.
  4. Now you need to tell the IDE to deploy your custom Info.plist file and not the automatically generated one. This step is required.
    1. Select Project > Deployment and uncheck the entry that has the local name Project1.info.plist. You have now told the IDE to not deploy its generated Info.plist file.
    2. Now, to add the copied Info.plist to the project deployment, select Add Files DMgrAddFiles.png on the Deployment Manager toolbar, select Project1.info.plist (in your project directory) and press OK.
    3. Now you need to change the name of the remote file from Project1.info.plist to Info.plist.
      In the Deployment Manager, under Remote Name, click the file name, then click again.
      Make sure you enter Info.plist with an initial uppercase 'I' (case is significant).
  5. Now you need to add your iOS 7 app icons to your custom Info.plist file. Open your Info.plist file (if you added it to your project, you can double-click the file name in the Project Manager).
  6. In your custom Info.plist file, locate the following tags:
    <key>CFBundleIconFiles</key>
    <array>
    <string>FM_ApplicationIcon_57x57</string>
    <string>FM_ApplicationIcon_114x114</string>
    <string>FM_ApplicationIcon_72x72</string>
    <string>FM_ApplicationIcon_144x144</string>
    </array>
  7. Add your two iOS 7 app icons to the list. For example, if the names are Icon120x120.png and Icon152x152.png, then the section should look like this (you should add just the file names, without paths):
    <key>CFBundleIconFiles</key>
    <array>
    <string>FM_ApplicationIcon_57x57</string>
    <string>FM_ApplicationIcon_114x114</string>
    <string>FM_ApplicationIcon_72x72</string>
    <string>FM_ApplicationIcon_144x144</string>
    <string>Icon120x120</string>
    <string>Icon152x152</string>
    </array>
  8. In the Deployment Manager, select Add Files DMgrAddFiles.png, and add these two new icon files to your project deployment. (There is no need to change the remote names with these files.)
  9. Now you should be able to run your project on a device using iOS 7, and see your new iOS 7 style app icons.

See Also

Personal tools
In other languages