Skip to content
Permalink
Browse files

Support CocoaPods and Carthage for examples

  • Loading branch information...
pvzig committed Apr 6, 2019
1 parent cc20c54 commit ead9bb9c41158aacdbf823e75dc8ee1fa1ed7ca7
@@ -0,0 +1 @@
github "pvzig/SlackKit"
@@ -0,0 +1,275 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objects = {

/* Begin PBXBuildFile section */
262F50452259146E00A74EB1 /* Leaderbot.swift in Sources */ = {isa = PBXBuildFile; fileRef = 262F50432259146E00A74EB1 /* Leaderbot.swift */; };
262F50462259146E00A74EB1 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 262F50442259146E00A74EB1 /* main.swift */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
262F50312259139400A74EB1 /* Leaderboard.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Leaderboard.app; sourceTree = BUILT_PRODUCTS_DIR; };
262F50362259139400A74EB1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
262F50432259146E00A74EB1 /* Leaderbot.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Leaderbot.swift; path = Sources/Leaderbot.swift; sourceTree = "<group>"; };
262F50442259146E00A74EB1 /* main.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = main.swift; path = Sources/main.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
262F502F2259139400A74EB1 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
262F50292259139400A74EB1 = {
isa = PBXGroup;
children = (
262F50332259139400A74EB1 /* Leaderboard */,
262F50322259139400A74EB1 /* Products */,
665E45E1CAEDB17C0745AD28 /* Pods */,
);
sourceTree = "<group>";
};
262F50322259139400A74EB1 /* Products */ = {
isa = PBXGroup;
children = (
262F50312259139400A74EB1 /* Leaderboard.app */,
);
name = Products;
sourceTree = "<group>";
};
262F50332259139400A74EB1 /* Leaderboard */ = {
isa = PBXGroup;
children = (
262F50432259146E00A74EB1 /* Leaderbot.swift */,
262F50442259146E00A74EB1 /* main.swift */,
262F50362259139400A74EB1 /* Info.plist */,
);
path = Leaderboard;
sourceTree = "<group>";
};
665E45E1CAEDB17C0745AD28 /* Pods */ = {
isa = PBXGroup;
children = (
);
path = Pods;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
262F50302259139400A74EB1 /* Leaderboard */ = {
isa = PBXNativeTarget;
buildConfigurationList = 262F50392259139400A74EB1 /* Build configuration list for PBXNativeTarget "Leaderboard" */;
buildPhases = (
262F502E2259139400A74EB1 /* Sources */,
262F502F2259139400A74EB1 /* Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = Leaderboard;
productName = Leaderboard;
productReference = 262F50312259139400A74EB1 /* Leaderboard.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
262F502A2259139400A74EB1 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1020;
LastUpgradeCheck = 1020;
ORGANIZATIONNAME = "Peter Zignego";
TargetAttributes = {
262F50302259139400A74EB1 = {
CreatedOnToolsVersion = 10.2;
LastSwiftMigration = 1020;
};
};
};
buildConfigurationList = 262F502D2259139400A74EB1 /* Build configuration list for PBXProject "Leaderboard" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = 262F50292259139400A74EB1;
productRefGroup = 262F50322259139400A74EB1 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
262F50302259139400A74EB1 /* Leaderboard */,
);
};
/* End PBXProject section */

/* Begin PBXSourcesBuildPhase section */
262F502E2259139400A74EB1 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
262F50462259146E00A74EB1 /* main.swift in Sources */,
262F50452259146E00A74EB1 /* Leaderbot.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin XCBuildConfiguration section */
262F50372259139400A74EB1 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "-";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
};
name = Debug;
};
262F50382259139400A74EB1 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "-";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
};
name = Release;
};
262F503A2259139400A74EB1 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = "";
FRAMEWORK_SEARCH_PATHS = "\"$(SRCROOT)/Carthage/Build/Mac\"";
INFOPLIST_FILE = Leaderboard/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@executable_path/../Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.launchsoft.Leaderboard;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
};
name = Debug;
};
262F503B2259139400A74EB1 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = "";
FRAMEWORK_SEARCH_PATHS = "\"$(SRCROOT)/Carthage/Build/Mac\"";
INFOPLIST_FILE = Leaderboard/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@executable_path/../Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.launchsoft.Leaderboard;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 5.0;
};
name = Release;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
262F502D2259139400A74EB1 /* Build configuration list for PBXProject "Leaderboard" */ = {
isa = XCConfigurationList;
buildConfigurations = (
262F50372259139400A74EB1 /* Debug */,
262F50382259139400A74EB1 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
262F50392259139400A74EB1 /* Build configuration list for PBXNativeTarget "Leaderboard" */ = {
isa = XCConfigurationList;
buildConfigurations = (
262F503A2259139400A74EB1 /* Debug */,
262F503B2259139400A74EB1 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 262F502A2259139400A74EB1 /* Project object */;
}

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2019 Peter Zignego. All rights reserved.</string>
</dict>
</plist>
@@ -1,7 +1,7 @@
//
// Leaderboard.swift
//
// Copyright © 2017 Peter Zignego. All rights reserved.
// Copyright © 2019 Peter Zignego. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@@ -100,7 +100,7 @@ class Leaderbot {
let thingRegex = try? NSRegularExpression(pattern: expression, options: [])
let things = thingRegex?.matches(in: text, options: [], range: NSMakeRange(0, text.utf16.count)) ?? []
for match in things {
let value = text.substring(with: text.range(from: match.range(at: 1))!)
let value = String(text[text.range(from: match.range(at: 1))!])
if leaderboards[teamID]?.scores[value] == nil { leaderboards[teamID]?.scores[value] = 0 }
switch trigger {
case .plusPlus:
File renamed without changes.
@@ -8,11 +8,11 @@ let package = Package(
.executable(name: "Leaderboard", targets: ["Leaderboard"]),
],
dependencies: [
.package(url: "https://github.com/SlackKit/SlackKit", .upToNextMajor(from: "4.0.0"))
.package(url: "https://github.com/pvzig/SlackKit", .upToNextMinor(from: "4.3.0"))
],
targets: [
.target(name: "Leaderboard",
dependencies: ["SlackKit"],
path: "Sources")
dependencies: ["SlackKit"],
path: "Leaderboard/Sources")
]
)
@@ -0,0 +1,6 @@
platform :osx, '10.11'

target 'Leaderboard' do
use_frameworks!
pod 'SlackKit', '>= 4.3.0'
end
@@ -0,0 +1 @@
github "pvzig/SlackKit"
@@ -8,11 +8,11 @@ let package = Package(
.executable(name: "Robot or Not Bot", targets: ["Robot or Not Bot"]),
],
dependencies: [
.package(url: "https://github.com/SlackKit/SlackKit", .upToNextMajor(from: "4.0.0"))
.package(url: "https://github.com/pvzig/SlackKit", .upToNextMinor(from: "4.3.0"))
],
targets: [
.target(name: "Robot or Not Bot",
dependencies: ["SlackKit"],
path: "Sources")
path: "Robot or Not Bot/Sources")
]
)
@@ -0,0 +1,7 @@
platform :osx, '10.11'

target 'Robot Or Not Bot' do
use_frameworks!
pod 'SlackKit', '>= 4.3.0'
end

Oops, something went wrong.

0 comments on commit ead9bb9

Please sign in to comment.
You can’t perform that action at this time.