2017-03-20 6 views
0

Google 크롬에 내 공유 확장 프로그램을 표시하는 데 문제가 있습니다. Safari에서 잘 나타나고 작동하지만 Chrome에는 표시되지 않습니다. 다음 정품 인증 규칙을 사용 중이며 다른 앱 (이미지, PDF, 공유 텍스트)에서도 작동하지만 크롬에서 누락되었습니다. 내의 Info.plist에서공유 확장 프로그램 Google 크롬 - 작동하지 않음

:

<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에서 자신의 앱 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 앱과 같은 기본 앱에 자동 완성 암호 용 crome 공유 확장을 추가하고 싶습니다. 어떻게이 작업을 시작할 수 있습니까? 도움이 필요합니다. – Anita