Image Sharing Using Google Plus in ios
Asked Answered
M

6

13

I want to share image on google plus:

I have used google+ api

AppDelegate.m

[GPPSignIn sharedInstance].clientID = @"MyClientID";
[GPPDeepLink setDelegate:self];
[GPPDeepLink readDeepLinkAfterInstall];

and on button action

ViewController.m

id<GPPShareBuilder> shareBuilder = [[GPPShare sharedInstance] shareDialog];

[shareBuilder setURLToShare:[NSURL URLWithString:@"http://dummy.com"]];
[shareBuilder setTitle:@"Some title" description:@"Some description" thumbnailURL:[NSURL URLWithString:@"http://dummy.com/image"]];
[shareBuilder setContentDeepLinkID:@"MyclientID"];
[shareBuilder open];

but on click it crashes ans error shows:

-[__NSDictionaryM gtm_httpArgumentsString]: unrecognized selector sent to instance 0x1e887ea0'

it crashes on [shareBuilder open]

Mylohyoid answered 25/7, 2013 at 12:7 Comment(0)
C
38

It is because you dont have set the other linker Flag, Go to Build Setting and then Other Linker Flags: -ObjC

Carminecarmita answered 9/9, 2013 at 9:14 Comment(2)
Silly points we miss -- I had made the flag "-Objc".. changed it to "-ObjC" and it worked.Troubadour
I have added google+ and facebook sign in both, now if i add -ObjC then facebook sdk starts giving errors, whats the middle way to support bothSkijoring
M
10

open your build setting of target :

build setting of target >goto linking section > Other linker flag Set other linker flag to : -ObjC

make sure your character should be > -ObjC (matching case) .

Middleoftheroader answered 23/3, 2015 at 7:39 Comment(0)
E
1

Amit Bhavsar say the correct. Go to Build Settings, Linking, set in Other Linker Flags, into debug and release, -ObjC. Check that you AppDelegate implement GPPDeepLinkDelegate and your views also.

Electrolyse answered 11/9, 2013 at 22:39 Comment(0)
P
1

ObjC in other linker flags. And if already add -ObjC try to remove it and again add it. For the 1st time i just copy past -ObjC and it was not working but after removing and again adding it starts working.

Pushbike answered 18/11, 2013 at 9:38 Comment(0)
C
1

I have also faced this issue, but finally i found the answer. As above some of friends said, I forgot Add the ObjC linker flag to the app target's build settingss:

So, go to Build Settings page of Targets section of the app, once gone over there, add following in Other Linker Flags

-ObjC

So, this may be helps you Friend!!!

Cupola answered 30/6, 2014 at 10:12 Comment(0)
D
0

you are not assigning client_ id of GPPSignIn class. Try this code in your appdelegate

[GPPSignIn sharedInstance].clientID = @"MY_CLIENT_ID";
[GPPDeepLink setDelegate:self];
[GPPDeepLink readDeepLinkAfterInstall];

then try sharing link for implementing it in right way.

Dorthydortmund answered 25/7, 2013 at 12:11 Comment(1)
i assigned it in Appdelegate.mMylohyoid

© 2022 - 2024 — McMap. All rights reserved.