if (ABMultiValueGetCount(phoneNumbers) > 0) { phone = (__brIDge_transfer Nsstring*) ABMultiValuecopyValueAtIndex(phoneNumbers,0); [self sendSMS:@"Play me on PokerBuddies. Download the app at: https://itunes.apple.com/us/app /poker-buddies/ID404168013?mt=8" recipIEntList:[Nsstring stringWithFormat:phone,nil]];} else { phone = @"[None]";}- (voID)sendSMS:(Nsstring *)bodyOfMessage recipIEntList:(Nsstring *)recipIEnts{MFMessageComposeVIEwController *controller = [[MFMessageComposeVIEwController alloc] init];if([MFMessageComposeVIEwController canSendText]){ controller.body = bodyOfMessage; controller.recipIEnts = recipIEnts; controller.messageComposeDelegate = self; [self presentVIEwController:controller animated:YES completion:nil]; NSLog(@"Send SMS");}}解决方法 我有类似MessageComposeController超时问题的问题.
我这样解决了它.
你必须创建MFMessageComposeVIEwController的实例变量,当你要呈现消息控制器时,你必须检查实例对象是否已经创建然后再做nil并再次初始化该对象.所以这个错误“CKSMSComposeRemoteVIEwController超时等待来自com的栅栏屏障.apple.mobilesms.compose“将不会来,控制器准确打开.
if ([MFMessageComposeVIEwController canSendText]) { if (messageComposer) { messageComposer = nil; messageComposer = [[MFMessageComposeVIEwController alloc]init]; } messageComposer.recipIEnts = arrPhoneNumber; messageComposer.messageComposeDelegate = self; messageComposer.body = @"Your text"; isMessageComposeAppear = 1; [self presentVIEwController:messageComposer animated:YES completion:nil];}总结
以上是内存溢出为你收集整理的xcode – CKSMSComposeRemoteViewController超时等待来自com.apple.mobilesms.compose的围栏障碍全部内容,希望文章能够帮你解决xcode – CKSMSComposeRemoteViewController超时等待来自com.apple.mobilesms.compose的围栏障碍所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)