Skip to content

Instantly share code, notes, and snippets.

View JagCesar's full-sized avatar
👨‍💻
☕️

César Pinto Castillo JagCesar

👨‍💻
☕️
View GitHub Profile
@JagCesar
JagCesar / .travis.yml
Last active April 29, 2016 15:26 — forked from johanneswuerbach/.travis.yml
Deploy to Testflight using Travis-CI
language: objective-c
before_script:
- chmod +x scripts/travis/add-key.sh
- chmod +x scripts/travis/remove-key.sh
- chmod +x scripts/travis/testflight.sh
- ./scripts/travis/add-key.sh
script: xctool -workspace [Workspace name].xcworkspace -scheme '[Scheme to use]' -configuration [Build configuration name] -sdk iphoneos7.1 CONFIGURATION_BUILD_DIR='~/build/' build
after_success:
- ./scripts/travis/testflight.sh
after_script:
@JagCesar
JagCesar / Fastfile
Created December 29, 2016 15:36
Cookin Fastfile
# Customise this file, documentation can be found here:
# https://github.com/fastlane/fastlane/tree/master/docs
# All available actions: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Actions.md
# can also be listed using the `fastlane actions` command
# Change the syntax highlighting to Ruby
# All lines starting with a # are ignored when running `fastlane`
# If you want to automatically update fastlane if a new version is available:
# update_fastlane
@JagCesar
JagCesar / .git-commit-template
Last active September 16, 2020 19:33
Git settings
#------------------------------------------------|
#----------------------------------------------------------------------|
@JagCesar
JagCesar / pushMe.sh
Created May 16, 2017 07:02
Push Me bash script
#!/bin/sh
message="$1"
curl -so \
- --data "title=$message&token=[token-here]" \
https://pushmeapi.jagcesar.se
@JagCesar
JagCesar / Tag each beta
Created December 14, 2018 08:52
Tag each uploaded beta with version and current build number. It's pretty sweet.
lane :beta do
ensure_git_status_clean
latestBuildNumber = bump_build_number
# Git tag must not already exist. If it does, check if we forgot to bump version or
# delete previous tag on remote.
git_tag_name = "v#{version}(#{latestBuildNumber})"
UI.crash!("Git tag #{git_tag_name} already exists.") if git_tag_exists(tag: git_tag_name)
build_app(scheme: "Volante")
@JagCesar
JagCesar / protocolExtension.swift
Created December 20, 2019 09:16
Example of protocol extensions functionality
protocol Nameable {
/// This func is required by anyone who conforms to this protocol
func lastName() -> String
}
extension Nameable {
/// This will be the default implementation if the conforming class doesn't override this implementation.
func firstname() -> String {
return "John Appleseed"
}
@JagCesar
JagCesar / SharedWithAttributionView.swift
Created July 25, 2022 15:23
SwiftUI SharedWithAttributionView
import SwiftUI
import SharedWithYou
#if os(iOS) || os(tvOS)
struct SharedWithAttributionView: UIViewRepresentable {
let highlight: SWHighlight
let displayContext: SWAttributionView.DisplayContext
let backgroundStyle: SWAttributionView.BackgroundStyle
func makeUIView(context: Context) -> some UIView {
@JagCesar
JagCesar / gist:5ec942d49332a8fbb3edd1032e7a08f2
Created August 16, 2023 20:27
Re-render widgets when going to background
.onReceive(NotificationCenter.default.publisher(for: UIApplication.willResignActiveNotification)) { _ in
WidgetCenter.shared.reloadAllTimelines()
}