Pintrest sharing crash on ios

I want to share a message with Pintrest (i.e. I want to connect to my application). I used my SDK using Cocoa Pod. I can sometimes bind (sometimes), but sometimes when they are fixed, the application accidentally crashes and gets nothing in the crash log.

Can someone tell me what is going wrong? I am adding a piece of code that I used ... I used this link to install the SDK and followed this link. https://github.com/pinterest/ios-pdk

-(IBAction)pintrestButtonTapped
{
    @try
    {
        [PDKClient configureSharedInstanceWithAppId:@"4841203782190640720"];
        [[PDKClient sharedInstance] authenticateWithPermissions:@[PDKClientReadPublicPermissions,
                                                                  PDKClientWritePublicPermissions,
                                                                  PDKClientReadPrivatePermissions,
                                                                  PDKClientWritePrivatePermissions,
                                                                  PDKClientReadRelationshipsPermissions,
                                                                  PDKClientWriteRelationshipsPermissions]
                                                    withSuccess:^(PDKResponseObject *responseObject)
         {

             [PDKPin pinWithImageURL:[NSURL URLWithString:@"https://www.respectnetwork.com/wp-content/uploads/cynja-app_store_share.jpg"]
                                link:[NSURL URLWithString:@"https://itunes.apple.com/us/app/cynjaspace/id1050628761?ls=1&mt=8/"]
                  suggestedBoardName:@"CynzaSpace"
                                note:kSocialMediaSharingText
                         withSuccess:^
              {
                  NSLog(@"Successfully Pinned Up!!");
              }
                          andFailure:^(NSError *error)
              {
                  NSLog(@"UnSuccessfull");
              }];

         }
                                                     andFailure:^(NSError *error)
         {
             NSLog(@"authentication failed: %@", error);
         }];

    }
    @catch (NSException *exception)
    {
        // Print exception information
        NSLog( @"NSException caught" );
        NSLog( @"Name: %@", exception.name);
        NSLog( @"Reason: %@", exception.reason );
        return;
    }
}
+4
source share

All Articles