TimmyRB / snapkit

SnapKit is a Flutter plugin that allows you to integrate Snapchat's own SDKs into your Flutter projects!
https://pub.dev/packages/snapkit
MIT License
30 stars 16 forks source link

TestFlight problem #24

Closed ghost closed 3 years ago

ghost commented 3 years ago

Hello, sharing to snap as stickers in IOS is working fine in debug and release mode but after upload the app to Test Flight and tried to share SnapChat the app crashed.

is there any way to find the problem ?

ghost commented 3 years ago

https://user-images.githubusercontent.com/80851543/134895208-a91816d3-1672-4b62-9b2a-d0b7889fe2ee.MP4

TimmyRB commented 3 years ago

Hi! Has your Snapchat application been approved by Snapchat on the Snap Developer Portal? You can only use the Staging key on unreleased versions of your app.

ghost commented 3 years ago

yes it is approved,

and the android version works fine.

I tried to run on my iPhone as a release mode it works fine but not working in testflight

ghost commented 3 years ago

when I was using the old MacBook it was working good, but know I am using the new MacBook M1.

ghost commented 3 years ago

I tried to build the IOS version with old mac but still the same problem

TimmyRB commented 3 years ago

I'm not able to diagnose your problem if you don't provide anything. Please include your Android manifest.xml, your Info.plist and the relevant code that is crashing Snapchat.

ghost commented 3 years ago

this the code for the IOS


void _takeScreenShotWidget(GiftsModel gift, String identity) async {
    _screenshotController
        .captureFromWidget(
            ShareSarahahWidget(
              id: gift.id,
              image: gift.from?.image,
              identity: identity,
              name: gift.from?.name,
              verified: gift.from?.verified ?? false,
              message: gift.message,
              messageBackgroundColor: Patterns.color(
                gift.messageBackgroundColor,
              ),
              cardImageUrl: gift.card?.denomination?.vendor?.imgUrl,
              textDirection: context.locale.languageCode == "ar"
                  ? TextDirection.rtl
                  : TextDirection.ltr,
              crossAxisAlignment: gift.message != null
                  ? gift.message
                          .toLowerCase()
                          .startsWith(AppRegex.checkArabicString)
                      ? context.locale.languageCode == "en"
                          ? CrossAxisAlignment.end
                          : CrossAxisAlignment.start
                      : context.locale.languageCode == "en"
                          ? CrossAxisAlignment.start
                          : CrossAxisAlignment.end
                  : CrossAxisAlignment.start,
            ),
            delay: Duration(milliseconds: 10))
        .then((capturedImage) async {
      final directory = await getApplicationDocumentsDirectory();
      final imagePath = await File('${directory.path}/${gift.id}.png').create();
      final Uint8List pngBytes = capturedImage.buffer.asUint8List();
      await imagePath.writeAsBytes(pngBytes);

      _shareScreenshot(imagePath.path);
    });
  }

  Future<void> _shareScreenshot(String imagePath) async {

    String url ="https://app.sarahah.com";
    openModalSheet(
        widget: ShareSocialWidget(
          imagePath: imagePath,
          url: url,
          eventName: EventsName.Action_Click_Share_Received,
          installedApps: await SocialShare.checkInstalledAppsForShare(),
          inSnapInstalled: await Snapkit().isSnapchatInstalled,
        ),
        context: context);
  }

snapkit.share(SnapchatMediaType.NONE,
                                    sticker: SnapchatSticker(
                                        image: FileImage(File(imagePath))),
                                    caption: "",
                                    attachmentUrl: url)
TimmyRB commented 3 years ago

A few things make sure the ClientId in your AndroidManifest.xml matches the on in your Info.plist and please edit your comment to include more relevant code ie where both imagePath and url get set.

ghost commented 3 years ago

Hi, I edit the code in the above comment ,

yes my friend i am sure the client Id is the same

ghost commented 3 years ago

Hi,

I share the problem with snapchat team, they said the problem resolved with the new update of the app 11.48

thanks my friend, the code is working now with new update of snapchat Screen Shot 1443-02-28 at 11 02 03 AM

codesbyatif commented 3 years ago

yes it is approved,

and the android version works fine.

I tried to run on my iPhone as a release mode it works fine but not working in testflight

@gkmuhannad is sticker showing while sharing it to snapchat?

ghost commented 3 years ago

yes it works for me, the problem was from Snapchat

codesbyatif commented 3 years ago

yes it works for me, the problem was from Snapchat

I can see the link but not sticker when sharing and i am using version 11.52. Any help would be appreciated. Thanks