HACKING FOR GOOD

Practical analysis of the HTTP protocol vulnerabilities and insecurities

What you will learn

Tools

  • nmap
  • ettercap
  • WireShark

Initial Phase


A real case scenario for optimising data usage in SwiftUI apps

Banner that reads “Caching data with NSCache”
Banner that reads “Caching data with NSCache”
Image by the author.

Scenario

Initial Implementation With No Cache Usage


A clean and intuitive way to handle Core Data entities in SwiftUI

Crosswalk
Crosswalk
Photo by Banter Snaps on Unsplash.

The Bad, Easy Way


Optimise your time with CI/CD automation and focus on what matters

Time lapse of city streets at night
Time lapse of city streets at night
Photo by Julie Laiymani on Unsplash.


The How


How to design and style lists and cells in SwiftUI



Adding the background and composing the final View

private var dataBackgroundColor: [String: ColorRGB] = [
"Data1": ColorRGB(red: 44 / 255, green: 54 / 255, blue: 79 / 255),
"Data2": ColorRGB(red: 76 / 255, green: 61 / 255, blue: 89 / 255),
"Data3": ColorRGB(red: 56 / 255, green: 24 / 255, blue: 47 / 255)
]
private var dataBarColor: [String: ColorRGB] = [
"Data1": ColorRGB(red: 222 / 255, green: 44 / 255…


Compose the CapsuleGraphView by reusing the CapsuleBar we created in the previous piece

struct CapsuleGraphView: View {    var data: [Int]
var maxValueInData: Int
var spacing: CGFloat
var capsuleColor: ColorRGB
var body: some View { Text("Hello") }}
  • A data variable that will be our array of values to display;
  • maxValueInData,the max value in the array to set the maximum height filled by a value;
  • spacing, used for spacing the graph;
  • and capsuleColor, used to assign a color for each capsule.


First, create the main interface

  • Create the main interface with the title Picker;
  • Create a single-bar chart that will compose our graph;
  • Create the initial dataset to display.

Getting Started

Mattia Righetti

Software Engineer, enthusiast iOS and macOS application developer with a background on backend, centralized and distributed systems technologies.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store