我有远程通知和OSx 10.8的问题.我启用了远程推送通知成功.它们也被发送到我的系统,但是当我尝试点击时,没有任何事情发生.此外,对于此应用更新,我必须启用沙盒!
Mac控制台日志:
29.08.12 11:03:50,600 usernoted[194]: Cannot find originating application to launch for event action. file://localhost/Users/clueckler/Library/Developer/Xcode/DerivedData/mysms_OSX_Client-bcaianxrdhpztmdcnsrgzqdtqmvi/Build/Products/Debug/mysms_test.app/ is not the same app as the one that sent the original notification.
29.08.12 11:03:50,600 usernoted[194]: Error finding application com.mysms.osx.client.test.
Run Code Online (Sandbox Code Playgroud)
我认为这是AdHoc-Test的一个问题.所以我试着成功地将它提交给AppStore!但是AppStore版本出现了同样的问题(现在我从商店中删除了它......)
有这个问题的解决方案吗?
编辑(代码信息):
- (void)awakeFromNib {
// Register app for remote notification
[[NSApplication sharedApplication] registerForRemoteNotificationTypes:(NSRemoteNotificationTypeBadge | NSRemoteNotificationTypeSound | NSRemoteNotificationTypeAlert)];
}
- (void)application:(NSApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
//Post token to server
}
Run Code Online (Sandbox Code Playgroud) 我有一些问题有线解析一些REST的反应时.问题是,我不能复制.有时它会发生,我在错误日志中没有相应的信息.
Error Domain=NSCocoaErrorDomain Code=3840 "The operation couldn’t be completed. (Cocoa error 3840.)" (Unexpected end of file during string parse (expected low-surrogate code point
but did not find one).) UserInfo=0x157bddb0 {NSDebugDescription=Unexpected end of file during string parse (expected low-surrogate code point but did not find one).}
Run Code Online (Sandbox Code Playgroud)
对不起,由于敏感的用户数据,我不允许从JSON-Response中提供任何信息(它只出现在一些内部帐户中,其中错误日志级别设置为低以检测此问题).
其他一些信息:
UPDATE 1:解析机构(NSData的的扩展)
- (NSDictionary *)objectFromJSONDataWithError:(NSError **)error {
NSDictionary *jsonObject = [NSJSONSerialization JSONObjectWithData: self
options: 0
error: error];
return jsonObject;
}
Run Code Online (Sandbox Code Playgroud)
更新2:用于下载数据的NSOperation - 主要()的内容 - …