optimize and maintain your project in xcode

16
Optimize and maintain your project in Xcode. A presentation by Bryn Bodayle

Upload: bryn-bodayle

Post on 09-Apr-2017

328 views

Category:

Software


1 download

TRANSCRIPT

Page 1: Optimize and maintain your project in Xcode

Optimize and maintain your project in Xcode.

A presentation by Bryn Bodayle

Page 2: Optimize and maintain your project in Xcode

What is optimal?Quick compile times

Easy maintenance

Avoiding crashes

Fast and lean apps

Page 3: Optimize and maintain your project in Xcode

We will cover.Compile time optimization

Compiler warnings and errors

Dependency management

Page 4: Optimize and maintain your project in Xcode

Optimize compile time.

Use and eliminate warnings

Use asset catalogs

Clean out the garage

Page 5: Optimize and maintain your project in Xcode

Use asset catalogs.

Migration tool is provided

Easy management and configuration

Compiles assets into binary format

Supports slicing in Xcode 7

Page 6: Optimize and maintain your project in Xcode

Clean out the Garage

Extract IPA to check

Remove unused code and libraries

Remove unused assets

Page 7: Optimize and maintain your project in Xcode

Use and eliminate warnings.Use lots of compiler flags

Disable at a small scale

Order of compiler flags matters

Fix every warning

Page 8: Optimize and maintain your project in Xcode

Use these compiler flags.-Wall -Wextra -Werror -Wconversion -Wundef -Wdeprecated-implementations

-Wno-unused-parameter -Wfloat-equal -Wimplicit-retain-self -Wnewline-eof -Wshadow -Wsign-compare

For reference: http://f***ingclangwarnings.com

Page 9: Optimize and maintain your project in Xcode

1. Disable inline.

#pragma clang diagnostic push #pragma clang diagnostic ignored "-Warc-performSelector-leaks" [self performSelector:selector]; #pragma clang diagnostic pop

Page 10: Optimize and maintain your project in Xcode

2. Disable per file.

Page 11: Optimize and maintain your project in Xcode

3. Disable project-wide.

Page 12: Optimize and maintain your project in Xcode

Order of compiler flags matters.

Page 13: Optimize and maintain your project in Xcode

Fix every warning.

Page 14: Optimize and maintain your project in Xcode

Use CocoaPods.Stop it with submodules

Promotes healthy reuse

Easy version management

Page 15: Optimize and maintain your project in Xcode

Questions?

Page 16: Optimize and maintain your project in Xcode

CreditsStopwatch by Edward Boatman from the Noun Project

Presenter by Björn Andersson from the Noun Project

Garage by Lloyd Humphreys from the Noun Project