Giter Club home page Giter Club logo

Comments (13)

kishikawakatsumi avatar kishikawakatsumi commented on June 11, 2024

It seems really weird. Other values, like"user_name", "downDataFlag", are stored correctly? Are there any error messages in Xcode console?

from uickeychainstore.

codesourse avatar codesourse commented on June 11, 2024
        UICKeyChainStore *keychain = [[UICKeyChainStore alloc]initWithService:@"xh.english.brush" accessGroup:@"hello"];
        keychain[@"pass_word"]    = @"21e12e";
        NSLog(@"keychainpass_word=%@",keychain[@"pass_word"]);

----------------------方法: __31-[LoginViewController loginAct]_block_invoke279
----------------------行数: 153---------------------
----------------------内容:keychainpass_word=(null)

from uickeychainstore.

kishikawakatsumi avatar kishikawakatsumi commented on June 11, 2024

Could you please share reproducible project?

from uickeychainstore.

codesourse avatar codesourse commented on June 11, 2024

you wait a minute,I create a new project.

from uickeychainstore.

codesourse avatar codesourse commented on June 11, 2024

2015-08-08 15:56:32.345 testKeyChain[2374:281142] OSStatus error: [-25243] Security error has occurred.
2015-08-08 15:56:32.348 testKeyChain[2374:281142] keychainpass_word=(null)

from uickeychainstore.

codesourse avatar codesourse commented on June 11, 2024

project: https://github.com/codesourse/testKeyChain.git

from uickeychainstore.

codesourse avatar codesourse commented on June 11, 2024

handsome boy help me.

from uickeychainstore.

kishikawakatsumi avatar kishikawakatsumi commented on June 11, 2024

@codesourse There is no code using UICKeyChainStore in the project. Did you forgot to commit your code?

from uickeychainstore.

codesourse avatar codesourse commented on June 11, 2024

sorry,i commit it again.

from uickeychainstore.

kishikawakatsumi avatar kishikawakatsumi commented on June 11, 2024

Because you specify access group, you should make entitlements for allowing to access the access group.

To make entitlements,

  1. Select project settings, then click capability tab
  2. Turn ON Keychain Sharing
  3. Input access group name that you use in your app (your example is 'hello')

screen shot 2015-08-10 at 23 13 03

Then, the entitlements file will be like following:

screen shot 2015-08-10 at 23 17 15

You should specify access group with "App ID prefix". So the code is to be like following:
(27AEDK3C9F is my App ID prefix. You have different one.)

UICKeyChainStore *keychain = [[UICKeyChainStore alloc]initWithService:@"xh.english.brush"
                                                              accessGroup:@"27AEDK3C9F.hello"];

from uickeychainstore.

codesourse avatar codesourse commented on June 11, 2024

Why it is ok,when running on the simulators?

from uickeychainstore.

kishikawakatsumi avatar kishikawakatsumi commented on June 11, 2024

Any simulators do not have access group. When running on simulators, the access group automatically set to test despite of you specifying any other text. So most keychain library ignore access group settings when running on simulators. Of course this library also does so.

from uickeychainstore.

codesourse avatar codesourse commented on June 11, 2024

Thank you very much!

from uickeychainstore.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.