Comments (39)
I had that same problem. Make sure you update the extension target's Build Phases to run the react-native script in XCode. I just copied the Build Phases from the main target.
export NODE_BINARY=node
../node_modules/react-native/packager/react-native-xcode.sh
from react-native-share-extension.
@soorajvnair, @alinz, the read me is incorrect about setting up the MyShareEx.m file. It needs to be like this:
#import <Foundation/Foundation.h>
#import "ReactNativeShareExtension.h"
#import "RCTBundleURLProvider.h"
#import "RCTRootView.h"
@interface MyShareEx : ReactNativeShareExtension
@end
@implementation MyShareEx
RCT_EXPORT_MODULE();
- (UIView*) shareView {
NSURL *jsCodeLocation;
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
moduleName:@"MyShareEx"
initialProperties:nil
launchOptions:nil];
rootView.backgroundColor = nil;
return rootView;
}
@end
This will work in debug and production....at least for me
from react-native-share-extension.
@alinz Yeah, a bit time crunched for a few days, at least, but will do.
from react-native-share-extension.
I have just had a similar problem. It turns out the story board in my share extension is not connected with the .m file. Make you click this one
on the left of story board and change the Class name on the right.
from react-native-share-extension.
Have you guys managed to solve it, I have just added into my new project and for the sake of it I use the Doc. everything went well and I managed to run the share extension. closing this but please reopen or add more comment to this issue
from react-native-share-extension.
You may try to add JavaScriptCore.framework to the linked libraries
from react-native-share-extension.
I can recreate the sample project from scratch, and it works as described. It's when I try and do the same in my 'real' project that it fails. I've followed exactly the same steps, several times - but no share dialog appears, there are no error messages and I can't get any break points (in objective-c or javascript) to work.
Has anyone else had this issue? Where an existing app prevents the share.ios modal from appearing?
from react-native-share-extension.
In xcode go to the MyShareEx.m file and change to this:
//this is the name of registered component that ShareExtension loads.
NSString *myShareComponentName = @"MyShareEx";
from react-native-share-extension.
@npomfret @dillonsvincent @chenUT I am able to run the extension just fine inside my emulator, but unfortunately it doesn't work on a real device, does anyone else have a similar issue?
from react-native-share-extension.
After posting my fix, I realized that It only ran in the simulator and not on the device. @soorajvnair's fix worked for me. To explain a little more.
you will need to click on your project file. select your extension target. go to the build phases tab. click the plus button and add new run script phase, this is where you paste the code above.
from react-native-share-extension.
Hey guys, @dillonsvincent @alinz unfortunately @southernvg 's fix did not work for me, i'm still not able to get it to work on an actual device, i'm using testflight to do some internal testing and none of my testers have so far managed to get the extension to work, they're able to see the extension in the share menu, but upon clicking nothing happens. Everything works ever so smoothly in the simulator.
Anything specific that i should be doing before i upload to testflight? Any help is much appreciated. @alinz were you able to successfully use this in a production app?
from react-native-share-extension.
@soorajvnair I have using this share extension in production for both ios and android. also I have updated the doc here
There are 2 possible reasons that might causes this issue. if any errors happen in your script in share extension code, you won't see any red-box. I couldn't get it to work on ios. but in android you will get a red-box. also in iOS, you have to package and compile the script for your share extension again. This is not the react-native or this module issue, this is how ios treats share extension. in a nut-shell, share extension won't be able to get access to any files in bundle of main app. so as I said you have to compile the code and bundle all the things inside share extension. all of this steps are documented in the README.md file.
Let me know if you still have this issue, if not close it.
Cheers,
from react-native-share-extension.
hey @alinz thanks for getting back to me, but unfortunately i'm still having trouble in getting it to work on a real device, I've played by the book, already added that run script in build phase, still no luck. Any other possible reasons that you can think of?
from react-native-share-extension.
@soorajvnair do you have a problem with example code or your code? if it's your code, you have to double check maybe you have an runtime error. remember, in share extension you won't be able to see the error. one thing you can do is hook it up with react-native-logger which I wrote to debug in device without any dev-server.
from react-native-share-extension.
@alinz Hey, thanks for that quick reply, i was actually trying with my own code at first, but now i've also tried with the sample code, same result, works fine inside simulator but not on the device, I'll try hooking it with react-native-logger and try again, in the meantime please do feel free to share any other suggestions that you might have.
from react-native-share-extension.
@soorajvnair can you provide some info about all the tools that you are using. because I just tested on my device and it works fine.
please provide me with the following info:
- npm version
- node version
- react-native version
- ios version, also iPad or iPhone
thanks
from react-native-share-extension.
Hey @alinz Thank you once again for getting back to me, here is the info that you asked for.
- Node 6.3.0
- Npm 3.10.3
- react-native 0.30.0
- react-native-cli 1.0.0
- iOS 9.3.3 ( iPhone 6s)
hope that helps, really appreciate you taking time out to look into this.
from react-native-share-extension.
Still doesn't work for me, after re-running everything. I can re-create the sample project and it works fine on the simulator. But when I try to incorporate into my own the application I'm trying to share from just seems to lock up.
I've installed react-native-logger - any suggestions as to where I should log?
I've added a log line in the constructor of share.ios.js
, but even that isn't coming out. So I guess my share extension isn't being loaded? I've checked and checked and can't see the issue. Non of the suggestions above have worked. Its weird because I found re-creating the sample project very simple.
from react-native-share-extension.
Hey @alinz just checking in to see if you were able to look into this, or reproduce the issue on your end, were the details of tools and their version useful?
from react-native-share-extension.
@npomfret @soorajvnair I have upgraded everything including my node and npm and I was able to run the code on my simulator and my device. I have also push the new code to master branch. Android is not ready but iOS is upgraded to latest one.
There are two things that might cause this issue,
- first you guys forget to add
Run Script
inBuild Phases
which I have documented here - second, if you want to run it on device without dev-server you have to change the mode from Debug to Release. In order to do that , in xCode, hold
option
key and selectProduct > Run...
. In the new open window, change theBuild Configuration
fromDebug
toRelease
.
if nothing works then you guys must miss one of the steps. I have been using this module in production.
cheers,
from react-native-share-extension.
Thanks for the info. I've done everything I can think of including the run script. Will try again soon. Thanks for the update.
from react-native-share-extension.
@npomfret would you simplify/trim the project code that you have and send it to me. I have to see the code in order to help you.
from react-native-share-extension.
@alinz Any plans to incorporate photo sharing in this package?
from react-native-share-extension.
I also can not get this to work in production via TestFlight. Simulator works great.
from react-native-share-extension.
@parkerdan Yes that's precisely where i'm having trouble too. Still not resolved on my end.
from react-native-share-extension.
@parkerdan you want to send me a PR for that?
from react-native-share-extension.
@alinz @parkerdan Yay!!!. Worked for me!. Thanks a lot!.
from react-native-share-extension.
@alinz @parkerdan i have followed every line of the docs but the app which i'm trying to share content from still freeze for me
simulator ipad air2
react-native 0.36
debug and release
anyone still has this problem?
from react-native-share-extension.
I never got mine working, will try again soon and let you know. I managed to reproduce the demo app by following the instructions step by step. There's something in my app preventing it from working I think.
from react-native-share-extension.
@npomfret that happened to me when i was wrong about where to put "Header Search" Paths and "Other Linker Flags".. mine were in my main app target while you have to add them on the extension target!
anyway now i have other 12 errors and my build fails:
Showing Recent Issues
Check dependencies
CompileC /Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Intermediates/iFeelReactNative.build/Debug-iphoneos/iFeelReactNative.build/Objects-normal/arm64/AppDelegate.o iFeelReactNative/AppDelegate.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/sunrising/Documents/Leaff/iFeelReactNative/ios
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch arm64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -fmodules -gmodules -fmodules-cache-path=/Users/sunrising/Library/Developer/Xcode/DerivedData/ModuleCache -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/sunrising/Library/Developer/Xcode/DerivedData/ModuleCache/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wunreachable-code -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DDEBUG=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -miphoneos-version-min=8.0 -g -Wno-sign-conversion -Winfinite-recursion -fembed-bitcode-marker -iquote /Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Intermediates/iFeelReactNative.build/Debug-iphoneos/iFeelReactNative.build/iFeelReactNative-generated-files.hmap -I/Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Intermediates/iFeelReactNative.build/Debug-iphoneos/iFeelReactNative.build/iFeelReactNative-own-target-headers.hmap -I/Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Intermediates/iFeelReactNative.build/Debug-iphoneos/iFeelReactNative.build/iFeelReactNative-all-target-headers.hmap -iquote /Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Intermediates/iFeelReactNative.build/Debug-iphoneos/iFeelReactNative.build/iFeelReactNative-project-headers.hmap -I/Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Products/Debug-iphoneos/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I../node_modules/react-native/React -I../node_modules/react-native/React/Base -I../node_modules/react-native/React/CSSLayout -I../node_modules/react-native/React/Executors -I../node_modules/react-native/React/Modules -I../node_modules/react-native/React/Profiler -I../node_modules/react-native/React/Views -I/Users/sunrising/Documents/Leaff/iFeelReactNative/ios/../node_modules/react-native-vector-icons/RNVectorIconsManager -I/Users/sunrising/Documents/Leaff/iFeelReactNative/ios/../node_modules/react-native-blur/ios -I/Users/sunrising/Documents/Leaff/iFeelReactNative/ios/../node_modules/react-native-file-opener/ios/RNFileOpener -I../node_modules/react-native-spinkit/ios -I../node_modules/react-native-spinkit/ios/Libraries -I../node_modules/react-native-spinkit/ios/Libraries/SpinKit -I../node_modules/react-native-spinkit/ios/Libraries/SpinKit/Animations -I../node_modules/react-native-fs -I../node_modules/react-native-fs/android -I../node_modules/react-native-fs/IntegrationTests -I../node_modules/react-native-fs/android/src -I../node_modules/react-native-fs/IntegrationTests/IntegrationTestsTests -I../node_modules/react-native-fs/android/src/main -I../node_modules/react-native-fs/IntegrationTests/IntegrationTestsTests/ReferenceImages -I../node_modules/react-native-fs/android/src/main/java -I../node_modules/react-native-fs/IntegrationTests/IntegrationTestsTests/ReferenceImages/IntegrationTests-IntegrationTestsApp -I../node_modules/react-native-fs/android/src/main/java/com -I../node_modules/react-native-fs/android/src/main/java/com/rnfs -I/Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Intermediates/iFeelReactNative.build/Debug-iphoneos/iFeelReactNative.build/DerivedSources/arm64 -I/Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Intermediates/iFeelReactNative.build/Debug-iphoneos/iFeelReactNative.build/DerivedSources -F/Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Products/Debug-iphoneos -MMD -MT dependencies -MF /Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Intermediates/iFeelReactNative.build/Debug-iphoneos/iFeelReactNative.build/Objects-normal/arm64/AppDelegate.d --serialize-diagnostics /Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Intermediates/iFeelReactNative.build/Debug-iphoneos/iFeelReactNative.build/Objects-normal/arm64/AppDelegate.dia -c /Users/sunrising/Documents/Leaff/iFeelReactNative/ios/iFeelReactNative/AppDelegate.m -o /Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Intermediates/iFeelReactNative.build/Debug-iphoneos/iFeelReactNative.build/Objects-normal/arm64/AppDelegate.o
CompileC /Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Intermediates/iFeelReactNative.build/Debug-iphoneos/iFeelReactNative.build/Objects-normal/arm64/main.o iFeelReactNative/main.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/sunrising/Documents/Leaff/iFeelReactNative/ios
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch arm64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -fmodules -gmodules -fmodules-cache-path=/Users/sunrising/Library/Developer/Xcode/DerivedData/ModuleCache -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/sunrising/Library/Developer/Xcode/DerivedData/ModuleCache/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wunreachable-code -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DDEBUG=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -miphoneos-version-min=8.0 -g -Wno-sign-conversion -Winfinite-recursion -fembed-bitcode-marker -iquote /Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Intermediates/iFeelReactNative.build/Debug-iphoneos/iFeelReactNative.build/iFeelReactNative-generated-files.hmap -I/Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Intermediates/iFeelReactNative.build/Debug-iphoneos/iFeelReactNative.build/iFeelReactNative-own-target-headers.hmap -I/Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Intermediates/iFeelReactNative.build/Debug-iphoneos/iFeelReactNative.build/iFeelReactNative-all-target-headers.hmap -iquote /Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Intermediates/iFeelReactNative.build/Debug-iphoneos/iFeelReactNative.build/iFeelReactNative-project-headers.hmap -I/Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Products/Debug-iphoneos/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I../node_modules/react-native/React -I../node_modules/react-native/React/Base -I../node_modules/react-native/React/CSSLayout -I../node_modules/react-native/React/Executors -I../node_modules/react-native/React/Modules -I../node_modules/react-native/React/Profiler -I../node_modules/react-native/React/Views -I/Users/sunrising/Documents/Leaff/iFeelReactNative/ios/../node_modules/react-native-vector-icons/RNVectorIconsManager -I/Users/sunrising/Documents/Leaff/iFeelReactNative/ios/../node_modules/react-native-blur/ios -I/Users/sunrising/Documents/Leaff/iFeelReactNative/ios/../node_modules/react-native-file-opener/ios/RNFileOpener -I../node_modules/react-native-spinkit/ios -I../node_modules/react-native-spinkit/ios/Libraries -I../node_modules/react-native-spinkit/ios/Libraries/SpinKit -I../node_modules/react-native-spinkit/ios/Libraries/SpinKit/Animations -I../node_modules/react-native-fs -I../node_modules/react-native-fs/android -I../node_modules/react-native-fs/IntegrationTests -I../node_modules/react-native-fs/android/src -I../node_modules/react-native-fs/IntegrationTests/IntegrationTestsTests -I../node_modules/react-native-fs/android/src/main -I../node_modules/react-native-fs/IntegrationTests/IntegrationTestsTests/ReferenceImages -I../node_modules/react-native-fs/android/src/main/java -I../node_modules/react-native-fs/IntegrationTests/IntegrationTestsTests/ReferenceImages/IntegrationTests-IntegrationTestsApp -I../node_modules/react-native-fs/android/src/main/java/com -I../node_modules/react-native-fs/android/src/main/java/com/rnfs -I/Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Intermediates/iFeelReactNative.build/Debug-iphoneos/iFeelReactNative.build/DerivedSources/arm64 -I/Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Intermediates/iFeelReactNative.build/Debug-iphoneos/iFeelReactNative.build/DerivedSources -F/Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Products/Debug-iphoneos -MMD -MT dependencies -MF /Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Intermediates/iFeelReactNative.build/Debug-iphoneos/iFeelReactNative.build/Objects-normal/arm64/main.d --serialize-diagnostics /Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Intermediates/iFeelReactNative.build/Debug-iphoneos/iFeelReactNative.build/Objects-normal/arm64/main.dia -c /Users/sunrising/Documents/Leaff/iFeelReactNative/ios/iFeelReactNative/main.m -o /Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Intermediates/iFeelReactNative.build/Debug-iphoneos/iFeelReactNative.build/Objects-normal/arm64/main.o
CompileC /Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Intermediates/iFeelReactNative.build/Debug-iphoneos/iFeelReactNative.build/Objects-normal/arm64/iFeelReactNative_vers.o /Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Intermediates/iFeelReactNative.build/Debug-iphoneos/iFeelReactNative.build/DerivedSources/iFeelReactNative_vers.c normal arm64 c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/sunrising/Documents/Leaff/iFeelReactNative/ios
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c -arch arm64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fmodules -gmodules -fmodules-cache-path=/Users/sunrising/Library/Developer/Xcode/DerivedData/ModuleCache -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/sunrising/Library/Developer/Xcode/DerivedData/ModuleCache/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wunreachable-code -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -DDEBUG=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk -fstrict-aliasing -Wdeprecated-declarations -miphoneos-version-min=8.0 -g -Wno-sign-conversion -Winfinite-recursion -fembed-bitcode-marker -iquote /Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Intermediates/iFeelReactNative.build/Debug-iphoneos/iFeelReactNative.build/iFeelReactNative-generated-files.hmap -I/Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Intermediates/iFeelReactNative.build/Debug-iphoneos/iFeelReactNative.build/iFeelReactNative-own-target-headers.hmap -I/Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Intermediates/iFeelReactNative.build/Debug-iphoneos/iFeelReactNative.build/iFeelReactNative-all-target-headers.hmap -iquote /Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Intermediates/iFeelReactNative.build/Debug-iphoneos/iFeelReactNative.build/iFeelReactNative-project-headers.hmap -I/Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Products/Debug-iphoneos/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I../node_modules/react-native/React -I../node_modules/react-native/React/Base -I../node_modules/react-native/React/CSSLayout -I../node_modules/react-native/React/Executors -I../node_modules/react-native/React/Modules -I../node_modules/react-native/React/Profiler -I../node_modules/react-native/React/Views -I/Users/sunrising/Documents/Leaff/iFeelReactNative/ios/../node_modules/react-native-vector-icons/RNVectorIconsManager -I/Users/sunrising/Documents/Leaff/iFeelReactNative/ios/../node_modules/react-native-blur/ios -I/Users/sunrising/Documents/Leaff/iFeelReactNative/ios/../node_modules/react-native-file-opener/ios/RNFileOpener -I../node_modules/react-native-spinkit/ios -I../node_modules/react-native-spinkit/ios/Libraries -I../node_modules/react-native-spinkit/ios/Libraries/SpinKit -I../node_modules/react-native-spinkit/ios/Libraries/SpinKit/Animations -I../node_modules/react-native-fs -I../node_modules/react-native-fs/android -I../node_modules/react-native-fs/IntegrationTests -I../node_modules/react-native-fs/android/src -I../node_modules/react-native-fs/IntegrationTests/IntegrationTestsTests -I../node_modules/react-native-fs/android/src/main -I../node_modules/react-native-fs/IntegrationTests/IntegrationTestsTests/ReferenceImages -I../node_modules/react-native-fs/android/src/main/java -I../node_modules/react-native-fs/IntegrationTests/IntegrationTestsTests/ReferenceImages/IntegrationTests-IntegrationTestsApp -I../node_modules/react-native-fs/android/src/main/java/com -I../node_modules/react-native-fs/android/src/main/java/com/rnfs -I/Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Intermediates/iFeelReactNative.build/Debug-iphoneos/iFeelReactNative.build/DerivedSources/arm64 -I/Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Intermediates/iFeelReactNative.build/Debug-iphoneos/iFeelReactNative.build/DerivedSources -F/Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Products/Debug-iphoneos -MMD -MT dependencies -MF /Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Intermediates/iFeelReactNative.build/Debug-iphoneos/iFeelReactNative.build/Objects-normal/arm64/iFeelReactNative_vers.d --serialize-diagnostics /Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Intermediates/iFeelReactNative.build/Debug-iphoneos/iFeelReactNative.build/Objects-normal/arm64/iFeelReactNative_vers.dia -c /Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Intermediates/iFeelReactNative.build/Debug-iphoneos/iFeelReactNative.build/DerivedSources/iFeelReactNative_vers.c -o /Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Intermediates/iFeelReactNative.build/Debug-iphoneos/iFeelReactNative.build/Objects-normal/arm64/iFeelReactNative_vers.o
Ld /Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Products/Debug-iphoneos/iFeelReactNative.app/iFeelReactNative normal arm64
cd /Users/sunrising/Documents/Leaff/iFeelReactNative/ios
export IPHONEOS_DEPLOYMENT_TARGET=8.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk -L/Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Products/Debug-iphoneos -F/Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Products/Debug-iphoneos -filelist /Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Intermediates/iFeelReactNative.build/Debug-iphoneos/iFeelReactNative.build/Objects-normal/arm64/iFeelReactNative.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -miphoneos-version-min=8.0 -Xlinker -object_path_lto -Xlinker /Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Intermediates/iFeelReactNative.build/Debug-iphoneos/iFeelReactNative.build/Objects-normal/arm64/iFeelReactNative_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fembed-bitcode-marker -fobjc-arc -fobjc-link-runtime /Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Products/Debug-iphoneos/libART.a /Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Products/Debug-iphoneos/libReact.a /Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Products/Debug-iphoneos/libRCTActionSheet.a /Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Products/Debug-iphoneos/libRCTGeolocation.a /Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Products/Debug-iphoneos/libRCTImage.a /Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Products/Debug-iphoneos/libRCTLinking.a /Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Products/Debug-iphoneos/libRCTNetwork.a /Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Products/Debug-iphoneos/libRCTSettings.a /Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Products/Debug-iphoneos/libRCTText.a /Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Products/Debug-iphoneos/libRCTVibration.a /Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Products/Debug-iphoneos/libRCTWebSocket.a -lRNVectorIcons -lRNBlur -lRNFileOpener -lRNSpinkit -lRNFS -Xlinker -dependency_info -Xlinker /Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Intermediates/iFeelReactNative.build/Debug-iphoneos/iFeelReactNative.build/Objects-normal/arm64/iFeelReactNative_dependency_info.dat -o /Users/sunrising/Library/Developer/Xcode/DerivedData/iFeelReactNative-grxixclsevoxvxawppuvwqxadqxc/Build/Products/Debug-iphoneos/iFeelReactNative.app/iFeelReactNative
Undefined symbols for architecture arm64:
"std::__1::__next_prime(unsigned long)", referenced from:
std::__1::__hash_table<std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::__unordered_map_hasher<unsigned long, std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::hash<unsigned long>, true>, std::__1::__unordered_map_equal<unsigned long, std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::equal_to<unsigned long>, true>, std::__1::allocator<std::__1::__hash_value_type<unsigned long, unsigned long> > >::rehash(unsigned long) in libReact.a(RCTJSCExecutor.o)
"std::__1::mutex::lock()", referenced from:
-[RCTModuleData setUpInstanceAndBridge] in libReact.a(RCTModuleData.o)
"std::__1::mutex::unlock()", referenced from:
-[RCTModuleData setUpInstanceAndBridge] in libReact.a(RCTModuleData.o)
"std::__1::mutex::~mutex()", referenced from:
-[RCTModuleData .cxx_destruct] in libReact.a(RCTModuleData.o)
"std::terminate()", referenced from:
___clang_call_terminate in libReact.a(RCTJSCExecutor.o)
"operator delete[](void*)", referenced from:
-[RCTJSCExecutor dealloc] in libReact.a(RCTJSCExecutor.o)
executeRandomAccessModule(RCTJSCExecutor*, unsigned int, unsigned long, unsigned long) in libReact.a(RCTJSCExecutor.o)
readRAMBundle(std::__1::unique_ptr<__sFILE, int (*)(__sFILE*)>, RandomAccessBundleData&) in libReact.a(RCTJSCExecutor.o)
RandomAccessBundleData::~RandomAccessBundleData() in libReact.a(RCTJSCExecutor.o)
"operator delete(void*)", referenced from:
std::__1::__hash_table<std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::__unordered_map_hasher<unsigned long, std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::hash<unsigned long>, true>, std::__1::__unordered_map_equal<unsigned long, std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::equal_to<unsigned long>, true>, std::__1::allocator<std::__1::__hash_value_type<unsigned long, unsigned long> > >::~__hash_table() in libReact.a(RCTJSCExecutor.o)
std::__1::__hash_table<std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::__unordered_map_hasher<unsigned long, std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::hash<unsigned long>, true>, std::__1::__unordered_map_equal<unsigned long, std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::equal_to<unsigned long>, true>, std::__1::allocator<std::__1::__hash_value_type<unsigned long, unsigned long> > >::__deallocate(std::__1::__hash_node<std::__1::__hash_value_type<unsigned long, unsigned long>, void*>*) in libReact.a(RCTJSCExecutor.o)
____ZL37installBasicSynchronousHooksOnContextP9JSContext_block_invoke_6 in libReact.a(RCTJSCExecutor.o)
std::__1::unique_ptr<std::__1::__hash_node<std::__1::__hash_value_type<unsigned long, unsigned long>, void*>, std::__1::__hash_node_destructor<std::__1::allocator<std::__1::__hash_node<std::__1::__hash_value_type<unsigned long, unsigned long>, void*> > > > std::__1::__hash_table<std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::__unordered_map_hasher<unsigned long, std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::hash<unsigned long>, true>, std::__1::__unordered_map_equal<unsigned long, std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::equal_to<unsigned long>, true>, std::__1::allocator<std::__1::__hash_value_type<unsigned long, unsigned long> > >::__construct_node_hash<std::__1::pair<unsigned long const, unsigned long> const&>(unsigned long, std::__1::pair<unsigned long const, unsigned long> const&&&) in libReact.a(RCTJSCExecutor.o)
std::__1::__hash_table<std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::__unordered_map_hasher<unsigned long, std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::hash<unsigned long>, true>, std::__1::__unordered_map_equal<unsigned long, std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::equal_to<unsigned long>, true>, std::__1::allocator<std::__1::__hash_value_type<unsigned long, unsigned long> > >::__rehash(unsigned long) in libReact.a(RCTJSCExecutor.o)
std::__1::__hash_table<std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::__unordered_map_hasher<unsigned long, std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::hash<unsigned long>, true>, std::__1::__unordered_map_equal<unsigned long, std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::equal_to<unsigned long>, true>, std::__1::allocator<std::__1::__hash_value_type<unsigned long, unsigned long> > >::erase(std::__1::__hash_const_iterator<std::__1::__hash_node<std::__1::__hash_value_type<unsigned long, unsigned long>, void*>*>) in libReact.a(RCTJSCExecutor.o)
"operator new[](unsigned long)", referenced from:
executeRandomAccessModule(RCTJSCExecutor*, unsigned int, unsigned long, unsigned long) in libReact.a(RCTJSCExecutor.o)
readRAMBundle(std::__1::unique_ptr<__sFILE, int (*)(__sFILE*)>, RandomAccessBundleData&) in libReact.a(RCTJSCExecutor.o)
"operator new(unsigned long)", referenced from:
std::__1::unique_ptr<std::__1::__hash_node<std::__1::__hash_value_type<unsigned long, unsigned long>, void*>, std::__1::__hash_node_destructor<std::__1::allocator<std::__1::__hash_node<std::__1::__hash_value_type<unsigned long, unsigned long>, void*> > > > std::__1::__hash_table<std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::__unordered_map_hasher<unsigned long, std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::hash<unsigned long>, true>, std::__1::__unordered_map_equal<unsigned long, std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::equal_to<unsigned long>, true>, std::__1::allocator<std::__1::__hash_value_type<unsigned long, unsigned long> > >::__construct_node_hash<std::__1::pair<unsigned long const, unsigned long> const&>(unsigned long, std::__1::pair<unsigned long const, unsigned long> const&&&) in libReact.a(RCTJSCExecutor.o)
std::__1::__hash_table<std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::__unordered_map_hasher<unsigned long, std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::hash<unsigned long>, true>, std::__1::__unordered_map_equal<unsigned long, std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::equal_to<unsigned long>, true>, std::__1::allocator<std::__1::__hash_value_type<unsigned long, unsigned long> > >::__rehash(unsigned long) in libReact.a(RCTJSCExecutor.o)
"___cxa_begin_catch", referenced from:
___clang_call_terminate in libReact.a(RCTJSCExecutor.o)
"___gxx_personality_v0", referenced from:
-[RCTJavaScriptContext initWithJSContext:onThread:] in libReact.a(RCTJSCExecutor.o)
-[RCTJavaScriptContext init] in libReact.a(RCTJSCExecutor.o)
-[RCTJavaScriptContext invalidate] in libReact.a(RCTJSCExecutor.o)
+[RCTJSCExecutor runRunLoopThread] in libReact.a(RCTJSCExecutor.o)
-[RCTJSCExecutor setBridge:] in libReact.a(RCTJSCExecutor.o)
-[RCTJSCExecutor init] in libReact.a(RCTJSCExecutor.o)
-[RCTJSCExecutor initWithUseCustomJSCLibrary:] in libReact.a(RCTJSCExecutor.o)
...
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Activity Log Complete 03/11/2016, 12:01
12 errors
from react-native-share-extension.
ok, i resolved the errors, but it doesn't work
from react-native-share-extension.
I had a good friend look into it. Do all the steps mentioned above and be sure to check your Deployment Target:
from react-native-share-extension.
I figured out why it wasn't working for me, well almost. I hadn't linked all the relevant libraries and frameworks correctly in the share extension. I didn't realise that importing my app, even though it isn't used, means that the share extension needs the exact same Xcode configuration. Annoying partly because react-native link doesn't work on the extension.
I've now got the problem that when I close the share modal, the underlying app (in this case Safari) is frozen. Anyone else had this?
I can't seem to debug it at all - not in chrome or even the native code in via xCode. No break points ever get hit, and there's no logging anywhere.
from react-native-share-extension.
@npomfret can you prepare a sample project. I've been using this for a while and I haven't got the problem. If you can let me know so I can take a look into it.
from react-native-share-extension.
It's ok, I just wasn't calling close properly. It's working now (although still no debug and no logs).
I do have another question if you've got a moment:
How can I share state between my app and the share extension? My app reads its startup state from the filesystem when it boots, but the share extension seems to start from a totally different folder `/var/mobile/Containers/Data/PluginKitPlugin/...'. What's a good technique for getting state into the share extension?
from react-native-share-extension.
Maybe app groups is the answer: https://www.raizlabs.com/dev/2016/09/preparing-ios-app-for-extensions/
from react-native-share-extension.
If you're struggling with debugging on iOS devices, there are a few things that can help save a ton of time, after following the README:
- If you're using react-native latest, error boundaries might help with JS errors, although I've read that could be buggy as of RN 0.47.1 (will probably edit this comment after I've used them). Another option for now is to catch render exceptions or test for errors, then render that output with something like a Text component. As long as your share app initializes, you should be able to see yellowbox/redbox errors. If you're not seeing them, you likely have an initialization issue.
- Disable bundling on the main target when debugging the extension target, it's not needed when you're not working with the main app. (BTW, due to share extension memory constraints on iOS, the README could probably be revised with hints at providing separate bundles [requires customizing react-native-xcode.sh, however]. It takes about 30MB of memory to load the extension w/react-native. Ideally, we don't want to exceed 60-70MB, lest NotificationCenter kill it.)
- Enable breaking on exceptions. This is helpful if there are any exceptions in the extension itself; perhaps most useful if you've customized the native module.
Will likely edit this as I come across more tips. Seemed like a good place to stick this.
from react-native-share-extension.
@TheTekton This is really cool, do you want to send me a PR and add these valuable info into README file.
from react-native-share-extension.
@pisacode That did the trick. This should be in the README.
from react-native-share-extension.
Related Issues (20)
- Extension Overlay being displayed modally (iOS) HOT 1
- Issue HOT 5
- Sharing from browser: real iOS device receives page title, simulators receive URL HOT 2
- Video File Issue? HOT 1
- Audio and Video share empty value problem HOT 5
- not able to share image from google photos when app in background HOT 1
- Share extension opens up different instance of application HOT 4
- This no longer works HOT 10
- Error after clicking on my app icon during sharing (Expokit, Android) HOT 1
- 0.62.2 (Podspec) HOT 1
- 0.62.2 issue HOT 2
- 🔥How to clear image from bundle when app goes in background after receiving image prop HOT 1
- Working in React Native 0.62.2 (iOS) HOT 18
- What file extensions are allowed? HOT 1
- ERROR: File not found #import "React/RCTBridgeModule.h" HOT 1
- Cannot find lDoubleConversion HOT 1
- share ActionExtension not working with firebase
- expo-dev-client / EAS build integration? HOT 1
- Not getting Url when sharing image from Google to share extension ( Android)
- Cant share screenshot on ios
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-share-extension.