Skip to content

Instantly share code, notes, and snippets.

View anivaros's full-sized avatar

Vasily Anisimov anivaros

View GitHub Profile
@anivaros
anivaros / 0_UIKitTabView.swift
Last active April 6, 2020 21:16 — forked from Amzd/UIKitTabView.swift
SwiftUI tab bar view that respects navigation stacks when tabs are switched (unlike the TabView implementation)
import SwiftUI
/// An iOS style TabView that doesn't reset it's childrens navigation stacks when tabs are switched.
struct UIKitTabView: View {
var viewControllers: [UIHostingController<AnyView>]
@State var selectedIndex: Int = 0
init(_ views: [Tab]) {
self.viewControllers = views.map {
let host = UIHostingController(rootView: $0.view)
#!/usr/bin/ruby
require 'xcodeproj'
# ============================================
# !!! I've released a ruby gem that does the same thing, but better.
# You can install it by running `gem install xcprovisioner` or
# `sudo gem install xcprovisioner` if it asks for sudo rights.
#
# For more info: https://github.com/thelvis4/XCProvisioner
#import <Foundation/Foundation.h>
@interface URLConnection : NSObject <NSURLConnectionDataDelegate, NSURLConnectionDelegate>
+ (NSData *)sendSynchronousRequest:(NSURLRequest *)request
returningResponse:(NSURLResponse **)response
error:(NSError **)error;
@end
@anivaros
anivaros / TestflihtappDeployTeamcity.sh
Created June 21, 2012 13:03 — forked from JohannesRudolph/TestflihtappDeployTeamcity.sh
Builds and deploys an App to testflightapp.com. Integrates with Teamcity.
#!/bin/bash
#
# testflightapp.com tokens
API_TOKEN="YOUR_API_TOKEN"
TEAM_TOKEN="YOUR_TEAM_TOKEN"
PRODUCT_NAME="RowMotion"
ARTEFACTS="$PWD/Artefacts"