Skip to content

Commit

Permalink
Allow building: updates to project.clj & cocoapods usage (#94)
Browse files Browse the repository at this point in the history
* project.clj: target test.check at 0.9.0

* Update Podfile and project.pbxproj for cocoapods

* Update to Xcode 7.3.1 recommended project settings

* Update to new #selector() syntax
  • Loading branch information
raheelahmad authored and mfikes committed Aug 30, 2016
1 parent 88f83dc commit 33415a4
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 29 deletions.
2 changes: 1 addition & 1 deletion ClojureScript/replete/project.clj
Expand Up @@ -8,7 +8,7 @@
[malabarba/lazy-map "1.1"]
[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescript "1.9.14"]
[org.clojure/test.check "0.9.1-SNAPSHOT"]]
[org.clojure/test.check "0.9.0"]]
:clean-targets ["out" "target"]
:plugins [[lein-cljsbuild "1.1.1"]]
:cljsbuild {:builds {:test {:source-paths ["src" "test"]
Expand Down
4 changes: 3 additions & 1 deletion Podfile
@@ -1,4 +1,6 @@
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'

pod "Ambly", "~> 0.6.0"
target "Replete" do
pod "Ambly", "~> 0.6.0"
end
43 changes: 27 additions & 16 deletions Replete.xcodeproj/project.pbxproj
Expand Up @@ -7,7 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
2C7CFB443527243C47B0279F /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7AFE2C9D909563258DFF3198 /* libPods.a */; };
98DC562763EFA7931BC0AD21 /* libPods-Replete.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 250EDB3ED346C2A011F77D6E /* libPods-Replete.a */; };
ED06DC271B3F62E800100331 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = ED06DC261B3F62E800100331 /* main.m */; };
ED06DC2A1B3F62E800100331 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = ED06DC291B3F62E800100331 /* AppDelegate.m */; };
ED06DC301B3F62E800100331 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = ED06DC2E1B3F62E800100331 /* Main.storyboard */; };
Expand All @@ -33,8 +33,11 @@

