Skip to content

Instantly share code, notes, and snippets.

@AndreyLunevich
AndreyLunevich / iOS analytics layer
Created December 20, 2018 08:50
Analytics layer for iOS application in swift
public protocol AnalyticsPlugin {
var identifier: String { get set }
func login(user: Any)
func logout()
func setupUserProperties(_ properties: [String: Any])
@AndreyLunevich
AndreyLunevich / structured-swift4-localizable.stencil
Last active July 22, 2024 09:35
SwiftGen template to change the language at runtime
// Generated using SwiftGen, by O.Halligon — https://github.com/SwiftGen/SwiftGen
{% if tables.count > 0 %}
import Foundation
// swiftlint:disable superfluous_disable_command
// swiftlint:disable file_length
{% macro parametersBlock types %}{% filter removeNewlines:"leading" %}
{% for type in types %}
_ p{{forloop.counter}}: {{type}}{% if not forloop.last %}, {% endif %}