ShareKit / ShareKit

Drop in sharing features for all iPhone and iPad apps
2.19k stars 717 forks source link

Need Help #385

Closed xor83 closed 11 years ago

xor83 commented 11 years ago

Can somebody explain me installation point "Step 2: Add ShareKit to your project" from point 2.1 to 2.4?

VilemKurz commented 11 years ago

What exactly do you not understand? Do you know, what the target is in Xcode?

xor83 commented 11 years ago

"what the target is in Xcode?"

NO

I don't know where to look for these options:

"build phases - target dependencies add 2 new targets from ShareKit subproject: "Static Library" and "Resource Bundle""

build phases:- This is in project properties?

"add ShareKit's "libShareKit.a" to your project's Link Binary With Libraries build phase"

Libraries build phase : Where is this option?

"add ShareKit's "Resource Bundle" to your project's Copy Bundle Resources build phase"

Everything is already copied why do I have to copy again?

Screenshot will be very helpful for me

Thanks

VilemKurz commented 11 years ago

in project inspector click on your project. On the right you should see a table with project and your app target. Click on the target, find section "build phases". There you should see "target dependencies". I assume you use Xcode 4.

You do not need to copy anything. "Copy bundle resources" is a build phase :) Just add resource bundle there.

Hope this helps

xor83 commented 11 years ago

Thanks VilemKurz

I will try this and let you know once I reach home from ofc :)

xor83 commented 11 years ago

Hi VilemKurz,

I have tried everything but always getting error message that "SHK.h file not found" I think something is wrong with path can you please check these screenshot and let me know if I am doing anything wrong

http://www.nathalia.in/Screen%20Shot%202012-05-24%20at%2010.56.33%20PM.png http://www.nathalia.in/Screen%20Shot%202012-05-24%20at%2010.57.07%20PM.png http://www.nathalia.in/Screen%20Shot%202012-05-24%20at%2011.00.56%20PM.png http://www.nathalia.in/Screen%20Shot%202012-05-24%20at%2011.01.59%20PM.png http://www.nathalia.in/Screen%20Shot%202012-05-24%20at%2011.05.06%20PM.png

Thanks

VilemKurz commented 11 years ago

the red colour is fine - they are not built yet. The problem is, that you do all this within ShareKit's project. You should do it on your own - first click on finalGAP. Reset the changes you made in ShareKit.

xor83 commented 11 years ago

This time I have selected finalGAP and done all the step but same result Plz note that I am not doing Git submodule thing I have download from git using terminal and tested sample app everything is working fine

This is what I am doing:

1) Created PhoneGAP Project 2) Drag drop sharekit xproject file to my phonegap project 3) Selected Phonegap project and done step 2

Confused on this points:

"User header search paths: set it RECURSIVELY to the directory where you put submodules in. If you followed our install wiki, it should be Submodules/"

"ther Linker Flags: -ObjC -all_load " Do I have to write this "-ObjC -all_load" or select from some list?

4) Then added "#import "SHK.h" to phonegap's appdelegate.h

and getting error SHK.h file not found

Do you have any sample app on phonegap or cordova?... :)

Plz help

xor83 commented 11 years ago

Thanks VilemKurz for your help I did git thing and successfully compiled the project :) If you have any sample app on phonegap and sharekit plz let me know..:)

VilemKurz commented 11 years ago

