Take the 2-minute tour ×
Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. It's 100% free, no registration required.

About

StackKit is a library for accessing the Stack Exchange API from within Cocoa/Cocoa Touch applications. It is under active development, but the major core functionality is present.

Code Snippet

[SKSite requestSiteWithNameLike:@"Stack Overflow" completionHandler:^(SKSite *site, NSError *error) {
  SKFetchRequest *r = [[SKFetchRequest requestForFetchingUsers] withIDs: 115730, nil];
  [site executeFetchRequest:r completionHandler:^(NSArray *results, NSError *error) {
    NSLog(@"retrieved users: %@", results);
  }];
}];

License

StackKit is available under the MIT license.

Download

StackKit can be downloaded from its Github repository.

Platform

StackKit is compatible with iOS 5+ and Mac OS X 10.7+.

Contact

StackKit is being developed by myself (Dave DeLong).

Code

StackKit is written in Objective-C. If you find a bug or would like to help contribute to it, please contact me via the project repository on Github. You're also welcome to fork the repository and send pull requests.

Description and code samples shown reflect the API of the "2.0" branch

share|improve this question
add comment

10 Answers

Is it possible to get a push notification when a new answer appeared for a specific question?

share|improve this answer
    
you'll have to implement that yourself. See apple's fantastic documentation (not sarcasm) –  Matt S. Jun 14 '10 at 15:00
    
Since this requires a bit more information than is easily readable in a comment, I opened (and subsequently closed) an issue for this on the StackKit site: github.com/davedelong/StackKit/issues/10 –  Dave DeLong Jun 14 '10 at 22:14
add comment

Good thing you didn't put a space in the name:

enter image description here

share|improve this answer
    
Is that the OS Macs use to run? Wow... –  Nathan Osman Jul 5 '10 at 18:14
7  
@George yeah, like 15 years ago. :) –  Dave DeLong Jul 5 '10 at 18:36
    
Ahh... those were('nt) the days. Still, Toolbox programming in Pascal was fun. :-) –  middaparka Jan 19 '11 at 16:48
    
Phone dialer? Was that for dialup? or could you phone people from Macs? –  Jonathan. Oct 8 '12 at 21:20
add comment

Hi Dave,

I'm using StakKit and love it, but when I tried to include it in managed objective-c project I get following message

objc[2411]: '/Library/Frameworks/StackKit.framework/Versions/A/StackKit' was not compiled with -fobjc-gc or -fobjc-gc-only, but the application requires GC

I tried to compile the source with GC supported but it wasn't compiled. Could you guys make it compatible with GC

And also can you add Gravatar url for user in SKUser Entity ?

Thanks.

share|improve this answer
    
good idea. I'm a big fan of memory management, so I totally forgot about garbage collection. I've pushed a change that turns on support for garbage collection, as well as an SKUser method that takes a square CGSize (or CGSizeZero) and returns a gravatar URL. Keep the feature requests coming! :) –  Dave DeLong Jul 14 '10 at 2:23
    
Thanks Dave, I'll get the latest code. –  Prashant Jul 14 '10 at 7:49
add comment

Dave,

I'm trying to fetch user asynchronously, but somehow fetchRequestWillBeginExecuting and fetchRequestWillBeginExecuting are not executing with iPhone SDK 4, can you have a look please?

share|improve this answer
    
Make sure you add -ObjC and -all_load to the Other Linker Flags setting of your project. That will load the categories in the static library. –  Dave DeLong Jul 18 '10 at 23:53
add comment

I tried to compile the iphone static library,but it failed in SKFunctions.h on line 41

NSString * SKExtractVector(id value, SKExtractor extractor);

with the error:

Expected declaration specifiers or '...' before 'SKExtractor'

(i'm trying to use it in an iOS 3.2 app btw)

share|improve this answer
    
Thanks for catching this! I just pushed a change to github; I had forgotten a #import line. –  Dave DeLong Aug 30 '10 at 0:28
    
Now you say that, it seems obvious. Thanks for your help :) –  Jonathan. Aug 30 '10 at 9:24
add comment

have you thought of adding User Association from StackAuth? I added it to my copy as a class method to SKSite, not sure if it follows the design pattern but it works. Also it doesn't return complete SKUser objects, because stackauth itself doesn't and fetch the complete user object from each site isn't feasible.

share|improve this answer
    
FYI, this is now in place on the development branch. You can request the associated accounts of a user via the SKSiteManager object. –  Dave DeLong Feb 22 '11 at 15:18
add comment

I'm glad to hear that StackKit is alive, since I started coding an iPad app using your framework :-) Keep up the great work, I'll contact you as soon as a working prototype is ready.

share|improve this answer
add comment

Still using StackKit and thinking its great, I've added a SKUserRepChange object and the ability to retrieve (when I say added I mean copied, pasted and editied ;)) Not sure how I can contribute this if you want it?

(Also I've always found it a bit backwards the way SKFetchRequests are executed asyncronously? Wouldn't it be better to have a executeOnSite method in SKFetchRequest object?)

share|improve this answer
    
glad to hear it! to contribute changes, you can fork the repository on github, make your changes, and send me a pull request. Also, the requests are executed on the SKSite in the same way that NSFetchRequests are executed on an NSManagedObjectContext. –  Dave DeLong Feb 15 '11 at 20:34
    
@Dave of course I just got confused between NSFetchRequest and NSURLRequest. By coincidence I just forked it today, while learning about git. Thanks I realised I have been using an out of date StackKit for a while, so while the basics are the same I'll have to get used to the Builders instead of Endpoints. –  Jonathan. Feb 15 '11 at 20:55
    
technically the "coredata" branch is experimental. Once I get it to a point where I'm mostly satisfied with it, I'll merge it in to "master". However, it should be stable. If you find issues with it, be sure to let me know. –  Dave DeLong Feb 15 '11 at 21:05
add comment

I am having trouble figuring out how to set up StackKit within a project. This most likely is a result of my inexperience with XCode in general but I figured this would be an appropriate place to ask.

I have built the StackKit project and then copied the .framework folder to a more accessible (easier to find) location. I then add the framework to the project.

Then due to an "image not found" error I add a Copy Files build phase.

The problem is that I end up with two references to the StackKit.framework in my project. Clearly this isn't the right way to set this up. Is there a way to simplify this?

share|improve this answer
    
You are programming for mac, not iOS, right? –  Jonathan. Mar 30 '11 at 7:12
    
Yes, the 10.6 SDK –  Jeff Swensen Mar 30 '11 at 12:05
    
Where do the references appear, one under the target and one in the project groups (normally the Frameworks group)? Also are you using Xcode 4 or 3.2? –  Jonathan. Mar 30 '11 at 13:55
    
XCode 4. They just show up at the top level of the project. –  Jeff Swensen Mar 30 '11 at 14:25
add comment

Is this project still under development?

share|improve this answer
    
Not actively, no. I've been thinking about resurrecting it for the 2.0 SDK, however. We'll see... –  Dave DeLong Dec 22 '11 at 22:41
    
Okay, well, I'd like to start using it - just been a bit wary as there has been so little activity on it. What was the purpose of the coredata branch? How did it differ from master? Was it ready to be used? I've tried building against it, but it just beachballs when linked into a Mac app on OS X Lion. –  Maurice Kelly Dec 23 '11 at 9:44
    
FYI, I've been putting a lot of work recently into the 2.0 branch. –  Dave DeLong Feb 18 '12 at 19:01
    
Thanks for the heads up. Will have a look at it now. Cheers. –  Maurice Kelly Feb 19 '12 at 15:55
add comment

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .