Skip to content
This repository has been archived by the owner on Dec 18, 2022. It is now read-only.

Commit

Permalink
9.14.0.0 support. Read description!
Browse files Browse the repository at this point in the history
WARNING: as of 9.14.0.0, Snapchat started asserting a header value we
cannot generate on our own. There is a way around this but it involves
sending the username and password over an unencrypted network. You must
explicitly set the `useInsecureLogin` property of SKClient to YES
before signing in.

Also fixed some stories not downloading properly or not at all, and
added an OS X project.
  • Loading branch information
NSExceptional committed Aug 31, 2015
1 parent 97fa145 commit 4f74365
Show file tree
Hide file tree
Showing 23 changed files with 3,518 additions and 1,209 deletions.
16 changes: 14 additions & 2 deletions Example/Podfile
@@ -1,13 +1,25 @@
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!

workspace 'SnapchatKit'
xcodeproj 'SnapchatKit-OSX/SnapchatKit-OSX.xcodeproj'
xcodeproj 'SnapchatKit.xcodeproj'

target 'SnapchatKit_Example', :exclusive => true do
# link_with 'SnapchatKit_Example', 'SnapchatKit_Tests'
pod "SnapchatKit", :path => "../"
pod 'Mantle'
end

target 'SnapchatKit_Tests', :exclusive => true do
target 'SnapchatKit-OSX', :exclusive => true do
xcodeproj 'SnapchatKit-OSX/SnapchatKit-OSX.xcodeproj'
platform :osx, '10.8'
link_with 'SnapchatKit-OSX'
pod "SnapchatKit", :path => "../"
pod 'Mantle'
end


target 'SnapchatKit_Tests', :exclusive => true do
pod "SnapchatKit", :path => "../"
pod 'Mantle'
end
4 changes: 2 additions & 2 deletions Example/Pods/Local Podspecs/SnapchatKit.podspec.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3,581 changes: 2,445 additions & 1,136 deletions Example/Pods/Pods.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

329 changes: 329 additions & 0 deletions Example/SnapchatKit-OSX/SnapchatKit-OSX.xcodeproj/project.pbxproj
@@ -0,0 +1,329 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {

/* Begin PBXBuildFile section */
AD42B37BDA17EA94CF99DED6 /* Pods_SnapchatKit_OSX.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F1E32E7687F7915C045BD510 /* Pods_SnapchatKit_OSX.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
B4D11BA91B90E3850012116A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = B4D11BA81B90E3850012116A /* main.m */; };
B4D11BB11B90E3B60012116A /* TBTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = B4D11BB01B90E3B60012116A /* TBTimer.m */; };
/* End PBXBuildFile section */

