Xcode este programul care contine toate uneltele necesare unui dezvoltator de aplicatii pentru dezvoltarea si lansarea unei aplicatii in App Store, iar in cursul acestei seri Apple l-a actualizat. Versiunea 5.1 a Xcode vine impreuna cu iOS 7.1, permitand dezvoltatorilor sa-si faca aplicatiile compatibile cu noua versiune a sistemului de operare. Xcode 5.1 este lansat in ideea de a rezolva o multitudine de probleme ale versiunii anterioare, iar prin changelog-ul de mai jos puteti afla exact ce va functiona mai bine sau ce veti gasi nou.
- Quick Look can be implemented for developer defined classesWhen an instance of a custom class is viewed with Quick Look in the debugger variables view or a data tip, the debugger presents it using a method named
-debugQuickLookObjectdefined in the class implementation. For details on how to use this capability, see Quick Look for Custom Types in the Xcode Debugger. (12723736)
- Log breakpoint actions now print out the logical value of expressions.For example, a log breakpoint action such as
"myString = @myString@"now prints the value of
myString, rather than the pointer value. (13211695)
Editing User Interfaces
- Interface Builder documents can contain specific information about new features they use and the OS versions they require, allowing previous versions of Xcode to display better warning messages when trying to open such documents. (7659982)
- Building interfaces in Interface Builder using auto layout offers the full suite of possible constraint types: aspect ratios, proportional sizes and positions, cross attribute alignments, and a new constraint inspector with features for editing nearly all properties of a constraint.
- The Interface Builder constraint Attributes inspector shows a constraint’s items and attributes and allows editing of the attributes. This feature enables the ability to create cross-attribute constraints such as
view1.centerY = view2.bottom. (13739009)
- You can use Interface Builder to edit the relation of any type of constraint, including alignment constraints (for instance,
view1.leading <= view2.leading) and equal size constraints (for instance,
view1.width >= view2.width). (14721954)
- You can create aspect ratio and proportional sizing constraints and edit the multiplier of constraints in Interface Builder. The multiplier can be a decimal number (for example,
0.5), a fraction (for example,
1/2), or an aspect ratio (for example,
- Constraints attached to ambiguous views in Interface Builder are drawn orange only in the axis with ambiguity. This makes it faster to identify a potential problem in the canvas. (15114120)
- The Interface Builder canvas now displays overlay scrollers when appropriate, based on the “Show scroll bar” setting in the General pane in System Preferences. (10069033)
- The Interface Builder inspector now has support for:
- Setting “Detail” button type for prototype
Instruments and Symbolication
- Instruments now finds symbols much more reliably.If symbols aren’t showing up automatically, try the following:The
instrumentscommand-line tool now supports specifying the simulator SDK and device type using the
-wflag. To see a list of the supported simulator configurations as well as attached devices, execute
instruments -s devicesin a Terminal window. (14996865)
- When Spotlight indexing is disabled for Xcode derived data, such as when using
/tmp, add a global list of additional search paths configured in the Instruments preferences.
- The context menu for an address now includes the option “Symbolicate with DSYM” to add a specific symbol file.
- Use the File menu Symbols command to see a more detailed list of the state of individual executables and libraries.
- Green lights indicate the presence of symbols and source information.
- Yellow lights indicate libraries with some symbols but can still benefit from locating a dSYM.
- Red lights indicate situations that prevented symbolication. (14269449)
- Installing Device SupportRun from the command-line, Xcode.app takes the new command-line argument,
-installComponents. When Xcode is run from a command-line script with this option, it installs the required device support packages and then quits. (15127411)
- Emoji and other Unicode surrogate pairs are supported in scheme settings and in project files. (14837623 & 13827044)
- Arm64 is now included in the “Standard architectures” setting.Xcode 5.0 introduced support for building 64-bit iOS applications but it was not enabled by default. To enable the option of building 64-bit in Xcode 5.0, an architectures setting was provided: “Standard Architectures Including 64-Bit” (
ARCHS_STANDARD_INCLUDING_64_BIT).With the introduction of Xcode 5.1, arm64 is included in the default “Standard architecture” build setting. This results in projects using the default setting automatically building for arm64 along with the standard 32-bit architectures.
- When building for all architectures, remove any explicit architectures setting and use the default Standard Architectures setting. For projects that were previously opted-in using “Standard Architectures Including 64-Bit”, switch back to the “Standard architectures” setting.
- When opening an existing project for the first time, Xcode 5.1 may display a warning about the use of the Xcode 5.0 architectures setting. Selecting the warning provides a workflow to revise the setting.
- Projects not able to support 64-bit need to specifically set the architectures build setting to not include 64-bit.
- Projects configured to use ”Standard Architectures Including 64-bit” will be converted to “Standard Architectures
- As of Apple LLVM compiler version 5.1 (clang-502) and later, the optimization level
-O4no longer implies link time optimization (LTO). In order to build with LTO explicitly use the
-fltooption in addition to the optimization level flag. (15633276)
gcovtool for code coverage testing has been reimplemented. The new version uses the
llvm-covtool from the LLVM project. It is functionally equivalent to the old version for all significant features. The location of
gcovwithin Xcode has also moved, use xcrun to invoke it. If you find problems, please file bug reports. For this release, you can still use the old version of
gcovfrom GCC, which is available as
gcov-4.2. 11919694 updated
Editing User Interfaces
- Custom views added to a stack view in Interface Builder can get stuck in a “misplaced views” (inconsistent) state.As a workaround, set a placeholder intrinsic size for the custom view with appropriate content hugging and compression resistance priorities. (15778653)
- Automated tests run in iOS Simulator may fail with an error similar to this:
Test target [test name] encountered an error (Test process exited with code -1)Attempt recovery by quitting and restarting the simulator. (15929053)
- Continuous integration features (bots) of Xcode 5.1 require OS X Server v3.1 (or a version of OS X Server 3.1 beta) or later. 16225068 updated
- If there are old copies of Xcode on the server host, Xcode Server sometimes shows all the simulators. Only attempt to use simulators appropriate for use with Xcode 5.1. (15465692 & 15153869)
- Xcode Server will offer All Devices or All Simulators even if there are none that fit the criteria for the project. If you select an inappropriate device or simulator, you may get an error similar to:
xcodebuild: error: No destinations were specified with the -destination flag which were valid for the specified scheme <scheme_name>.To prevent this from happening, specify only valid devices or simulators for your project. (15465222)
- Sometimes when you’re attempting to create a new local repository on OS X Server through Xcode, Xcode may display an error message similar to:
xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools.To resolve this problem, follow the prompts in the dialog displayed on the OS X Server host system. (15475078 & 15486464)
- Sometimes after upgrading to Xcode 5.1 and OS X Server 3.1, the first time you add a server you may see an error similar to:
"<Server> is running a version of OS X Server that cannot be used with this version of Xcode."Quit and restart Xcode one time to clear this message. 16217715 update
- Performance issues can arise when running apps within the iOS Simulator on OS X Mavericks with a simulated OS version of iOS 6.1 or earlier.A workaround is to disable timer coalescing while using the iOS 6.1 or earlier simulator by executing the following command in a Terminal window:
sudo sysctl -w kern.timer.coalescing_enabled=0(15501929)
- iOS Simulator sometimes stops responding to hardware keyboard.Quitting and relaunching the simulator usually corrects this. (14642684)
- When validating multiple applications in sequence using the Xcode Organizer, erroneous warnings about bundle IDs may be emitted.If these warnings occur, quit & relaunch Xcode in between validations. 15113664 updated
- Executables created by Xcode 5.1 may crash on OS X v10.5. (15852259) updated
STAssertEqualsusing OCUnit) correctly compares scalar values of different types without casting, for example,
NSInteger. It can no longer accept nonscalar types, such as structs, for comparison. (14435933)
- OS X apps that require a provisioning profile, such as those using iCloud, now build, are code-signed correctly, and launch. (15841159)
- OCUnit and the SenTestingKit framework are deprecated and will be removed from a future release of Xcode. Source code using OCUnit generates warnings while being compiled in Xcode 5.1.Migrate to XCTest by using the “Edit > Refactor > Convert to XCTest…” menu command. .
- The ATS framework is deprecated. Source code using ATS APIs will generate warnings while being compiled. For version 10.8, there will be no loss of functionality but there could be areas where performance will suffer.Replace all ATS code (including
CoreText. ATS functionality will be removed in future OS X releases. More information about this change is available inCore Text Programming Guide.