I am trying to implement a share extension to my Xamarin.Forms
app. And I followed these:
https://docs.microsoft.com/tr-tr/xamarin/ios/platform/extensions
https://docs.microsoft.com/en-us/samples/xamarin/ios-samples/ios8-share/
https://github.com/xamarin/ios-samples/tree/master/ios8/Share
And git repo above works when I run it. But I need to implement this for my xamarin forms project. So I did this steps:
I right clicked to my xamarin forms solution. After I select add, new project. And I created "Share Extension (iOS)" project. (I choosed .Net Framework 4.7.2)
A Share extension project is created with ShareViewController. I didn't do any change this.
I opened info.plist of new created ShareExtension project. And I paid attention bundle identifier. For example my xamarin project's bundle identifier is "com.xamarin.test" and my share extension project's bundle identifier is "com.xamarin.test.share-extension"
I selected MinimumOSVersion 10.0 of my main project and my share extension.
In my project,NSExtension is following:
NSExtension NSExtensionAttributes NSExtensionActivationRule NSExtensionActivationSupportsFileWithMaxCount 1 NSExtensionActivationSupportsImageWithMaxCount 1 NSExtensionActivationSupportsMovieWithMaxCount 1 NSExtensionActivationSupportsText NSExtensionActivationSupportsWebURLWithMaxCount 1 NSExtensionMainStoryboard MainInterface NSExtensionPointIdentifier com.apple.share-services
After I cleaned whole solution and rebuilt it, I added to reference shared extension project's DLL to my Xamarin iOS project. After that I run the project (on iPhone 7 iOS 12.0 simulator).
When I open photos and I click share for a photo, I expect to see my app on share menu. But it doesn't work. I guess I missed a step but what is this, I don't know.