在添加OneSignal之后,Flutter不会启动该应用程序。 FrontBoard未知OneSignalNotificationServiceExtension

时间:2019-02-21 07:52:24

标签: flutter onesignal

在将onesignal添加到我的应用程序后,颤振无法启动我的应用程序。我已遵循此guide。处理完所有问题后,我得到了这个。

当我做flutter run时,看到以下错误:

ProcessException: Process "/usr/bin/xcrun" exited abnormally:
<your-app>.OneSignalNotificationServiceExtension: -1

An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain, code=1):
The request to open "<your-app>.OneSignalNotificationServiceExtension" failed.
The request was denied by service delegate (SBMainWorkspace) for reason: NotFound ("Application
"<your-app>.OneSignalNotificationServiceExtension" is unknown to FrontBoard").
Underlying error (domain=FBSOpenApplicationErrorDomain, code=4):
        The operation couldn’t be completed. Application "<your-app>.OneSignalNotificationServiceExtension" is unknown to
        FrontBoard.
        Application "<your-app>.OneSignalNotificationServiceExtension" is unknown to FrontBoard.
  Command: /usr/bin/xcrun simctl launch 26CD3C41-B2F7-4B59-9360-97C9688ABE38
  <your-app>.OneSignalNotificationServiceExtension --enable-dart-profiling --enable-checked-mode --observatory-port=0
Error launching application on iPhone 8.

我尝试过的事情:

  • 重新启动我的模拟器;
  • 删除模拟器上的所有数据;
  • 清理构建文件夹

OneSignal版本:1.0.5

flutter --version
Flutter 1.1.8 • channel beta • https://github.com/flutter/flutter.git
Framework • revision 985ccb6d14 (6 weeks ago) • 2019-01-08 13:45:55 -0800
Engine • revision 7112b72cc2
Tools • Dart 2.1.1 (build 2.1.1-dev.0.1 ec86471ccc)

2 个答案:

答案 0 :(得分:1)

转到iOS/Runner/Info.plist并在“ CFBundleIdentifier”部分中设置您的bundleId

  1. 您的捆绑包ID在这里。复制它。 enter image description here

  2. 将bundleId粘贴到info.plist中的'CFBundleIdentifier' enter image description here

iOS/OneSignalNotificationServiceExtension/Info.plist

中执行相同的操作

希望对您有所帮助。至少对我有用。

注意: OneSignalNotificationServiceExtension的 BundleId具有稍微不同的id。将其添加到OneSignalNotificationServiceExtension的.plist中之前,请先在xcode中进行检查。

答案 1 :(得分:0)

面对同样的问题。

<ul class="container">
  <li>
    <div class="item">
      <div class="item-image">
        <a href="">
          <img src="root-icon.png" alt="">
        </a>
      </div>
      <div class="item-info">
        <div class="item-title">Something</div>
        <div class="item-subtitle">Something</div>
        <div class="item-button-container">
          <a class="button" href="#">GET</a>
        </div>
      </div>
    </div>
  </li>
  <li>
    <div class="item">
      <div class="item-image">
        <a href="">
          <img src="root-icon.png" alt="">
        </a>
      </div>
      <div class="item-info">
        <div class="item-title">Something</div>
        <div class="item-subtitle">Something</div>
        <div class="item-button-container">
          <a class="button" href="#">GET</a>
        </div>
      </div>
    </div>
  </li>
</ul>