小编Job*_* Sá的帖子

尝试安装RVM时无法解析主机

我正按照RVM页面上的说明尝试在我的环境中安装RVM

curl -L https://get.rvm.io | bash -s stable --ruby
Run Code Online (Sandbox Code Playgroud)

但我总是得到这个:

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   185  100   185    0     0    198      0 --:--:-- --:--:-- --:--:--   246
100  9979  100  9979    0     0   3821      0  0:00:02  0:00:02 --:--:-- 14740
Please read and follow further instructions.
Press ENTER to continue.
Downloading RVM from wayneeseguin branch stable
curl: (6) Could not resolve host: github.com; nodename nor servname provided, or …
Run Code Online (Sandbox Code Playgroud)

ruby macos rvm

5
推荐指数
1
解决办法
6674
查看次数

当应用程序被杀死时推送通知不显示

我有一个可以接收远程通知并执行后台任务的应用程序。我已经建立了Background Modes用于Background fetchRemote notifications我可以接收通知和执行后台正常获取时,应用程序是前景或背景。

问题是当应用程序被杀死时 - 通知不显示,甚至不在通知中心,或者作为横幅,警报等。我知道,如果应用程序被杀死,它将无法执行后台拿来。但我认为它至少应该显示通知。

AppDelegate我已经实现了这两种方法:

- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
Run Code Online (Sandbox Code Playgroud)

- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler
Run Code Online (Sandbox Code Playgroud)

我正在使用此注册通知:

UIUserNotificationType userNotificationTypes = (UIUserNotificationTypeAlert | UIUserNotificationTypeBadge | UIUserNotificationTypeSound);
        UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:userNotificationTypes categories:nil];
        [[UIApplication sharedApplication] registerUserNotificationSettings:settings];
        [[UIApplication sharedApplication] registerForRemoteNotifications];
Run Code Online (Sandbox Code Playgroud)

任何人都可以告诉我我身边可能有什么问题/遗漏吗?

push-notification apple-push-notifications ios

5
推荐指数
0
解决办法
435
查看次数