objcolumnist / mcsmkeychainitem Goto Github PK
View Code? Open in Web Editor NEWA Keychain Wrapper for iOS and OS X
License: Other
A Keychain Wrapper for iOS and OS X
License: Other
I want use token-based authentication,
please, help me, how i can store auth token?
So, i want store:
Tell me way to store this
Thank you!
Hi,
i have an issue where [MCSMApplicationUUIDKeychainItem applicationUUID] give me same Unique Id for 2 different iPads. Can anybody tell me in which condition i can get same Unique Id for different iPads? It is urgent if anybody also get this issue, please share your thoughts with me.
Thanks
We are currently using the older 1.0.2 version of MCSMKeychainItem. Xcode 6 is complaining about some ARC related issues. It appears that you have resolved these issued with the recent 1.1 changes. Could you please publish the 1.1 pod spec and add a 1.1 tag so we can take advantage of these changes?
I cant store my item
NSString *serviceAccount = @"My.account";
NSString *account = @"[email protected]";
NSDictionary *attributes = [NSDictionary dictionaryWithObject:@"Myattr" forKey:@"nameAttrib"];
MCSMGenericKeychainItem *genericKeychainItemAccount = nil;
genericKeychainItemAccount = [MCSMGenericKeychainItem
genericKeychainItemForService:serviceAccount
account:account
attributes:attributes
error:NULL];
if(genericKeychainItemAccount)
{
[genericKeychainItemAccount removeFromKeychainWithError:NULL];
}
[MCSMGenericKeychainItem genericKeychainItemWithService:serviceAccount
account:account
attributes:attributes password:@"188823773"
error:NULL];
When i try debaging, i think so have error in there - https://github.com/ObjColumnist/MCSMKeychainItem/blob/master/MCSMKeychainItem.m#L332 returnStatus -50
:
[query setObject:[password dataUsingEncoding:NSUTF8StringEncoding] forKey:(__bridge id<NSCopying>)(kSecValueData)];
OSStatus returnStatus = SecItemAdd((__bridge CFDictionaryRef)query, NULL);
MCSMGenericKeychainItem *genericKeychainItem = nil;
if (returnStatus)
{
if(error == NULL)
{
NSError *newError __autoreleasing = nil;
error = &newError;
}
NSDictionary *userInfo = @{ MCSMKeychainItemQueryKey : query };
*error = [NSError errorWithDomain:NSOSStatusErrorDomain code:returnStatus userInfo:userInfo];
}
It is error dump:
error NSError ** error: summary string parsing error 0xb0114ad0
*error NSError * nil 0x00000000
[1] NSError * nil 0x00000000
[2] NSError * domain: <read memory from 0xffffffda failed (0 of 4 bytes read)> - code: <read memory from 0xffffffd6 failed (0 of 4 bytes read)> 0xffffffce
NSObject NSObject
_reserved void * NULL
_code NSInteger
_domain NSString * nil
_userInfo NSDictionary * nil
[3] __NSDictionaryM * 5 key/value pairs 0x08bb4dc0
[0] (null) @"class" : @"genp"
[1] (null) @"nameAttrib" : @"Myattr"
[2] (null) @"v_Data" : 9 bytes
[3] (null) @"svce" : @"My.account"
[4] (null) @"acct" : @"[email protected]"
[4] NSError * domain: 5 key/value pairs - code: -50 0xb0114ad0
NSObject NSObject
_reserved void * NULL 0x00000000
_code NSInteger -50 -50
_domain __NSDictionaryM * 5 key/value pairs 0x08bb4dc0
[0] (null) @"class" : @"genp"
[1] (null) @"nameAttrib" : @"Myattr"
[2] (null) @"v_Data" : 9 bytes
[3] (null) @"svce" : @"My.account"
[4] (null) @"acct" : @"[email protected]"
_userInfo NSDictionary * 0xb0114ad0 0xb0114ad0
query __NSDictionaryM * 5 key/value pairs 0x08bb4dc0
[0] (null) @"class" : @"genp"
[1] (null) @"nameAttrib" : @"Myattr"
[2] (null) @"v_Data" : 9 bytes
[3] (null) @"svce" : @"My.account"
[4] (null) @"acct" : @"[email protected]"
returnStatus OSStatus -50 -50
userInfo __NSDictionaryI * 1 key/value pair 0x08a32840
[0] (null) @"MCSMKeychainItemQueryKey" : 5 key/value pairs
key __NSCFConstantString * @"MCSMKeychainItemQueryKey" 0x0001b120
[0] id
value __NSDictionaryM * 5 key/value pairs 0x08bb4dc0
[0] (null) @"class" : @"genp"
[1] (null) @"nameAttrib" : @"Myattr"
[2] (null) @"v_Data" : 9 bytes
[3] (null) @"svce" : @"My.account"
[4] (null) @"acct" : @"[email protected]"
MCSMKeychainItemQueryKey NSString *const @"MCSMKeychainItemQueryKey" 0x0001b120
NSObject NSObject
isa Class __NSCFConstantString 0x019e1350
And i can not store to keychain
Is you help me?
The code contains several pre compiler directives like this:
#if TARGET_OS_MAC && !TARGET_IPHONE_SIMULATOR
However, on an iOS device, TARGET_OS_MAC
is 1 and TARGET_IPHONE_SIMULATOR
is 0. This allows it to pass the test and the Mac code is included, causing a compiler error. This can be fixed by adding the check !TARGET_OS_IPHONE
. See this Stack Overflow question for more details: http://stackoverflow.com/questions/4798205/can-preprocessor-directives-be-used-to-import-different-header-files-for-mac-and.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.