[ad_1]
I’m fairly new to coding, however engaged on a flutter app and attempting to combine the flexibility to share photos to Instagram Tales utilizing the Social Share bundle. Every part works positive to generate the picture and the dynamic hyperlink (can check by commenting out the SocialShare half), however when the app tried to open Instagram on iOS I get the next error
*** Terminating app because of uncaught exception 'NSInvalidArgumentException', motive: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: try to insert nil object from objects[0]'
Picture is generated utilizing
closing newImage = await _socialShareService.sharedImage();
//then picture is saved to Firebase and dynamic hyperlink generated
closing postsUpdateData = createPostsRecordData(
sharedImage: newImage);
await containerPostsRecord.reference.replace(
postsUpdateData);
var uri = await _dynamicLinkService
.createDynamicLink()
print(uri.toString());
//that is the place the error is happening
await SocialShare.shareInstagramStory(newImage,
backgroundBottomColor: "#000000",
backgroundTopColor: "#ffffff",
attributionURL: uri.toString());
I’m having hassle understanding the error to determine what’s being known as on nil. Full error message is beneath
*** Terminating app because of uncaught exception 'NSInvalidArgumentException', motive: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: try to insert nil object from objects[0]'
*** First throw name stack:
(0x180e350fc 0x199685d64 0x180f3e564 0x180f496e0 0x180df2514 0x180e10ebc 0x101d6c0a4 0x10507a75c 0x104bb3cf8 0x104f41bb4 0x104e691c0 0x104e6cf24 0x180e4a318 0x180dcecf0 0x180dc94ec 0x180da7d08 0x180dbb468 0x19c95f38c 0x18375e5d0 0x1834dcf74 0x100a1fb68 0x101589aa4)
libc++abi: terminating with uncaught exception of kind NSException
* thread #1, queue="com.apple.main-thread", cease motive = sign SIGABRT
body #0: 0x00000001b84f7964 libsystem_kernel.dylib`__pthread_kill + 8
libsystem_kernel.dylib`__pthread_kill:
-> 0x1b84f7964 <+8>: b.lo 0x1b84f7984 ; <+40>
0x1b84f7968 <+12>: pacibsp
0x1b84f796c <+16>: stp x29, x30, [sp, #-0x10]!
0x1b84f7970 <+20>: mov x29, sp
Goal 0: (Runner) stopped.
I do know the error is coming from the AppDelegate.swift operate, however I’m not positive precisely tips on how to resolve this. Any perception is enormously appreciated!
[ad_2]