/* Begin PBXCopyFilesBuildPhase section */
B4D11BA31B90E3850012116A /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = /usr/share/man/man1/;
dstSubfolderSpec = 0;
files = (
);
runOnlyForDeploymentPostprocessing = 1;
};
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
A3FE50062F493EF242FAFB51 /* Pods-SnapchatKit-OSX.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SnapchatKit-OSX.release.xcconfig"; path = "../Pods/Target Support Files/Pods-SnapchatKit-OSX/Pods-SnapchatKit-OSX.release.xcconfig"; sourceTree = "<group>"; };
B4D11BA51B90E3850012116A /* SnapchatKit-OSX */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "SnapchatKit-OSX"; sourceTree = BUILT_PRODUCTS_DIR; };
B4D11BA81B90E3850012116A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
B4D11BAF1B90E3B60012116A /* TBTimer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TBTimer.h; sourceTree = "<group>"; };
B4D11BB01B90E3B60012116A /* TBTimer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TBTimer.m; sourceTree = "<group>"; };
C9C926AEFC7982E0D5A16B5B /* Pods-SnapchatKit-OSX.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SnapchatKit-OSX.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-SnapchatKit-OSX/Pods-SnapchatKit-OSX.debug.xcconfig"; sourceTree = "<group>"; };
F1E32E7687F7915C045BD510 /* Pods_SnapchatKit_OSX.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SnapchatKit_OSX.framework; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
B4D11BA21B90E3850012116A /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
AD42B37BDA17EA94CF99DED6 /* Pods_SnapchatKit_OSX.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
30006492F7055E55445CD680 /* Frameworks */ = {
isa = PBXGroup;
children = (
F1E32E7687F7915C045BD510 /* Pods_SnapchatKit_OSX.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
7FF3D1DE4A5D202123D7E316 /* Pods */ = {
isa = PBXGroup;
children = (
C9C926AEFC7982E0D5A16B5B /* Pods-SnapchatKit-OSX.debug.xcconfig */,
A3FE50062F493EF242FAFB51 /* Pods-SnapchatKit-OSX.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
};
B4D11B9C1B90E3850012116A = {
isa = PBXGroup;
children = (
B4D11BA71B90E3850012116A /* SnapchatKit-OSX */,
B4D11BA61B90E3850012116A /* Products */,
7FF3D1DE4A5D202123D7E316 /* Pods */,
30006492F7055E55445CD680 /* Frameworks */,
);
sourceTree = "<group>";
};
B4D11BA61B90E3850012116A /* Products */ = {
isa = PBXGroup;
children = (
B4D11BA51B90E3850012116A /* SnapchatKit-OSX */,
);
name = Products;
sourceTree = "<group>";
};
B4D11BA71B90E3850012116A /* SnapchatKit-OSX */ = {
isa = PBXGroup;
children = (
B4D11BA81B90E3850012116A /* main.m */,
B4D11BAF1B90E3B60012116A /* TBTimer.h */,
B4D11BB01B90E3B60012116A /* TBTimer.m */,
);
path = "SnapchatKit-OSX";
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
B4D11BA41B90E3850012116A /* SnapchatKit-OSX */ = {
isa = PBXNativeTarget;
buildConfigurationList = B4D11BAC1B90E3850012116A /* Build configuration list for PBXNativeTarget "SnapchatKit-OSX" */;
buildPhases = (
25E41048F5C74177AD6109E1 /* Check Pods Manifest.lock */,
B4D11BA11B90E3850012116A /* Sources */,
B4D11BA21B90E3850012116A /* Frameworks */,
B4D11BA31B90E3850012116A /* CopyFiles */,
A0C0DCCB6E4CF45EB5D4467B /* Copy Pods Resources */,
B4D11BB31B90FE370012116A /* Embed Pods Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = "SnapchatKit-OSX";
productName = "SnapchatKit-OSX";
productReference = B4D11BA51B90E3850012116A /* SnapchatKit-OSX */;
productType = "com.apple.product-type.tool";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
B4D11B9D1B90E3850012116A /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0640;
ORGANIZATIONNAME = "Tanner Bennett";
TargetAttributes = {
B4D11BA41B90E3850012116A = {
CreatedOnToolsVersion = 6.4;
};
};
};
buildConfigurationList = B4D11BA01B90E3850012116A /* Build configuration list for PBXProject "SnapchatKit-OSX" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = B4D11B9C1B90E3850012116A;
productRefGroup = B4D11BA61B90E3850012116A /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
B4D11BA41B90E3850012116A /* SnapchatKit-OSX */,
);
};
/* End PBXProject section */

/* Begin PBXShellScriptBuildPhase section */
25E41048F5C74177AD6109E1 /* Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "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;
};
A0C0DCCB6E4CF45EB5D4467B /* Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/../Pods/Target Support Files/Pods-SnapchatKit-OSX/Pods-SnapchatKit-OSX-resources.sh\"\n";
showEnvVarsInLog = 0;
};
B4D11BB31B90FE370012116A /* Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/../Pods/Target Support Files/Pods-SnapchatKit-OSX/Pods-SnapchatKit-OSX-frameworks.sh\"";
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
B4D11BA11B90E3850012116A /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
B4D11BA91B90E3850012116A /* main.m in Sources */,
B4D11BB11B90E3B60012116A /* TBTimer.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin XCBuildConfiguration section */
B4D11BAA1B90E3850012116A /* 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;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = 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_SYMBOLS_PRIVATE_EXTERN = NO;
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.10;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
};
name = Debug;
};
B4D11BAB1B90E3850012116A /* 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;
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.10;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
};
name = Release;
};
B4D11BAD1B90E3850012116A /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = C9C926AEFC7982E0D5A16B5B /* Pods-SnapchatKit-OSX.debug.xcconfig */;
buildSettings = {
LD_RUNPATH_SEARCH_PATHS = "$(inherited) '@loader_path/Frameworks' '@executable_path/../Frameworks'";
ONLY_ACTIVE_ARCH = YES;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
B4D11BAE1B90E3850012116A /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = A3FE50062F493EF242FAFB51 /* Pods-SnapchatKit-OSX.release.xcconfig */;
buildSettings = {
LD_RUNPATH_SEARCH_PATHS = "$(inherited) '@loader_path/Frameworks' '@executable_path/../Frameworks'";
ONLY_ACTIVE_ARCH = NO;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
B4D11BA01B90E3850012116A /* Build configuration list for PBXProject "SnapchatKit-OSX" */ = {
isa = XCConfigurationList;
buildConfigurations = (
B4D11BAA1B90E3850012116A /* Debug */,
B4D11BAB1B90E3850012116A /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
B4D11BAC1B90E3850012116A /* Build configuration list for PBXNativeTarget "SnapchatKit-OSX" */ = {
isa = XCConfigurationList;
buildConfigurations = (
B4D11BAD1B90E3850012116A /* Debug */,
B4D11BAE1B90E3850012116A /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = B4D11B9D1B90E3850012116A /* Project object */;
}
19 changes: 19 additions & 0 deletions Example/SnapchatKit-OSX/SnapchatKit-OSX/TBTimer.h
@@ -0,0 +1,19 @@
//
// TBTimeInterval.h
// BU Eats
//
// Created by Tanner on 4/24/15.
// Copyright (c) 2015 Tanner Bennett. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface TBTimer : NSObject

+ (void)startTimer;
+ (CGFloat)lap;

@property (nonatomic, readonly) NSDate *startTime;
@property (nonatomic, readonly) NSDate *endTime;

@end

0 comments on commit 4f74365

Please sign in to comment.