alinz / react-native-share-extension

react-native as an engine to drive share extension
MIT License
763 stars 398 forks source link

Can't make it work on 0.55.4 of react-native for iOS #115

Open ishigamii opened 5 years ago

ishigamii commented 5 years ago

Hi, I just found this library and though it looks very promising I am having some trouble with implementing it in my app. I didn't try to add the android part yet but I am having trouble with the iOS part to begin. I followed all the steps of the iOS section (https://github.com/alinz/react-native-share-extension#ios). The extension build but it doesn't run if I try to run it on simulator.

Now my first question is what part of the readme is mandatory and what part is optional ? Like if I go further in the documentation to : https://github.com/alinz/react-native-share-extension#ios Is this part mandatory to make the extension appears or it should work even without and it is just to handle it once you get it work ?

Second question is while trying on a simulator I can't get to make the extension appears even after following all the steps.

In the step : Add the new path $(SRCROOT)/../node_modules/react-native-share-extension/ios with recursive selected I can see in the screen that you also have $(SRCROOT)/../node_modules/react-native/React and other stuff like ${inhered} and some other Xcode stuffs that I don't is that something we should add too ? Any hint on an extension not showing up ? I added the image and video default from the ios documentation but none are giving anything in the share extensions

I am using :

  "dependencies": {
    "debounce": "^1.1.0",
    "lodash": "^4.17.10",
    "lottie-react-native": "^2.5.8",
    "moment": "^2.20.1",
    "moment-timezone": "^0.5.14",
    "react": "16.3.1",
    "react-moment": "^0.7.7",
    "react-native": "0.55.4",
    "react-native-elements": "^0.19.1",
    "react-native-i18n": "^2.0.12",
    "react-native-iphone-x-helper": "^1.2.0",
    "react-native-keyboard-aware-scroll-view": "^0.7.2",
    "react-native-orientation": "^3.1.3",
    "react-native-share-extension": "^1.2.1",
    "react-native-splash-screen": "^3.1.1",
    "react-native-vector-icons": "^4.6.0",
    "react-navigation": "^2.17.0",
...
<key>NSExtension</key>
    <dict>
        <key>NSExtensionAttributes</key>
        <dict>
            <key>NSExtensionActivationRule</key>
            <dict>
                <key>NSExtensionActivationSupportsImageWithMaxCount</key>
                <integer>3</integer>
                <key>NSExtensionActivationSupportsWebURLWithMaxCount</key>
                <integer>1</integer>
            </dict>
        </dict>
        <key>NSExtensionMainStoryboard</key>
        <string>MainInterface</string>
        <key>NSExtensionPointIdentifier</key>
        <string>com.apple.share-services</string>
    </dict>
    <key>NSAppTransportSecurity</key>
    <dict>
        <key>NSAllowsArbitraryLoads</key>
        <true/>
    </dict>

Thanks a lot for any help possible 👍

timmytimmytimmytime commented 5 years ago

@alinz Has this package been abandoned? I have the same issue of not being able to make this work, and there are no responses to this or other queries.