I do not use phone gap, so unfortunately no sample, sorry :(

xor83 commented 11 years ago

I am just trying to show action sheet when application loads and I added code from installation instructions but always getting some error message plz check this screenshot

http://ezpic.net/test1.png

What is the simple way to call action sheet where I just import "SHK.h" and call already defined function to show action sheet with url parameter to share?

plz help

Thanks

VilemKurz commented 11 years ago

It is normal UIActionSheet, you should present it from some view (see the doc for UIActionSheet). Self is app delegate in your case.

xor83 commented 11 years ago

what should I write in code ? can you please show me sample code?

tried this line [actionSheet showFromToolbar:self.navigationController.toolbar];

but giving me error that navigationController not found

VilemKurz commented 11 years ago

Look at UIActionSheet documentation. Especially section "presenting the action sheet". You can not present it from app delegate. You should present it from main view, e.g with - (void)showInView:(UIView *)view.

xor83 commented 11 years ago

I dont know how to create view in phonegap can you hepl me if I share code?

VilemKurz commented 11 years ago

Sorry, I do not use PhoneGap.

xor83 commented 11 years ago

Any idea about this error?

duplicate symbol _jk_collectionClassLoadTimeInitialization clang: error: linker command failed with exit code 1 (use -v to see invocation)

ld: duplicate symbol _jk_collectionClassLoadTimeInitialization in /Users/Shared/Cordova/Frameworks/Cordova.framework/Cordova and /Users/praddd/Library/Developer/Xcode/DerivedData/last-crxzqhheoxfmbvezvrogcjmgsdng/Build/Products/Debug-iphonesimulator/libShareKit.a(JSONKit.o) for architecture i386

xor83 commented 11 years ago

fixed above error by removing JSONKit.m file from Sharekit... is that ok?

added code to show action sheet but it breaks and halt at main function with message

Thread 1: signal: SIGABRT

Any idea?

VilemKurz commented 11 years ago

About removing JSONKit from ShareKit - you use it elsewhere in your app. It might be better to remove it from your app then to change ShareKit, so that you do not have problems during ShareKit update.

About Sigabrt - too little info. You might step through the code, and see where exactly it fails.

xor83 commented 11 years ago

Thanks for your great support vilem ... :)

Managed to show action sheet but when I click on facebook it goes to safari and app is already installed so getting message that click on okay button when I click on okay it shows screen swap animation and blank screen comes for 2-3 sec and app get closed and no message in log window

then I configured FB for SSO but getting same issue although I have not done "MyiPhoneApp-Info.plist" step because dont know how to do that.. can we leave that?

And on email share when I click it halt on main function with message SIGABRT(I guess I have not created proper string in item variable)

my main concern is FB and I want to show login screen in popup window I am working on ios5.1

almost all services crashed or halt at : self.isDismissingView = YES

I know its issue with my code just need help.

why apple make coding so difficult ... :)

Plz advice

bchessin commented 11 years ago

I have a question, are you using git? To be honest, as of 2 days ago, I never used git coding and I just followed @VilemKurz tutorial in the wiki and it works perfectly. You wouldn't have any of these issues and it would make your life so much simpler. Why not just try it and post back if you have any issues.

xor83 commented 11 years ago

Yes I am using git and I know sharekit works. I am just stuck at integrating in phongap/cordova project and call sharekit from phongap plugin... if you have any working sample plz share... :)

bchessin commented 11 years ago

Are you sure you have the latest version of ShareKit? If so, I can't help any further since I do not know what PhoneGap is!

xor83 commented 11 years ago

Yes I am 100% sure I am using latest Sharekit. Just need help on PhoneGap plugin

bchessin commented 11 years ago

Can't help there, sorry

xor83 commented 11 years ago

everything is done so what is the problem here?

I am using this code:

NSString message = @"Test"; NSURL itemUrl = [NSURL URLWithString:@"http://getsharekit.com"]; SHKItem item = [SHKItem URL:itemUrl title:message];
SHKActionSheet
actionSheet = [SHKActionSheet actionSheetForItem:item];
[actionSheet showInView:self.viewController.view];

what I am missing?

bchessin commented 11 years ago

Is that code getting called? Otherwise that code looks good so far.

xor83 commented 11 years ago

this code show me the actionsheet and when I click on fb share it not able to come back to main app after validating and other services halt/crash at main function something wrong with view... can i send u the project? u can test with phonegap ?

bchessin commented 11 years ago

Oh, make sure your bundle id for your app in the Facebook settings matches yours in the Xcode project

xor83 commented 11 years ago

and what about the app crashing issue for other share services?... why they crashing

bchessin commented 11 years ago

What is the crash log in the console?

xor83 commented 11 years ago

"Oh, make sure your bundle id for your app in the Facebook settings matches yours in the Xcode project"

Do I have to do this again in my project? as I have already added Sharekit project as sub-project and everything is defined in sharekit project.

"What is the crash log in the console?"

When I click on email share it just breaks on main function with message: Thread 1: signal: SIGABRT