MFMessageComposeViewController不发送消息(MFMessageComposeViewController doesn't send out the message)
我正试图通过MFMessageComposeViewController发送消息。 委托获取结果MessageComposeResultSent。 但事实上我没有收到短信。 我在Message中找不到历史。
developer.apple.com提供的示例代码中也会出现此问题.https://developer.apple.com/library/ios/documentation/MessageUI/Reference/MFMessageComposeViewController_class/Reference/Reference.html
设备:iPhone5S操作系统:iOS 7.1.2
I'm trying to send out the message by MFMessageComposeViewController. Delegate get the result MessageComposeResultSent. But I didn't receive the SMS in fact. And I can't find the history in Message.
This problem also occurs in Sample code provided by developer.apple.com https://developer.apple.com/library/ios/documentation/MessageUI/Reference/MFMessageComposeViewController_class/Reference/Reference.html
Device: iPhone5S OS: iOS 7.1.2
原文:https://stackoverflow.com/questions/24818223
最满意答案
您用于
PathParam
的导入是:import javax.websocket.server.PathParam;
这应该是以下一个:
import javax.ws.rs.PathParam;
The import you use for the
PathParam
is:import javax.websocket.server.PathParam;
This should be the following one:
import javax.ws.rs.PathParam;
相关问答
更多-
pathparams的自动编码按预期工作。 问题在于%20用于编码url本身的空格,而+用于编码查询字符串(?之后的部分)。 Pathparams实际上是URL的一部分,因此应该使用%20。 使用URI.toAsciiString()而不是UrlEncoder.encode(...)并传递不同的部分给出了正确解码的有效url。 The automatic encoding of pathparams works as expected. The problem was that %20is used to ...
-
查询参数是否添加到url之后? 标记,而路径参数是常规URL的一部分。 在下面的URL中, tom可以是path参数的值,并且有一个查询参数,名称为id ,值为1 : http://mydomain.com/tom?id=1 Query parameters are added to the url after the ? mark, while a path parameter is part of the regular URL. In the URL below tom could be the va ...
-
REST可能不是这样的标准,但阅读一般的REST文档和博客文章应该为您提供一些有助于构建API URL的方法。 大多数休息API通常只在路径中具有资源名称和资源ID。 如: /depatments/{dept}/employees/{id} 一些REST API使用查询字符串进行过滤,分页和排序,但由于REST不是严格的标准,我建议您检查一些REST API,例如github和stackoverflow,并查看可以适用于您的用例。 我建议在路径中放置任何必需的参数,任何可选参数一定是查询字符串参数。 在U ...
-
如果你正在寻找一个“干净”的解决方案 - 我认为没有一个。 但你可以这样做: @PATH("/items/{identifier}") public String getItem(@PathParam("identifier") String identifier){ try { return getByID( Long.parseLong(identifier) ); } catch (NumberFormatException ex) { return getBy ...
-
感谢@PiotrKochański给我的提示我已经成功实现了我想要的。 最大的问题是我一定会使用Glassfish。 默认情况下,Glassfish使用Jersey来处理JAX内容。 我花了10多个小时努力完成这项工作,所以对于任何偶然发现这一点的人来说,这可以节省时间。 首先, 使用Maven ,这会让您的生活变得更加轻松。 第二步,将JBoss repo添加到pom.xml中
jboss-public-reposit ... -
引用@PathParam文档: 注释参数,字段或属性的类型必须是: 是PathSegment ,该值将是路径匹配部分的最后一部分。 请参阅UriInfo获取所有请求路径段的方法。 是List
,该值将是与匹配命名模板参数的路径段对应的PathSegment列表。 请参阅UriInfo获取所有请求路径段的方法。 是一种原始类型。 有一个接受单个String参数的构造函数。 有一个名为valueOf或fromString的静态方法,它接受单个Strin ... -
将来自REST调用的@PathParam值存储在列表或数组中(Store @PathParam values from REST call in a list or array)[2023-06-01]
可能是重新考虑这一设计的好机会。 通过使用/ s,我们以某种方式表示每个/我们试图找到不同的资源。 键/值对(在URL的上下文中)主要用于查询参数或矩阵参数。 如果/property/{uuid}是主资源的路径,我们只是想提供一些参数给客户端来访问这个资源,那么我们可以允许矩阵参数或查询参数 矩阵参数 (在请求url中)看起来像 /12345;key1=value1;key2=value2;key3=value3 获取值的资源方法可能与此类似 @GET @Path("/property/{uuid}") ... -
我从错误的包中导入了Pathparam import javax.websocket.server.PathParam; 它应该是 import javax.ws.rs.PathParam; I had imported the Pathparam from wrong package import javax.websocket.server.PathParam; it should have been import javax.ws.rs.PathParam;
-
您用于PathParam的导入是: import javax.websocket.server.PathParam; 这应该是以下一个: import javax.ws.rs.PathParam; The import you use for the PathParam is: import javax.websocket.server.PathParam; This should be the following one: import javax.ws.rs.PathParam;
-
我认为@BeanParam正是你要找的。 可用于将自定义JAX-RS“参数聚合器”值对象注入资源类字段,属性或资源方法参数的注释。 I think that @BeanParam is what you are looking for. The annotation that may be used to inject custom JAX-RS "parameter aggregator" value object into a resource class field, property or reso ...