Xcode 4.5 Release Notes
New Features
Editing User Interfaces
- The Interface Builder canvas includes a new button to toggle between iPhone screen layouts. When you click the button, Xcode resizes full-screen views to match the selected iPhone screen size. When the top level views are resized, Xcode uses the resizing rules specified by layout constraints or springs and struts in the size inspector to reflow the contained views. 12290237Use this button to toggle between layouts and ensure that the resizing rules you define work as expected on both the new Retina 4 screen and previous screen sizes.
Editing User Interfaces: Storyboards
- Storyboards now support view controller containment. You can add child view controllers to a parent view controller in a storyboard. At runtime, when the
viewDidLoad
method is called on the parent controller, its view hierarchy (composed of the view hierarchies of its child controllers) is already loaded. 9630246To add a view controller as the child of another view controller:- Add a container view from the Object library.
- Connect the container view to the child view controller with an embed segue.
Enhancements
General
- When Xcode autocreates schemes, it now adds the new schemes in project order (within the workspace) and target order (within each project). 7996506
Editing User Interfaces: Storyboards
- You can now specify that modal segues be presented without animation. 10384049
- You can now create unwind segues that allow transitioning to existing instances of scenes in a storyboard. 9211697.With earlier releases of Xcode, you may have implemented unwind segues programmatically. See iOS SDK Usage for details.
iOS SDK Usage
- When your app runs on iOS 6.0 or later, in the
shouldPerformSegueWithIdentifier:sender:
method of yourUIViewController
subclass, you can decide whether to trigger a segue with a specific identifier, which you set in the segue’s Attributes inspector. 9447109
Source Control: Subversion
- When you update your Subversion-managed project, Xcode now automatically applies the update if there are no conflicts. 11913482To see changes from the repository before applying them, choose File > Source Control > Update while holding down the Control key.
Changes
General: iOS
- This version of Xcode does not generate armv6 binaries. 12282156
- The minimum deployment target is iOS 4.3. 12282166
- In this Xcode release, Auto Layout is turned on for new user interface documents (storyboards and nib files). Because Auto Layout requires iOS 6.0, using such user interface documents on earlier iOS releases results in a crash or other undefined behavior. 12289644For your app to run on earlier iOS releases, turn off Auto Layout in its user interface documents.
Distributing Apps: IOS
- This release of Xcode doesn’t allow submitting to the App Store apps with iOS Deployment Target set to iOS releases earlier than iOS 4.3. The validation process fails with the message “This bundle is invalid. The key UIRequiredDeviceCapabilities in the Info.plist may not contain values that would prevent this application from running on devices that were supported by previous versions.” 12309358Set the app’s iOS Deployment Target to iOS 4.3 or later.
Creating Projects
- Projects created using this Xcode release use the new libc++ implementation of the standard C++ library. The libc++ library is available only on iOS 5.0 and later and OS X 10.7 and later. 12221787To enable deployment on earlier releases of iOS and OS X in your project, set the C++ Standard Library build setting to libstdc++ (Gnu C++ standard library).
Managing Devices
- Uploading app data files to an iOS device works correctly on OS X v10.7 and v10.8. 12017933
Source Control
- RCS and CVS are deprecated in this Xcode release. 12252058
Installing
- Starting in Xcode 4.3, the
Xcode.app
file package contains all the Xcode developer tools. The man pages for the command-line tools Xcode uses are also placed in this package. However, these man pages are not included in the places searched by theman
command. To access these man pages, you must add them to the index of man pages used by theman
command. 10658081To add the Xcode man pages to the man-page index:- Construct
MANPATH
for theXcode.app
package you’re using by executing these shell commands:#!/bin/tcsh
set xcodeManPathsTmp=/tmp/Xcode
# Expect to find Xcode.app in /Applications
find /Applications/Xcode.app -name man >! $xcodeManPathsTmp
sudo cp $xcodeManPathsTmp /etc/manpaths.d
- Set the
MANPATH
environment variable in your command shell:- C-ShellEdit
/etc/csh.login
by adding this line before the <code>if ( -x /usr/libexec/path_helper ) then
line:setenv MANPATH ""
- Bourne ShellEdit
/etc/profile
by adding this line before theif [ -x /usr/libexec/path_helper ]; then
line:export MANPATH=""
Thepath_helper
command adds the paths in themanpaths.d
file to thePATH
andMANPATH
environment variables.
- Open a new shell window, and verify that
MANPATH
lists the paths to theXcode.app
package you’re using. - Index the man pages by executing this shell command:
sudo /usr/libexec/makewhatis
New Issues
Editing User Interfaces
- When you add a gesture recognizer in a storyboard, it mistakenly overrides the system-supplied gesture recognizers for the target view. For example, adding a tap gesture recognizer to a table view results in a table view that does not scroll. 12200238Disconnect the gesture recognizer in the storyboard, and apply it in code.
Performance Measurement and Analysis: Instruments
- A UI automation script being run with a simulator target in Instruments fails if your Mac contains multiple copies of Xcode and the Xcode install path is not set up correctly. 12288632Determine the path to the running Xcode instance by executing this shell command:
$ xcode-select --print-path
If the returned path doesn’t point to the running Xcode instance, execute this shell command:$ xcode-select -switch <path_to_the_Xcode_package>
- In the command,
<path_to_the_Xcode_package>
is the path to theXcode.app
package you’re using—for example,/Applications/Xcode.app
.
Known Issues
General
- Xcode may not show any windows when it’s launched. This happens when you download Xcode from https://developer.apple.com and the “Close windows when quitting an application” preference in System Preferences is unselected. 11865559Switch to another app and relaunch Xcode.
Editing Core Data Models
- MobileMe syncing support is deprecated. However, the
syncable
property is still set toYES
by default in the User Info Dictionary for entities and properties, but the model editor doesn’t show this setting. 10787672To explicitly setsyncable
toNO
for an entity or a property, add a key-value pair in your User Info Dictionary:- Select the entity or property for which you want to turn off synching on a model file.
- In the User Info section in the Data Model inspector, add this key-value pair:key
"com.apple.syncservices.Syncable"
value"NO"
Editing Source Code
- Text and font rendering on OS X v10.8 is optimized for Retina display. On a non–Retina display running OS X v10.8, some font configurations can appear blurry in Xcode. 11486875Switch back to non–Retina display optimized text and font appearance in Xcode by entering this command in Terminal:
defaults write com.apple.dt.Xcode NSFontDefaultScreenFontSubstitutionEnabled -bool YES
Localization
- When you select the Use Base Internationalization option in the project editor, Xcode generates strings files for each your project’s user interface documents. 11462724To resynchronize your strings files with new content from your user interface documents, use the
--generate-strings-file
option of theibtool
command to produce new strings files. Then, manually merge the new files into your existing localized strings.
Autolayout: Runtime
- At runtime, when adding subviews to a split view while loading both views from nib files, you may see log messages about unsatisfiable constraints because of autoresizing mask constraints on the split view panes. These are benign log messages because a split view automatically fixes the problem after adding the subview. 11614767In your code, before adding the subview to the split view, send
setTranslatesAutoresizingMaskIntoConstraints:NO
to the subview.
Debugging: LLDB
- The
po
,print
, andexpression
commands cannot access enumerators directly. You must use the name of the enumeration. 11485295For example, if your code containsenum MyEnum { e1, e2 };
, LLDB emits an error if you typeprint e1
. Instead, typeprint MyEnum::e1
.
Xcode 4.4.1 Release Notes
Changes
Distributing Apps
- Xcode no longer preserves an app’s designated requirements when you submit it to the App Store. 12006125Some apps where prevented from submission because of designated requirements.
Resolved Issues
Debugging
- After quitting iOS Simulator directly, Xcode continues to show the process launched on the simulator as running. 11998376
Editing Source Code
- Xcode doesn’t offer code completion in Objective-C++ files. 12006547
Compiling: LLVM
- The LLDB debugger gets the wrong address for some variables. 12006552
- When compiling an Objective-C++ file in C++11 with vectors under automatic reference counting (ARC), the LLVM compiler generates incorrect code. 12006560
- Objective-C code compiled under ARC and optimized for size may crash at runtime. 12006567
Unit Testing
- Xcode becomes unresponsive while running unit tests. 12017975
Known Issues
Managing Devices
- Uploading app data files to an iOS device may not work. 12017933
- On OS X v10.8, duplicate the
.xcappdata
file, and upload the duplicate. - On OS X v10.7 there is no workaround to this issue.
Xcode 4.4 Release Notes
New Features
General
- You can drag file, directory, and group icons from the jump bar to the project navigator, a Finder window, and other apps. 7452760
- The Use Base Internationalization setting in the project editor works only on Mac products for deployment on OS X v.10.8 and later. Xcode must also be running on OS X v.10.8 or later. This setting is not supported on iOS projects. 11712855
Editing Source Code
- The source editor can remove trailing whitespace at the end of a line after you have edited it. You control this behavior with the “Automatically trim trailing whitespace” option in Text Editing preferences. 2535591
- When the “Automatically insert closing braces” option in Text Editing preference is turned on, as you type an opening parenthesis, brace, or quotation mark, the source editor adds the corresponding closing character. When the “Enable type-over completions” option is turned on, the editor adds the closing character in a state in which you can type over the character. This feature reduces the appearance of duplicate closing characters, such as when you type both the open and close characters quickly. 3780948Press Tab to jump over the closing character.
Compiling: ARM
- LLVM integrated assembler for ARM. This new assembler improves compilation times for iOS products, and provides better user level diagnostics for ARM assembly code. This assembler uses only Unified Assembly Language (UAL) assembly code; therefore, you may need to update projects that use manually generated assembly code. 9136376Use the
clang
-no-integrated-as
command-line option in projects with substantial Divided Syntax assembly code while transitioning to UAL.
Enhancements
Editing Source Code
- During a code completion interaction, Xcode gives higher priority to completions you have used recently. 9790948
Editing Property Lists
- You can view and modify the root object of a custom property list file. 8635494
Creating Projects
- When creating a project, you can choose whether to add it to a workspace or create a standalone project. 8032086
Resolved Issues
Editing User Interfaces
- When you hold down Option and place the pointer over views in the canvas, the distance values are not obscured by other elements, such as the resizing handles. 8204499
File System
- You can rename a file just by changing the case of one of the letters in its filename, even on a case-insensitive file system. 7846036
New Issues
General
- A failure to rebuild precompiled header (PCH) files causes syntax highlighting, code completion, and Command+click navigation to behave incorrectly. 11538640Delete the PCH index folder.
- Xcode may not show any windows when it’s launched. This happens when you download Xcode from https://developer.apple.com and the “Close windows when quitting an application” preference in System Preferences is unselected. 11865559Switch to another app and relaunch Xcode.
Editing Source Code
- Text and font rendering on OS X v10.8 is optimized for Retina display. On a non–Retina display running OS X v.10.8, some font configurations can appear blurry in Xcode. 11486875Switch back to non–Retina display optimized text and font appearance in Xcode by entering this command in Terminal:
defaults write com.apple.dt.Xcode NSFontDefaultScreenFontSubstitutionEnabled -bool YES
Editing Core Data Models
- MobileMe syncing support is deprecated. However, the
syncable
property is still set toYES
by default in the User Info Dictionary for entities and properties, but the model editor doesn’t show this setting. 10787672To explicitly setsyncable
toNO
for an entity or a property, add a key/value pair in your User Info Dictionary:- Select the entity or property for which you want to turn off synching on a model file.
- In the User Info section in the Data Model inspector, add this key/value pair:key
"com.apple.syncservices.Syncable"
value"NO"
Localization
- When you select the Use Base Internationalization option in the project editor, Xcode generates strings files for each your project’s user interface documents. 11462724To resynchronize your strings files with new content from your user interface documents, use the
--generate-strings-file
option of theibtool
command to produce new strings files. Then, manually merge the new files into your existing localized strings.
Debugging: LLDB
- The
po
,print
, andexpression
commands cannot access enumerators directly. You must use the name of the enumeration. 11485295For example, if your code containsenum MyEnum { e1, e2 };
, LLDB emits an error if you typeprint e1
. Instead type,print MyEnum::e1
.
Autolayout: Runtime
- At runtime, when adding subviews to a split view while loading both views from nib files, you may see log messages about unsatisfiable constraints because of autoresizing mask constraints on the split view panes. These are benign log messages because a split view automatically fixes the problem after adding the subview. 11614767In your code, before adding the subview to the split view, send
setTranslatesAutoresizingMaskIntoConstraints:NO
to the subview.
No comments:
Post a Comment