Xcode Overview

Xcode Overview

Write Code in the Source Editor

Perform Static Code Analysis

Use the static analyzer to find bugs in your code before you even run your app. The static analyzer tries out thousands of possible code paths in a few seconds, reporting potential bugs that might have remained hidden or bugs that might be nearly impossible to replicate. This process also identifies areas in your code that don’t follow recommended API usage, such as Foundation, UIKit, and AppKit idioms. To perform static code analysis, choose Product > Analyze. The Xcode static analyzer parses the project source code and identifies these types of problems:

  1. Logic flaws, such as accessing uninitialized variables and dereferencing null pointers
  2. Memory management flaws, such as leaking allocated memory
  3. Dead store (unused variable) flaws
  4. API usage flaws that result from not following the policies required by the frameworks and libraries the
    project is using

Run Your App

Choose a Scheme to Build Your App

A scheme is a collection of settings that specify the targets to build for a project, the build configuration to use, and the executable environment to use when the product is launched. When you open an existing project (or create a new one), Xcode automatically creates a scheme for each target.

The default scheme is named after your project and includes settings to perform five actions:

  1. Run the app.
  2. Run unit tests against the target.
  3. Profile the app’s performance characteristics.
  4. Perform static analysis on the code.
  5. Archive the app for distribution, such as for sending to testers or submitting to the App Store.

Edit, Create, and Manage Schemes

You can edit a scheme so that it performs such actions as:

  1. Building multiple targets
  2. Executing scripts before or after any action
  3. Sending emails before or after any action
  4. Running with memory management diagnostics
  5. Producing either a debug or release build for any action,

Debug Your App

Control Execution and View State Information

../art/DebugArea_2x.png

Measure Your App’s Performance

The Instruments app, which is included with Xcode, gathers data from your running app and presents it in a graphical timeline.

../art/Instruments_2x.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值