当我的应用程序捕获远程通知时,我尝试打开一个特定的ViewController.
当我收到通知时,我想打开一个"SimplePostViewController",所以这是我的appDelegate:
var window: UIWindow?
var navigationVC: UINavigationController?
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
let notificationTypes: UIUserNotificationType = [UIUserNotificationType.Alert, UIUserNotificationType.Badge, UIUserNotificationType.Sound]
let pushNotificationSettings = UIUserNotificationSettings(forTypes: notificationTypes, categories: nil)
let storyboard = UIStoryboard(name: "Main", bundle: nil)
self.navigationVC = storyboard.instantiateViewControllerWithIdentifier("LastestPostsNavigationController") as? UINavigationController
application.registerUserNotificationSettings(pushNotificationSettings)
application.registerForRemoteNotifications()
return true
}
func application(application: UIApplication, didReceiveRemoteNotification userInfo: [NSObject : AnyObject]) {
if let postId = userInfo["postId"] as? String {
print(postId)
let api = EVWordPressAPI(wordpressOauth2Settings: Wordpress.wordpressOauth2Settings, site: Wordpress.siteName)
api.postById(postId) { post in
if …Run Code Online (Sandbox Code Playgroud) push-notification apple-push-notifications appdelegate swift
我尝试使用 angular CLI 开发一个简单的 Google Chrome 扩展程序,但它卡在Loading.
如果我尝试正常使用我的应用程序npm start并在浏览器的窗口中打开它,它工作正常。
我也尝试使用编译我的应用程序ng build,将我的manifest.json放在我的dist文件夹中,但结果是一样的。
我的 manifest.json :
{
"manifest_version": 2,
"name": "Weather for Chrome",
"description": "Weather for Chrome is a simple Google chrome plugin using angular CLI",
"version": "1.0",
"browser_action": {
"default_icon": "assets/Soleil.png",
"default_popup": "index.html"
},
"permissions": [
"activeTab",
"https://ajax.googleapis.com/"
]
}
Run Code Online (Sandbox Code Playgroud)
app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { …Run Code Online (Sandbox Code Playgroud) plugins google-chrome-extension typescript angular-cli angular
为了尝试在amozon虚拟主机上部署我的angular 2应用程序。索引页效果很好,但是当我尝试访问其他页面时却/users出现404 not found错误。
我尝试按照此帖子在页面刷新上使用Angular JS ui.router html5Mode(true)配置Amazon S3静态站点,但未成功。
这是我的应用程序http://ugram-team-7.s3-website-us-east-1.amazonaws.com/
感谢您的回答。
angular ×2
swift ×2
amazon-s3 ×1
angular-cli ×1
appdelegate ×1
bundle ×1
plugins ×1
typescript ×1
xcode ×1