小编Lil*_*rom的帖子

应用程序包不包含有效标识符

我尝试运行我的项目,但我收到以下错误"应用程序包不包含有效的标识符."

在这里我的info.plist

在此输入图像描述

我对这个问题采取了其他答案.我的项目中没有任何"Ressources"文件夹.

谢谢你的帮助

xcode bundle swift

39
推荐指数
2
解决办法
1万
查看次数

从远程通知打开ViewController

当我的应用程序捕获远程通知时,我尝试打开一个特定的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

8
推荐指数
1
解决办法
1万
查看次数

使用 Angular CLI 的 Google Chrome 扩展卡在“加载”状态

我尝试使用 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

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

角度2和aws,未找到路线

为了尝试在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/

感谢您的回答。

amazon-s3 amazon-web-services angular

2
推荐指数
1
解决办法
1978
查看次数