Skip to content

Commit

Permalink
Merge pull request #9 from team-supercharge/bugfixes
Browse files Browse the repository at this point in the history
Fix bug related to the teardown method and old RNCryptor version
  • Loading branch information
davidkovaccs authored Jan 5, 2018
2 parents 48a03a5 + 07a34b9 commit f93e2c6
Show file tree
Hide file tree
Showing 11 changed files with 328 additions and 58 deletions.
11 changes: 4 additions & 7 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
PODS:
- RNCryptor (2.2)
- SCConfiguration (2.0.0):
- RNCryptor (~> 2.0)
- SCConfiguration (2.2.0)

DEPENDENCIES:
- SCConfiguration (from `../`)

EXTERNAL SOURCES:
SCConfiguration:
:path: "../"
:path: ../

SPEC CHECKSUMS:
RNCryptor: c68678461a2c7474a55db9a6a98834c22d51f535
SCConfiguration: 6641aca330415f0ab2b7df44a24e71ecc6ebc8a0
SCConfiguration: ec7fb82f3d3215d720935879483da59545756131

PODFILE CHECKSUM: 25fa3b69afd19a2eec86fab4e9ba7e9e5a6f5b2c

COCOAPODS: 1.0.0
COCOAPODS: 1.3.1
74 changes: 51 additions & 23 deletions Example/SCConfiguration.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,13 @@
isa = PBXNativeTarget;
buildConfigurationList = 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "SCConfiguration_Example" */;
buildPhases = (
E2B72D731062D732D58832F8 /* 📦 Check Pods Manifest.lock */,
E2B72D731062D732D58832F8 /* [CP] Check Pods Manifest.lock */,
6003F586195388D20070C39A /* Sources */,
6003F587195388D20070C39A /* Frameworks */,
6003F588195388D20070C39A /* Resources */,
7208BB2E1CBA537600035F3E /* 🛠 Encryption */,
D03AC322FC9FC361142635DB /* 📦 Embed Pods Frameworks */,
ECFE87C11E0424A786B8F9A2 /* 📦 Copy Pods Resources */,
D03AC322FC9FC361142635DB /* [CP] Embed Pods Frameworks */,
ECFE87C11E0424A786B8F9A2 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand All @@ -223,13 +223,13 @@
isa = PBXNativeTarget;
buildConfigurationList = 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "SCConfiguration_Tests" */;
buildPhases = (
B3AEE9D98CFF8A7E9CE26736 /* 📦 Check Pods Manifest.lock */,
B3AEE9D98CFF8A7E9CE26736 /* [CP] Check Pods Manifest.lock */,
6003F5AA195388D20070C39A /* Sources */,
6003F5AB195388D20070C39A /* Frameworks */,
6003F5AC195388D20070C39A /* Resources */,
72B041571CEC8D1A00B6EADD /* 🛠 Encryption */,
284B728E2F5D3AC4E6411B12 /* 📦 Embed Pods Frameworks */,
94795A0EB0328CCFF409755D /* 📦 Copy Pods Resources */,
284B728E2F5D3AC4E6411B12 /* [CP] Embed Pods Frameworks */,
94795A0EB0328CCFF409755D /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand All @@ -248,7 +248,7 @@
isa = PBXProject;
attributes = {
CLASSPREFIX = SC;
LastUpgradeCheck = 0720;
LastUpgradeCheck = 0910;
ORGANIZATIONNAME = "Gergő Németh";
TargetAttributes = {
6003F5AD195388D20070C39A = {
Expand Down Expand Up @@ -297,14 +297,14 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
284B728E2F5D3AC4E6411B12 /* 📦 Embed Pods Frameworks */ = {
284B728E2F5D3AC4E6411B12 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "📦 Embed Pods Frameworks";
name = "[CP] Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -342,74 +342,80 @@
shellScript = "openssl enc -e -aes-256-cbc -in \"$PROJECT_DIR/SCConfiguration/Configuration.plist\" -out \"$TARGET_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH/Configuration.enc\" -pass pass:SCConfigurationPass\n";
showEnvVarsInLog = 0;
};
94795A0EB0328CCFF409755D /* 📦 Copy Pods Resources */ = {
94795A0EB0328CCFF409755D /* [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-SCConfiguration_Tests/Pods-SCConfiguration_Tests-resources.sh\"\n";
showEnvVarsInLog = 0;
};
B3AEE9D98CFF8A7E9CE26736 /* 📦 Check Pods Manifest.lock */ = {
B3AEE9D98CFF8A7E9CE26736 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "📦 Check Pods Manifest.lock";
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-SCConfiguration_Tests-checkManifestLockResult.txt",
);
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";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
D03AC322FC9FC361142635DB /* 📦 Embed Pods Frameworks */ = {
D03AC322FC9FC361142635DB /* [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-SCConfiguration_Example/Pods-SCConfiguration_Example-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
E2B72D731062D732D58832F8 /* 📦 Check Pods Manifest.lock */ = {
E2B72D731062D732D58832F8 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "📦 Check Pods Manifest.lock";
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-SCConfiguration_Example-checkManifestLockResult.txt",
);
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";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
ECFE87C11E0424A786B8F9A2 /* 📦 Copy Pods Resources */ = {
ECFE87C11E0424A786B8F9A2 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "📦 Copy Pods Resources";
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -476,19 +482,30 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = 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_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
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",
Expand All @@ -501,7 +518,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
Expand All @@ -516,25 +533,36 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = 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_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
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;
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0720"
LastUpgradeVersion = "0910"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
Expand Down Expand Up @@ -55,6 +56,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "29x29",
Expand Down Expand Up @@ -48,6 +58,11 @@
"idiom" : "iphone",
"filename" : "180.png",
"scale" : "3x"
},
{
"idiom" : "ios-marketing",
"size" : "1024x1024",
"scale" : "1x"
}
],
"info" : {
Expand Down
14 changes: 14 additions & 0 deletions Pod/Classes/NSMutableData+SCCryptographyHelper.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//
// NSMutableData+SCCryptographyHelper.h
// Pods-SCConfiguration_Example
//
// Created by Gergo Nemeth on 2017. 11. 06..
//

#import <Foundation/Foundation.h>

@interface NSMutableData (SCCryptographyHelper)

- (NSData *)SC_consumeToIndex:(NSUInteger)index;

@end
20 changes: 20 additions & 0 deletions Pod/Classes/NSMutableData+SCCryptographyHelper.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// NSMutableData+SCCryptographyHelper.m
// Pods-SCConfiguration_Example
//
// Created by Gergo Nemeth on 2017. 11. 06..
//

#import "NSMutableData+SCCryptographyHelper.h"

@implementation NSMutableData (SCCryptographyHelper)

- (NSData *)SC_consumeToIndex:(NSUInteger)index
{
NSData *removed = [self subdataWithRange:NSMakeRange(0, index)];
[self replaceBytesInRange:NSMakeRange(0, self.length - index) withBytes:([self mutableBytes] + index)];
[self setLength:self.length - index];
return removed;
}

@end
3 changes: 1 addition & 2 deletions Pod/Classes/SCConfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,12 @@
/**
You can set with this method if you want to keep changes between application launches or not.
By default this behavior is set to <code>YES</code>.
By default this behavior is set to <code>YES</code>, which means changes are kept between application launches.
@param state A <code>BOOL</code> value which determinates if the overwrites should remain between application launches or not.
*/
- (void)setOverwriteStateToPersistent:(BOOL)state;


/**
You can overwrite a single -unprotected- part of the config file with this method.
Expand Down
Loading

0 comments on commit f93e2c6

Please sign in to comment.