2017-03-20 4 views
0

Google Chromeに表示される共有拡張機能に問題があります。これはSafariでよく表示され動作しますが、Chromeでは表示されません。私は以下のアクティベーションルールを使用していますが、他のアプリ(画像、PDF、共有テキスト)でも動作していますが、クロムからは抜けています。私のInfo.plistからシェアエクステンションGoogle Chrome - 動作していません

<dict> 
    <key>NSExtensionAttributes</key> 
    <dict> 
     <key>NSExtensionActivationRule</key> 
     <string> 
     SUBQUERY (
      extensionItems, 
      $extensionItem, 
      SUBQUERY (
       $extensionItem.attachments, 
       $attachment, 
       ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.url" || 
       ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.plain-text" || 
       ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.text" || 
       ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.jpeg" || 
       ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.png" || 
       ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.image" || 
       ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.adobe.pdf" 
      )[email protected] == 1 
     )[email protected] == 1 
     </string> 
     <key>NSExtensionJavaScriptPreprocessingFile</key> 
     <string>GetURL</string> 
    </dict> 
    <key>NSExtensionPointIdentifier</key> 
    <string>com.apple.share-services</string> 
    <key>NSExtensionMainStoryboard</key> 
    <string>MainInterface</string> 
</dict> 

任意のアイデア?

答えて

2

Chromeで自分のApp shareExtensionが表示されないというご質問がある場合は、通常ChromeでshareExtensionが表示されない理由は、NSExtensionActivationRuleがChromeと一致しないためです。この問題の答えはKey(NSExtensionActivationSupportsAttachmentsWithMaxCount)に関連しています。 :P

私はplistを表示しています。これはChromeとSafariでうまくいきます。

<key>NSExtensionActivationRule</key> 
    <dict> 
     <key>NSExtensionActivationSupportsAttachmentsWithMaxCount</key> 
     <integer>2</integer> 
     <key>NSExtensionActivationSupportsImageWithMaxCount</key> 
     <integer>0</integer> 
     <key>NSExtensionActivationSupportsMovieWithMaxCount</key> 
     <integer>0</integer> 
     <key>NSExtensionActivationSupportsText</key> 
     <true/> 
     <key>NSExtensionActivationSupportsWebPageWithMaxCount</key> 
     <integer>1</integer> 
     <key>NSExtensionActivationSupportsWebURLWithMaxCount</key> 
     <integer>1</integer> 
    </dict> 

あなたがする必要があるのは、キーの値が変更される - > 1の数にNSExtensionActivationSupportsAttachmentsWithMaxCountを、私は理由がクロームextensionContextにそのデータを渡すと思い.inputItems [1]ではなくextensionContextより.inputItems! [0]、あなたは自分でこのキーの別の値を設定しようとすることができます。

希望はこれを助けることができます:)

+0

私はたくさんお世話になった! – oronbz

+0

うわー!どうもありがとうございます。 – Deleplace

+0

こんにちは私はまた、1PasswordやDashlaneアプリのようなネイティブアプリでautofillパスワードのためのcromeの共有拡張を追加したいと思っています どうすればこの作業を開始できますか? ヘルプが必要です。 – Anita

関連する問題