Skip to content

Instantly share code, notes, and snippets.

Manuel Binna mbinna

Block or report user

Report or block mbinna

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
mbinna / UIViewController+MBSensitiveInformationInScreenshotPrevention.h
Created Jun 12, 2011
Prevent sensitive information from appearing in the screenshot that is automatically taken when the application transitions from the foreground to the background and vice-versa.
View UIViewController+MBSensitiveInformationInScreenshotPrevention.h
// UIViewController+MBSensitiveInformationInScreenshotPrevention.h
// Created by Manuel Binna on 05.05.11.
// Copyright 2011 Manuel Binna. All rights reserved.
@interface UIViewController (MBSensitiveInformationInScreenshotPrevention)
mbinna /
Created Apr 11, 2012 — forked from erikh/
OSX For Hackers
#!/usr/bin/env sh
# This is script with usefull tips taken from:
# install it:
# curl -sL | sh
mbinna /
Last active Sep 19, 2019
Include Version Info from Git into Info.plist at build time
Add the script into a new run script build phase of your application target. The build phase
should be located after the build phase "Copy Bundle Resources".
mbinna /
Last active Oct 13, 2015
Invoke mogenerator during Xcode build
# The approach used here is adopted from the following source:
# Since version 1.27, mogenerator automatically uses the current version of the data model
# Homebrew stores mogenerator in /usr/local/bin
mbinna /
Created Dec 4, 2012
Clear CocoaPods cache, re-download and re-install all pods
#!/usr/bin/env bash
rm -rf "${HOME}/Library/Caches/CocoaPods"
rm -rf "`pwd`/Pods/"
pod update
mbinna /
Last active Oct 25, 2017
Run Xcode Application Tests from the command line
# Launch application using ios-sim and set up environment to inject test bundle into application
# Source:
environment_args="--setenv DYLD_INSERT_LIBRARIES=/../../Library/PrivateFrameworks/IDEBundleInjection.framework/IDEBundleInjection --setenv XCInjectBundle=$test_bundle_path --setenv XCInjectBundleInto=$TEST_HOST"
ios-sim launch $(dirname $TEST_HOST) $environment_args --args -SenTest All $test_bundle_path
echo "Finished running tests with ios-sim"
mbinna /
Created Mar 29, 2013
Invoke appledoc in a run script build phase in Xcode
/usr/local/bin/appledoc \
--templates "/usr/local/opt/appledoc/Templates" \
--project-name "${PROJECT_NAME}" \
--project-company "Manuel Binna" \
--company-id "de.binna" \
--output "Documentation" \
--logformat xcode \
mbinna / gist:5316890
Created Apr 5, 2013
Stub RestKit network requests in Kiwi with Nocilla
View gist:5316890
#import "MBAEntityFetcher.h"
#import "MBAAPIBaseURL.h"
#import "MBAResponseDescriptorProvider.h"
#import <Kiwi/Kiwi.h>
#import <Nocilla/LSNocilla.h>
#import <RestKit/RestKit.h>
#import <RestKit/Testing.h>
mbinna / isRunningTests.c
Last active Dec 18, 2015
Detect if the app was launched in the iOS Simulator to execute the unit tests. Source:
View isRunningTests.c
static BOOL isRunningTests(void) {
NSDictionary *environment = [[NSProcessInfo processInfo] environment];
NSString *injectBundle = environment[@"XCInjectBundle"];
return [[injectBundle pathExtension] isEqualToString:@"octest"];
mbinna / .clang-format
Created Feb 18, 2014
Custom .clang-format
View .clang-format
# Reference:
BasedOnStyle: WebKit
AccessModifierOffset: -4
AlignEscapedNewlinesLeft: false
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortFunctionsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
You can’t perform that action at this time.