I want to get specific information from the JSON in the pkpass file. The problem that I have is how to implement share functionality from wallet to my app and in general to register my app to work with PKPass.
For example, in the share view (attached image), I want to have my app next to Mail and Message.
sharing options of the wallet
I added this code in .plist
<dict>
<key>NSExtensionAttributes</key>
<dict>
<key>NSExtensionActivationRule</key>
<string>SUBQUERY (
extensionItems,
$extensionItem,
SUBQUERY (
$extensionItem.attachments,
$attachment,
(
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.apple.pkpass"
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.apple.pkpass-data"
)
).@count == 1
).@count == 1</string>
</dict>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.share-services</string>
<key>NSExtensionPrincipalClass</key>
<string>$(PRODUCT_MODULE_NAME).SplashScreenViewController</string>
</dict>
When built my application, it appears a black screen and in debug area shows the following error:
[Assert] Plist keys indicate the current process is an extension but NSExtensionMain() has not been called. UIKit will treat this process as an extension.
I'm trying to get my application to appear in the sharing options of the wallet