How to xcode in teams (without killing anyone) - #supengineering

Post on 18-Feb-2017

683 views 0 download

Transcript of How to xcode in teams (without killing anyone) - #supengineering

HOW TO XCODE IN TEAMS (Without killing anyone)

@Supmenow

#SUPENGINEERING @Supmenow

Alex Barton

CTO

@alexmbarton

James Campbell

iOS Engineer

@jcampbell_05

Tiziano Bruni

iOS Engineer

@t_bruni

THE PROBLEM @Supmenow

A beautiful seamless experience to see your friends more

https://bnc.lt/apps-world

@Supmenow

See Facebook Friends. See when they’re nearby or meet someone new.

Start a conversation.

@Supmenow

ON YOUR TERMS

A beautiful seamless experience to see your friends more

https://bnc.lt/apps-world

TIPS TO HELP YOU SPEND MORE TIME BUILDING AWESOME PRODUCTS

@Supmenow

7

HOW TO XCODE IN TEAMS

WHAT ARE THE ISSUES ? @Supmenow

➤Conflicts. ➤Time consuming to maintain. ➤Inconsistent behaviour between development machines.

TIP 1: .GITIGNORE @Supmenow

Xcode Projects contain a lot of information about what each developer was doing.

We can use a .gitignore file to ignore all of that.

## Build generated build/ DerivedData ## Various settings *.pbxuser !default.pbxuser *.mode1v3 !default.mode1v3 *.mode2v3 !default.mode2v3 *.perspectivev3 !default.perspectivev3 xcuserdata ## Other *.xccheckout *.moved-aside *.xcuserstate *.xcscmblueprint ## Obj-C/Swift specific *.hmap *.ipa ## Mac Files .DS_Store? .DS_Store

TIP 2: .GITATTRIBUTE @Supmenow

git doesn’t really understand Xcode projects, we can use .gitattribute file to

let it know what to do when resolving conflicts.

*.pbxproj binary merge=union

TIP 3: COCOAPODS @Supmenow

“CocoaPods is the dependency manager for Swift and Objective-C Cocoa projects.”

LIBRARIES MADE EASY @Supmenow

target 'myapp' do pod 'FlatUIKit' end

We can easily add and maintain code written by others without having to add it to our project manually.

We just need to create a podfile and cocoapods does the rest.

TIP 4: FASTLANE @Supmenow

Fastlane allows you to automate the process of testing and releasing your application.

TIP 4: FASTLANE @Supmenow

Fastlane uses the concept of lanes. Each lane is different way of distributing your app.

It could be to the app store or just to test flight.

We describe all of this inside of a fastfile

Your App

@SupmenowTIP 4: FASTLANEFastlane tools:

TIP 4: FASTLANE @Supmenow

lane :appstore do increment_build_number cocoapods xctool snapshot sigh deliver sh "./customScript.sh" slack end

Fastfile:

TIP 5: BUNDLER @Supmenow

Manage the development tools used for your applications.

TIP 5: BUNDLER @Supmenow

source "https://rubygems.org"

gem "cocoapods", "~> 0.39" gem "fastlane", "~> 1.36"

We use a lot of tools when developing our apps, controlling which version we use makes it easier when working in teams.

We just need to create our gemfile, describing which and what version of our tools.

TIP 6: CI @Supmenow

Allows you to integrate changes from each developer and see how it affects the app

TIP 6: CI @Supmenow

To tell travis how to build our app we simply use a .travis.yml file and it will handle the rest.

language: objective-c

osx_image: xcode7

script: fastlane beta

TIP 7: COMMUNICATION @Supmenow

Sup. A Social Connection app that brings people together by letting them know when friends are nearby.

https://bnc.lt/apps-world

Alex Barton

CTO

@alexmbarton

James Campbell

iOS Engineer

@jcampbell_05

Tiziano Bruni

iOS Engineer

@t_bruni

#SUPENGINEERING @Supmenow

WE HAVE BLOG

https://medium.com/sup-engineering