Skip to content

Instantly share code, notes, and snippets.

View kviksilver's full-sized avatar

Boris Erceg kviksilver

View GitHub Profile
@xfreebird
xfreebird / customsshd
Last active May 31, 2022 07:32
A script which can be used to start a second SSHD daemon on OS X. This is an workaround for running tests using xcodebuild through ssh with Jenkins .
#!/bin/bash
INSTALL_PATH="$HOME/scripts"
SCRIPT_PATH="$INSTALL_PATH/customsshd"
LAUNCHCTL_PATH="$HOME/Library/LaunchAgents/com.my.customsshd.plist"
SSH_KEYS_INSTALL_PATH=$HOME/customkeys
SSH_HOST_KEY=$SSH_KEYS_INSTALL_PATH/ssh_host_key
SSH_HOST_RSA_KEY=$SSH_KEYS_INSTALL_PATH/ssh_host_rsa_key
SSH_HOST_DSA_KEY=$SSH_KEYS_INSTALL_PATH/ssh_host_dsa_key
SSHD_PORT=50111
@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.