/* Begin PBXFileReference section */
20A0AE708C7C3592BDE9E85C /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; };
250EDB3ED346C2A011F77D6E /* libPods-Replete.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Replete.a"; sourceTree = BUILT_PRODUCTS_DIR; };
481651E85E5AA77D6C273322 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; };
64396A0756A0666CD3103003 /* Pods-Replete.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Replete.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Replete/Pods-Replete.debug.xcconfig"; sourceTree = "<group>"; };
7AFE2C9D909563258DFF3198 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
8883F7070265CFBD24D584B0 /* Pods-Replete.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Replete.release.xcconfig"; path = "Pods/Target Support Files/Pods-Replete/Pods-Replete.release.xcconfig"; sourceTree = "<group>"; };
ED06DC211B3F62E800100331 /* Replete.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Replete.app; sourceTree = BUILT_PRODUCTS_DIR; };
ED06DC251B3F62E800100331 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
ED06DC261B3F62E800100331 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
Expand All @@ -59,7 +62,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
2C7CFB443527243C47B0279F /* libPods.a in Frameworks */,
98DC562763EFA7931BC0AD21 /* libPods-Replete.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -78,6 +81,8 @@
children = (
481651E85E5AA77D6C273322 /* Pods.debug.xcconfig */,
20A0AE708C7C3592BDE9E85C /* Pods.release.xcconfig */,
64396A0756A0666CD3103003 /* Pods-Replete.debug.xcconfig */,
8883F7070265CFBD24D584B0 /* Pods-Replete.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
Expand All @@ -86,6 +91,7 @@
isa = PBXGroup;
children = (
7AFE2C9D909563258DFF3198 /* libPods.a */,
250EDB3ED346C2A011F77D6E /* libPods-Replete.a */,
);
name = Frameworks;
sourceTree = "<group>";
Expand Down Expand Up @@ -162,12 +168,12 @@
isa = PBXNativeTarget;
buildConfigurationList = ED06DC441B3F62E800100331 /* Build configuration list for PBXNativeTarget "Replete" */;
buildPhases = (
2AF877179F9861D26AD89236 /* Check Pods Manifest.lock */,
2AF877179F9861D26AD89236 /* [CP] Check Pods Manifest.lock */,
ED06DC1D1B3F62E800100331 /* Sources */,
ED06DC1E1B3F62E800100331 /* Frameworks */,
ED06DC1F1B3F62E800100331 /* Resources */,
33F68F892FA091C7A22FA557 /* Copy Pods Resources */,
4D2E53D6DB8DA3A585256CA9 /* Embed Pods Frameworks */,
33F68F892FA091C7A22FA557 /* [CP] Copy Pods Resources */,
4D2E53D6DB8DA3A585256CA9 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -204,7 +210,7 @@
attributes = {
LastSwiftMigration = 0700;
LastSwiftUpdateCheck = 0700;
LastUpgradeCheck = 0630;
LastUpgradeCheck = 0730;
ORGANIZATIONNAME = FikesFarm;
TargetAttributes = {
ED06DC201B3F62E800100331 = {
Expand Down Expand Up @@ -257,49 +263,49 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
2AF877179F9861D26AD89236 /* Check Pods Manifest.lock */ = {
2AF877179F9861D26AD89236 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Check Pods Manifest.lock";
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
33F68F892FA091C7A22FA557 /* Copy Pods Resources */ = {
33F68F892FA091C7A22FA557 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Copy Pods Resources";
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n";
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Replete/Pods-Replete-resources.sh\"\n";
showEnvVarsInLog = 0;
};
4D2E53D6DB8DA3A585256CA9 /* Embed Pods Frameworks */ = {
4D2E53D6DB8DA3A585256CA9 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Embed Pods Frameworks";
name = "[CP] Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n";
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Replete/Pods-Replete-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down Expand Up @@ -377,6 +383,7 @@
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
Expand Down Expand Up @@ -438,12 +445,13 @@
};
ED06DC451B3F62E800100331 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 481651E85E5AA77D6C273322 /* Pods.debug.xcconfig */;
baseConfigurationReference = 64396A0756A0666CD3103003 /* Pods-Replete.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
INFOPLIST_FILE = Replete/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.fikesfarm.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Replete/Replete-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
Expand All @@ -453,12 +461,13 @@
};
ED06DC461B3F62E800100331 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 20A0AE708C7C3592BDE9E85C /* Pods.release.xcconfig */;
baseConfigurationReference = 8883F7070265CFBD24D584B0 /* Pods-Replete.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
INFOPLIST_FILE = Replete/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.fikesfarm.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Replete/Replete-Bridging-Header.h";
TARGETED_DEVICE_FAMILY = "1,2";
Expand All @@ -479,6 +488,7 @@
);
INFOPLIST_FILE = RepleteTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.fikesfarm.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Replete.app/Replete";
};
Expand All @@ -494,6 +504,7 @@
);
INFOPLIST_FILE = RepleteTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.fikesfarm.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Replete.app/Replete";
};
Expand Down
2 changes: 1 addition & 1 deletion Replete/Info.plist
Expand Up @@ -24,7 +24,7 @@
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>com.fikesfarm.$(PRODUCT_NAME:rfc1034identifier)</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
Expand Down
18 changes: 9 additions & 9 deletions Replete/ReplViewController.swift
Expand Up @@ -43,7 +43,7 @@ class ReplViewController: UIViewController, UITableViewDataSource, UITableViewDe
evalButton.setTitleColor(UIColor(red: 142/255, green: 142/255, blue: 147/255, alpha: 1), forState: .Disabled)
evalButton.setTitleColor(UIColor(red: 1/255, green: 122/255, blue: 255/255, alpha: 1), forState: .Normal)
evalButton.contentEdgeInsets = UIEdgeInsets(top: 6, left: 6, bottom: 6, right: 8)
evalButton.addTarget(self, action: "sendAction", forControlEvents: UIControlEvents.TouchUpInside)
evalButton.addTarget(self, action: #selector(sendAction), forControlEvents: UIControlEvents.TouchUpInside)
toolBar.addSubview(evalButton)

toolBar.translatesAutoresizingMaskIntoConstraints = false
Expand Down Expand Up @@ -102,9 +102,9 @@ class ReplViewController: UIViewController, UITableViewDataSource, UITableViewDe
view.addSubview(tableView)

let notificationCenter = NSNotificationCenter.defaultCenter()
notificationCenter.addObserver(self, selector: "keyboardWillShow:", name: UIKeyboardWillShowNotification, object: nil)
notificationCenter.addObserver(self, selector: "keyboardDidShow:", name: UIKeyboardDidShowNotification, object: nil)
notificationCenter.addObserver(self, selector: "menuControllerWillHide:", name: UIMenuControllerWillHideMenuNotification, object: nil) // #CopyMessage
notificationCenter.addObserver(self, selector: #selector(keyboardWillShow(_:)), name: UIKeyboardWillShowNotification, object: nil)
notificationCenter.addObserver(self, selector: #selector(keyboardDidShow(_:)), name: UIKeyboardDidShowNotification, object: nil)
notificationCenter.addObserver(self, selector: #selector(menuControllerWillHide(_:)), name: UIMenuControllerWillHideMenuNotification, object: nil) // #CopyMessage

let appDelegate = UIApplication.sharedApplication().delegate as! AppDelegate

Expand Down Expand Up @@ -184,7 +184,7 @@ class ReplViewController: UIViewController, UITableViewDataSource, UITableViewDe
cell = HistoryTableViewCell(style: .Default, reuseIdentifier: cellIdentifier)

// Add gesture recognizers #CopyMessage
let action: Selector = "messageShowMenuAction:"
let action: Selector = #selector(messageShowMenuAction(_:))
let doubleTapGestureRecognizer = UITapGestureRecognizer(target: self, action: action)
doubleTapGestureRecognizer.numberOfTapsRequired = 2
cell.messageLabel.addGestureRecognizer(doubleTapGestureRecognizer)
Expand Down Expand Up @@ -379,7 +379,7 @@ class ReplViewController: UIViewController, UITableViewDataSource, UITableViewDe
if (text != "\n") {
// NSLog("load: %@", text);

var s = NSMutableAttributedString(string:text);
let s = NSMutableAttributedString(string:text)

while (markString(s)) {};

Expand Down Expand Up @@ -457,7 +457,7 @@ class ReplViewController: UIViewController, UITableViewDataSource, UITableViewDe
let menuController = UIMenuController.sharedMenuController()
let bubbleImageView = gestureRecognizer.view!
menuController.setTargetRect(bubbleImageView.frame, inView: bubbleImageView.superview!)
menuController.menuItems = [UIMenuItem(title: "Copy", action: "messageCopyTextAction:")]
menuController.menuItems = [UIMenuItem(title: "Copy", action: #selector(messageCopyTextAction(_:)))]
menuController.setMenuVisible(true, animated: true)
}
}
Expand All @@ -477,7 +477,7 @@ class ReplViewController: UIViewController, UITableViewDataSource, UITableViewDe

override var keyCommands: [UIKeyCommand]? {
get {
let commandEnter = UIKeyCommand(input: "\r", modifierFlags: .Command, action: Selector("sendAction"))
let commandEnter = UIKeyCommand(input: "\r", modifierFlags: .Command, action: #selector(sendAction))
return [commandEnter]
}
}
Expand All @@ -487,7 +487,7 @@ class ReplViewController: UIViewController, UITableViewDataSource, UITableViewDe
class InputTextView: UITextView {
override func canPerformAction(action: Selector, withSender sender: AnyObject!) -> Bool {
if (delegate as! ReplViewController).tableView.indexPathForSelectedRow != nil {
return action == "messageCopyTextAction:"
return action == #selector(messageCopyTextAction(_:))
} else {
return super.canPerformAction(action, withSender: sender)
}
Expand Down
2 changes: 1 addition & 1 deletion RepleteTests/Info.plist
Expand Up @@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>com.fikesfarm.$(PRODUCT_NAME:rfc1034identifier)</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
Expand Down

0 comments on commit 33415a4

Please sign in to comment.