Skip to content

Instantly share code, notes, and snippets.

@pietbrauer
pietbrauer / Proposal.md
Last active May 29, 2016 07:52
NSSpain 2016 Proposal

Designing Pro apps

A lot has been talked and promoted by Apple to bring desktop-class experience to iOS. But what does it actually mean to do that? Is it the use-case of your product? Is it the way you present it? Or is it how well you integrate with the system tools? Learn what prosumers expect from your app from someone who built a pro iOS app and is using an iPad Pro as his main computer.

One year ago I quit my day job and began my journey to becoming a full-time independent iOS developer for productivity apps. It was rumored that Apple would release a pro iPad and I began making one of the first Git clients for iOS. While doing so I got a glimpse into how people use their iOS devices day by day as well as talking to hardcore iOS only users who don't use a computer anymore. Inspired by these user stories I began using my iPad more and more and spotted a lot of room for improvement on both iOS as well as third party apps. Join me for some of my findings on which small improvements you can implement tod

Keybase proof

I hereby claim:

  • I am pietbrauer on github.
  • I am pietbrauer (https://keybase.io/pietbrauer) on keybase.
  • I have a public key whose fingerprint is 5218 3836 2C12 A715 2976 2B64 1FE6 25D3 79EA 5D5F

To claim this, I am signing this object:

@pietbrauer
pietbrauer / Proposal.md
Created June 21, 2015 20:41
My proposal for NSSpain

DevOps in the iOS world

Mobile application development has many different facets, from independent developers to teams of 50 developers working on the same code base. While other developer groups, e.g. web application had scaling problems in the past and came up with solutions like DevOps, Mobile application development is stuck in the past. This talk is to explore DevOps techniques like Continuous Integration, Continuous deployment and more in the iOS domain. I worked for small agencies, big companies and helped scaling teams and development processes from 1-2 people to 16 people spread across Europe. I recently started a blog series about this very topic over here: [http://nerdishbynature.com/post/2015/05/28/devops-introduction.html].

@pietbrauer
pietbrauer / 1README.md
Last active September 9, 2016 20:44
Universal CLI for automated iOS deploys and tests

Steps

  1. Download the cli.sh and move it into a scripts/ directory and execute chmod 755 scripts/cli.sh, this will make the script executable.
  2. Export your iOS Distribution private key from your Keychain into the scripts/ folder and name it ios_distribution.p12 make sure to note down the password as we will need it later. It is highly recommended to give it a very strong password.
  3. Download your Distribution provisioning profile from the Member Center
  4. Rename the provisioning profile to Release.mobilprovision
  5. At the top of the script you may need to adjust a few values:
SCHEME="" # Your scheme
- (void)pull:(GTRemote *)remote completion:(void (^)())completion failure:(void (^)(NSError *error))failure {
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
NSError *fetchError;
[self fetchRemote:remote withOptions:nil error:&fetchError progress:nil];
if (fetchError) {
if (failure) {
failure(fetchError);
}
return;
}
@pietbrauer
pietbrauer / build.log
Created June 9, 2015 19:25
FBSnapshotTestCase swift compiler segfault
carthage bootstrap --verbose
*** Cloning ios-snapshot-test-case
*** Downloading realm-cocoa at "v0.93.1"
*** Checking out ios-snapshot-test-case at "e39dfb04c00831fe0e82c14332a8f601e41e88ef"
*** Building scheme "FBSnapshotTestCase" in FBSnapshotTestCase.xcworkspace
2015-06-07 23:38:37.232 xcodebuild[21442:25888] [MT] iPhoneSimulator: SimVerifier returned: Error Domain=NSPOSIXErrorDomain Code=53 "Simulator verification failed." UserInfo=0x7fa071431cd0 {NSLocalizedFailureReason=A connection to the simulator verification service could not be established., NSLocalizedRecoverySuggestion=Ensure that Xcode.app is installed on a volume with ownership enabled., NSLocalizedDescription=Simulator verification failed.}
Build settings from command line:
SDKROOT = iphonesimulator8.3
=== BUILD TARGET FBSnapshotTestCase OF PROJECT FBSnapshotTestCase WITH CONFIGURATION Release ===
@pietbrauer
pietbrauer / change_xcode_location.rb
Created May 6, 2015 14:34
Script to change the Xcode location in a module map file
#!/usr/bin/ruby
Dir['CommonCrypto/*.modulemap'].each do |file_name|
text = File.read(file_name)
path = `xcode-select -p`.strip << "/"
new_contents = text.gsub(/\/Applications\/Xcode.app\/Contents\/Developer\//, path)
File.open(file_name, "w") {|file| file.puts new_contents }
end
@pietbrauer
pietbrauer / Makefile
Created April 26, 2015 10:03
Shutdown and reset all iOS Simulators
erase_sim:
./reset_sim.sh 2>/dev/null; true
@pietbrauer
pietbrauer / Rakefile
Created April 14, 2015 12:02
Rake task for cleaning header comments from objc files
namespace :housekeeping do
desc "Remove all header-comments"
task :remove_header_comments do
["Classes", "Tests"].each do |directory|
files = Dir["./#{directory}/**/*"].select { |value| File.file?(value) }
files.each do |file|
lines_array = File.open(file).readlines
if lines_array.first.match(/^\/\//) && !lines_array.first.match(/^\/\/ DO NOT EDIT/)
text = lines_array.drop_while { |line| line.match(/^\/\/|^\n/) }
File.open(file, 'w') do |f|
@pietbrauer
pietbrauer / timer.swift
Created August 14, 2014 21:03
Usage of NSTimer in Swift
import Foundation
class Timer {
var timer: NSTimer?
var elapsedTime = 0.0
func start() {
elapsedTime = 0.0
timer = NSTimer(timeInterval: 1.0, target: self, selector: "timerFired:", userInfo: nil, repeats: true)
NSRunLoop.currentRunLoop().addTimer(timer, forMode: NSRunLoopCommonModes)