Skip to content

Instantly share code, notes, and snippets.

Avatar

Rostyslav Dovhaliuk RenGate

View GitHub Profile
@RenGate
RenGate / buildstep.sh
Created Feb 20, 2015
Automatic generation of build number in Xcode project for easy Apple TestFlight distribution. It is a known fact that Apple TestFlight checks build number of uploaded ipa file and rejects binary if its build number is "less" than the one of the latest accepted build. It is hard to constantly change build number and push it to repo for building u…
View buildstep.sh
buildNumber=$(date +%y.%m.%d.%H%M)
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${PROJECT_DIR}/${INFOPLIST_FILE}"
View article20-09-1.swift
viewController.navigationItem.leftBarButtonItem = splitViewController?.displayModeButtonItem
viewController.navigationItem.leftItemsSupplementBackButton = true
View article20-09-2.swift
func splitViewController(_ splitViewController: UISplitViewController, collapseSecondary secondaryViewController: UIViewController, onto primaryViewController: UIViewController) -> Bool {
if let navigationController = secondaryViewController as? EEHNavigationController, navigationController.topViewController is PlaceholderViewController {
return true
} else {
return false
}
}
View article20-09-3.swift
@available(iOS 14.0, *)
func splitViewController(_ svc: UISplitViewController, topColumnForCollapsingToProposedTopColumn proposedTopColumn: UISplitViewController.Column) -> UISplitViewController.Column {
return .primary
}
@RenGate
RenGate / InAppPurchaseManager.swift
Last active Jan 26, 2022
Sample implementation of In-App purchase manager class
View InAppPurchaseManager.swift
// MIT License
//
// Copyright (c) 2019 Rostyslav Dovhaliuk
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions: