Antoine van der Lee - Building the new WeTransfer app
WeTransfer build a new mobile app and Antoine talks about their working culture, open sourcing, their CI setup and taking proper time to setup your environment for effective development.
03:05 AM 1:01 4:25 Share Yokomokohama.mp3 Delete Move to Board 03:05 AM Tap the + button to add items to your Board Artwork by Malika Favre Collections Settings Board 2 ITEMS — SHARED Magazine covers Share 03:05 AM Collections Collections Settings Board 7 ITEMS Design meeting inspiration Share WeTransfer Mobile App
What does it mean? Covey uses the common analogy of a woodcutter who is sawing for several days straight and is becoming less and less productive. The process of cutting dulls the blade. So the solution is to periodically sharpen the saw. You’re more productive with a sharpened blade! WeTransfer Mobile App
In other words Investigate time in your setup. • Automate common tasks • Setup CI with tools like Danger & SwiftLint • Test your code and prevent bugs • Save yourself time to review code structure instead of style WeTransfer Mobile App
Continuous Integration Each pull request need to be reviewed by two developers to conduct code quality. • Merging is blocked • Merging is only allowed after CI succeeds • CI runs tools like Danger & SwiftLint • CI runs UI and Unit Tests WeTransfer Mobile App
Stop saying “you forgot to …” in code review - http:// danger.systems • Define custom rules • Automate your common review tasks & save time • Works with Github, Gitlab & Bitbucket WeTransfer Mobile App
WeTransfer Mobile App • Big PRs • Work In Progress • Are the tests updated? • Use weak instead of unowned • Use final for classes • Disable rules for files using // danger:disable final_class And more! Custom rules
WeTransfer Mobile App • XCOV Code coverage reports • SwiftLint Integrate SwiftLint warnings in PR reviews A lot more like Changelog, Slack, Todoist. Checkout http:// danger.systems/ Danger plugins
WeTransfer Mobile App Using SwiftLint and Danger for Swift Best Practices https://medium.com/developermind/using-swiftlint-and-danger-for-swift-best-practices-48432e4e268a Running SwiftLint in Continuous Integrations https://buildingvts.com/lessons-learned-integrating-danger-and-swiftlint-4683aecef830 How to get started?
In other words Investigate time in your setup. • Automate common tasks • Setup CI with tools like Danger & SwiftLint • Test your code and prevent bugs WeTransfer Mobile App
CI & Tests Automatically run tests and require to complete successfully • Unit tests run for each PR • Code coverage for changed files is reported • Snapshots will be generated for merged changes in develop WeTransfer Mobile App
Offline testing Mock requests using a custom URLProtocol • Captures all outgoing requests • Tests fail when a request is not registered as Mock • Works with URLSession, so it supports Alamofire WeTransfer Mobile App
Registering a mock WeTransfer Mobile App Mock requests for all requests with extension png • Data type for correct content-type header • Status code which will be returned • Response data which will be returned
Open sourcing Write code with open sourcing in mind (Open Source Driven Development, OSDD?? :-) • Build everything in a modular way • Results in reusable code • Write tests ASAP WeTransfer Mobile App
UINotifications WeTransfer Mobile App Present custom in-app notifications easily in Swift • Present your own custom view as an in-app Notification • Create custom presentation styles • Update content during presentation
Ocarina WeTransfer Mobile App Get metadata and Open Graph information from URLs • Fetch basic metadata for URLs using the OGP protocol or basic HTML tags • Memory cache of metadata for each URL • Prefetch a set of URLs to make views more responsive • URL information can include: type, title, description, image, image size, favicon, and Apple touch icon
Trekker WeTransfer Mobile App A wrapper to easily swap out different analytics services or to support multiple analytics services at once. • Works best with event based analytics services like Mixpanel, Amplitude, Firebase, and Answers by Crashlytics.
Open sourcing Think with the idea of open sourcing • Open source one of your frameworks • Define your way of open sourcing • Setup an environment which can be reused WeTransfer Mobile App
Conclusion Our Workflow at WeTransfer • Sharpen the - Invest in automating common tasks (CI, Danger, SwiftLint) - Take time for setting up your test environment • Write code with open sourcing in mind WeTransfer Mobile App