Skip to content

Instantly share code, notes, and snippets.

View lemonkey's full-sized avatar
🏠
Working from home

Ari Braginsky lemonkey

🏠
Working from home
View GitHub Profile
@lemonkey
lemonkey / podinstall-before_classes.log
Last active November 23, 2015 00:02
pod install log for https://github.com/CocoaPods/CocoaPods/issues/4570, before sample classes added to Pod1 and Pod2 Cocoa Touch Frameworks
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods`: (``)
Using `ARCHS` setting to build architectures of target `Pods-Main`: (``)
Using `ARCHS` setting to build architectures of target `Pods-MainTests`: (``)
Fetching external sources
-> Fetching podspec for `Pod1` from `./Pod1`
-> Fetching podspec for `Pod2` from `./Pod1/Pod2`
@lemonkey
lemonkey / gist:637e855e0ba118a50218
Last active June 9, 2017 18:39
Swift 2 and Objective-C Interoperability Review

Using Swift 2 and Objective-C classes within frameworks, apps and unit tests

Normal Usage:

  • Swift into Obj-C:
    • Within framework or app:
      • Because the auto generated Swift interface header "Objective-C Generated Interface Header" SWIFT_OBJC_INTERFACE_HEADER_NAME for a framework target is part of the framework’s public interface, only Swift declarations marked with the public modifier for classes or structs marked with @objc appear in this header for a framework target.
        • Framework:
          • #import <ProductName/ProductModuleName-Swift.h>
          • This could go in the Framework’s prefix PCH file if used as a local dev pod, otherwise not recommended (reserve PCH for things that don’t change often like UIKit, etc.)
  • Note: You can still use Swift methods and properties that are marked with the internal modifier from within the ObjC part of your framework, as long they are declared within a Swift class that inherits from an ObjC class.
@lemonkey
lemonkey / update_xcconfig_build_version.rb
Last active September 18, 2015 01:45
Increment BUILD_VERSION property in an xcconfig file (useful when you have multiple targets that all need to have the same build version, such as with a watchOS 2 app and your continuous deployment system needs to increment the build version)
# Assumes build version in xcconfig is defined as the following, where no spaces, spaces and/or tabs are allowed:
# BUILD_VERSION = 1.2.3.4
filename = "sample.xcconfig"
build_version_property = "BUILD_VERSION"
new_version_string = ""
lines = IO.readlines(filename)
@lemonkey
lemonkey / gist:22ba6a95b1751c1583cc
Created August 7, 2014 02:57
nsmeetup-20140806
NSMeetup: Designing Your API Client (@sandofsky)
2014/08/06
500px client example
(in swift)
twitter iOS model layer used in mac client

Keybase proof

I hereby claim:

  • I am lemonkey on github.
  • I am lemonkey (https://keybase.io/lemonkey) on keybase.
  • I have a public key whose fingerprint is 864D B213 DBD6 A2C5 943E 1EDD A604 2AA8 08C1 7367

To claim this, I am signing this object:

@lemonkey
lemonkey / gist:5208512
Last active December 15, 2015 05:19
Cron job script to automatically notify you via email and telephone (using Twilio) if Apple's WWDC website changes. Originally written for Bash environments that have Sendmail installed.
#!/bin/sh
CAN_COMPARE=0;
EMAIL="<list of email addresses separated with a space";
# If index.html exists, rename to index.html.old.
if [ -f index.html ];
then
CAN_COMPARE=1;
mv index.html index.html.old