How to develop a SMS client for iOS?

▼魔方 西西 提交于 2019-12-04 19:34:51

For the + Button you can use the address book UI:

// This Code is taken from Apple's sample code QuickContacts
#import <AddressBookUI/AddressBookUI.h>

-(void)showPeoplePickerController {
    ABPeoplePickerNavigationController *picker = [[ABPeoplePickerNavigationController alloc] init];
    picker.peoplePickerDelegate = self;
    // Display only a person's phone, email, and birthdate
    NSArray *displayedItems = [NSArray arrayWithObject:[NSNumber numberWithInt:kABPersonPhoneProperty]];


    picker.displayedProperties = displayedItems;
    // Show the picker 
    [self presentModalViewController:picker animated:YES];
    [picker release];   
}

The <ABPeoplePickerNavigationControllerDelegate> delegate include this methods:

– peoplePickerNavigationController:shouldContinueAfterSelectingPerson:
– peoplePickerNavigationController:shouldContinueAfterSelectingPerson:property:identifier:
– peoplePickerNavigationControllerDidCancel:

After selecting a person you can save his/her number in an array and in the text field (e.g. comma separated)

.

For the question if it will be approved here is the guideline:
https://developer.apple.com/appstore/resources/approval/guidelines.html

22.6 Apps that enable anonymous or prank phone calls or SMS/MMS messaging will be rejected

You can't use TTMessageController to send sms. The only possible way to send sms is to use MFMessageComposeViewController. Here's a tutorial on how to use it: http://blog.mugunthkumar.com/coding/iphone-tutorial-how-to-send-in-app-sms/

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!