Open mzl1988 opened 3 years ago
Same error for me. When trying to call SocialShare.shareInstagramStory the App crashs with same error as for @mzl1988
Same for me, this is the error from running within xcode. Does anyone know how to resolve this?
2021-05-17 14:14:05.528485+0200 Runner[76150:14349957] -[NSNull length]: unrecognized selector sent to instance 0x1f0afdee0 2021-05-17 14:14:05.532048+0200 Runner[76150:14349957] Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull length]: unrecognized selector sent to instance 0x1f0afdee0' First throw call stack: (0x19f5e19d8 0x1b3964b54 0x19f4f1bbc 0x19f5e401c 0x19f5e5f8c 0x103f07658 0x104810694 0x103fb0038 0x1042af41c 0x10424e81c 0x104250ed4 0x19f5623e0 0x19f561fe4 0x19f5614c4 0x19f55b850 0x19f55aba0 0x1b62c0598 0x1a1e4c2f4 0x1a1e51874 0x102873be4 0x19f239568) libc++abi.dylib: terminating with uncaught exception of type NSException *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull length]: unrecognized selector sent to instance 0x1f0afdee0' terminating with uncaught exception of type NSException
I have the same error even after upgrading the instagram application. On iOS only, Android is working.
same problem on iOS
This definitely needs a fix. However, you can work around it if you use a background image some background colors. For me I just grabbed a black image and set any colors.
SocialShare.shareInstagramStory(
filePath,
backgroundImagePath: await ImageUtils.imageToFilePath(
"images/background/black_background.jpg"),
attributionURL: "https://deep-link-url",
backgroundBottomColor: "FFFFFF",
backgroundTopColor: "FFFFFF",
);
Note, that the ImageUtils is a custom Class and is needed only for my needs, because I customized the library for my needs.
same on iOS 13
same problem, working for android but not for ios
I also run into this issue and the solution from @Babwenbiber doesn't work for me.
This definitely needs a fix. However, you can work around it if you use a background image some background colors. For me I just grabbed a black image and set any colors.
SocialShare.shareInstagramStory( filePath, backgroundImagePath: await ImageUtils.imageToFilePath( "images/background/black_background.jpg"), attributionURL: "https://deep-link-url", backgroundBottomColor: "FFFFFF", backgroundTopColor: "FFFFFF", );
Note, that the ImageUtils is a custom Class and is needed only for my needs, because I customized the library for my needs.
I had the same problem. With this trick I solved it. Thank you
This has been fixed in pull req #68
@ShekarMudaliyar could you upload a new version to pub.dev?
A hotfix is to directly use the github repo:
social_share: git: https://github.com/ShekarMudaliyar/social_share.git