在iOS中还有其他方式启动Messages应用程序吗? (捐款)

在iOS中还有其他方式启动Messages应用程序吗? (捐款),第1张

概述我们正在尝试提交一个制作慈善短信捐赠的iOS应用程序.过去我们已经做了不少问题,但苹果不再愿意接受我们的方法,并拒绝了我们的应用程序. 他们的说法是该应用不符合指南的第21.2节.哪个是: 21.2 The collection of donations must be done via a web site in Safari or an SMS 在过去,在这个当前的应用程序中,我们在Messa 我们正在尝试提交一个制作慈善短信捐赠的iOS应用程序.过去我们已经做了不少问题,但苹果不再愿意接受我们的方法,并拒绝了我们的应用程序.

他们的说法是该应用不符合指南的第21.2节.哪个是:

21.2 The collection of donations must be done via a web site in Safari or an SMS

在过去,在这个当前的应用程序中,我们在MessageUI框架中使用MFMessageComposeVIEwController构建SMS消息.我们用这个因为作为一个短码的捐赠,我们需要能够在消息中写一个关键字.

在解决中心(和拒绝争议)中有一点点反复,我可以从苹果那里得到最多的答案,我们应该做的是:

Sending SMS messages from within the app may not be in compliance with the App Store guIDelines.

The SMS link should launch Messages to make the donation.

我们可以使用短信:URL scheme启动某个号码的消息应用,但是该方法不允许我们添加我们所需的关键字.

所以问题是:有没有人知道另一种方式启动Messages应用程序?

我们的后备选项是放弃自己建立一条短信,并有一个警告,告诉用户“文字YYYY到ZZZZ”,这是一个很差的用户体验.

更新(2013年3月5日):

我们重新提交了应用程序再次使用我们的只有警报的后备选项…由于同样的原因,它再次被拒绝.我们再次与苹果竞争.

更新(2013年3月6日):

经过严厉的消息,苹果解释了明显的…应用程序已经通过提交.

我写了:

We have to disagree. The app does not include the ability to collect charitable donations within the app. It only informs the user on how they can donate.

所以;如果您有同样的问题,建议您先尝试在“修复”您的应用程序之前先抱怨.

解决方法 是和否

在基本水平上:通过文档查看,您(而非常令人沮丧)无法在外部呼叫消息应用程序时为消息设置正文.

你只能:

>打开消息应用程序

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"sms:"]];

>输入一个号码给消息

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"sms:+1234567890"]];

更复杂:是的.这是发送身体短信的方法和代码.它提供了一个视图,就像消息应用程序作为ModalVIEw一样.并作参考you can read the docs here.

>将MessageUI框架导入到项目中
>将这些添加到发送消息的 *** 作的视图(在我的例子中是单个按钮的简单视图)的视图.

#import <MessageUI/MessageUI.h>#import <MessageUI/MFMessageComposeVIEwController.h>

>发送消息的重要代码应该类似于:

-(IBAction)sendSMS:(ID)sender {    if([MFMessageComposeVIEwController canSendText]) {        MFMessageComposeVIEwController *controller = [[MFMessageComposeVIEwController alloc] init];        controller.body = @"Hello";        controller.recipIEnts = [NSArray arrayWithObjects:@"+1234567890",nil];        controller.messageComposeDelegate = self;        [self presentVIEwController:controller animated:YES completion:nil];    }}

上面的代码将不会发送文本或取消视图,因为我们还没有实现messageComposeVIEwController:dIDFinishWithResult:method – 这个文档可以读取here.这将如下所示:

- (voID)messageComposeVIEwController:(MFMessageComposeVIEwController *)controller                  dIDFinishWithResult:(MessageComposeResult)result {    switch(result) {        case MessageComposeResultCancelled:            // user canceled sms            [self dismissVIEwControllerAnimated:YES completion:nil];            break;        case MessageComposeResultSent:            // user sent sms            //perhaps put an alert here and dismiss the vIEw on one of the alerts buttons            break;        case MessageComposeResultFailed:            // sms send Failed            //perhaps put an alert here and dismiss the vIEw when the alert is canceled            break;        default:            break;    }}

在每种情况下,您都可以提出警报,关闭视图(如1)或任何应用程序需要的.

我相信这第二个方法应该被批准,或者苹果应该从文档中删除它.关键是canSendText if语句.如果没有实现这个(或者是forFinishWithResult的case切换),Apple肯定会拒绝该应用.

总结

以上是内存溢出为你收集整理的在iOS中还有其他方式启动Messages应用程序吗? (捐款)全部内容,希望文章能够帮你解决在iOS中还有其他方式启动Messages应用程序吗? (捐款)所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1096656.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-28
下一篇 2022-05-28

发表评论

登录后才能评论

评论列表(0条)

保存