Giter Club home page Giter Club logo

ljcontactmanager's Issues

手机号码格式问题

我选择联系人时候有的有空格(188 888 888 88)这种,有的就没有空格(18888888888),请问这个是什么原因啊,我选择时候看了在手机通讯录显示的都是有空格的。

你好

通讯录中一个用户有多个号码 怎么全部获取到

iOS13获取通讯录的问题

IOS13系统下面获取通讯录没办法获取到数据,查了相关资料,发现是IOS13系统下面在获取通讯录新中不允许获取”备注 CNContactNoteKey“这个属性了,需要将这个属性去掉后才行

小小的建议

你的这个通讯录的库封装的很好了,阅读你的代码很赞!
有一点建议是 添加到已存在的联系人和 创建新的联系人两个接口 操作完成后,需要知道操作的结果成功还是失败,如果添加结果的回调,会更好一点,仅仅个人建议,不喜请忽略(Close).

#import "NSString+LJExtension.h" ->

  • (NSString )lj_filterSpecialString:(NSString )string
    {
    // 这个语句对显示为 +86 138
    *********** 格式的不起作用的
    // 因为 +86 后面跟的空白根本不是空格
    string = [string stringByReplacingOccurrencesOfString:@" " withString:@""];
    ...........................
    return string;
    }

改进建议,使用数字搜索:

  • (NSString *)lj_filterSpecialString:(NSString *)string
    {
    NSString *cnPhoneOrig = [string copy];
    if (0 == cnPhoneOrig.length)
    {
    return @"";
    }

    NSScanner *aScaner = [NSScanner scannerWithString:cnPhoneOrig];

    NSCharacterSet *aSetNumbers = [NSCharacterSet characterSetWithCharactersInString:@"0123456789"];

    NSString *cnPhone = @"";

    NSString *aNumber = nil;
    NSString *aOther = nil;

    while (![aScaner isAtEnd])
    {
    [aScaner scanUpToCharactersFromSet:aSetNumbers intoString:&aOther];

      [aScaner scanCharactersFromSet:aSetNumbers intoString:&aNumber];
      
      cnPhone = [cnPhone stringByAppendingString:aNumber];
    

    }

    if ([cnPhone hasPrefix:@"86"])
    {
    cnPhone = [cnPhone substringFromIndex:2];
    }

    if ([cnPhone hasPrefix:@"086"])
    {
    cnPhone = [cnPhone substringFromIndex:3];
    }

    return cnPhone;
    }

SIGTRAP -[LJPhone initWithMultiValue:index:] (LJPerson.m:)

0 CoreFoundation
CFRelease + 1084
1 testApp
-[LJPhone initWithMultiValue:index:] (LJPerson.m:346)
2 testApp
-[LJPhone initWithMultiValue:index:] (LJPerson.m:346)
3 testApp
-[LJPerson initWithRecord:] (LJPerson.m:219)
4 superman
__63-[LJContactManager _asynAccessAddressBookWithSort:completcion:]_block_invoke (LJContactManager.m:407)
5 libdispatch.dylib
__dispatch_call_block_and_release + 24
6 libdispatch.dylib
__dispatch_client_callout + 16
7 libdispatch.dylib
__dispatch_root_queue_drain + 1152
8 libdispatch.dylib
__dispatch_worker_thread3 + 108
9 libsystem_pthread.dylib
_pthread_wqthread + 816

优化建议

目前该Demo中的分组排序数据和系统的分组排序是不同的,同一section下的联系人并未做姓名的拼音排序,望能优化下。

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.