iOS/Mac OS framework for Rails

Related tags

Networking nsrails
Overview

nsrails.com


NSRails is a lightweight framework that makes mapping client-side objects to remote Rails objects a breeze, and calling CRUD operations and others super easy. It's accessible while also extremely flexible and customizable, to the point that it'll work with any RESTful server, not just Rails. Also, CoreData support is seamless.

Here's how easy it is to get started. Set the root URL of your app somewhere during launch:

NSRConfig.defaultConfig().rootURL = NSURL(string:"http://localhost:3000")
[NSRConfig defaultConfig].rootURL = [NSURL URLWithString:@"http://localhost:3000"];

Inherit model objects from NSRRemoteObject, or NSRRemoteManagedObject with CoreData:

@objc(Post) class Post : NSRRemoteObject {
  var author: String
  var content: String
  var createdAt: NSDate
  var responses: [Response]
}
@interface Post : NSRRemoteObject

@property (nonatomic, strong) NSString *author, *content;
@property (nonatomic, strong) NSDate *createdAt;
@property (nonatomic, strong) NSArray *responses;

@end

Note: @objc(<ClassName>) is currently required for Swift so the class name bridges over nicely.

That's it! Instances inherit methods to remotely create, read, update, or destroy their corresponding remote object:

let post = Post()
post.author = "Me"
post.content = "Some text"

// POST /posts.json => {post:{author:"Me", content:"Some text"}}
post.remoteCreateAsync() { error in
    ...
}

post.content = "Changed!"
// PATCH /posts/1.json => {post:{author:"Me", content:"Changed!"}}
post.remoteUpdateAsync() { error in ... }

// Fetch any latest data for this post and update locally
// GET /posts/1.json
post.remoteFetchAsync() { error in ... }

// DELETE /posts/1.json
post.remoteDestroyAsync() { error in ... }

// GET /posts.json
Post.remoteAllAsync() { allPosts, error in ... }

// GET /posts/1.json
Post.remoteObjectWithID(1) { post, error in ... }

// Retrieve a collection based on an object
// GET /posts/1/responses.json
Response.remoteAllViaObject(post) { responses, error in ... }

A lot of behavior is customized via overrides. For instance, in the previous example, in order to populate a Post's responses array with Response objects automatically when a Post is retrieved, we have to specify the Response class as the type for that property.

@implementation Post

//override
- (Class) nestedClassForProperty:(NSString *)property {
    if ([property isEqualToString:@"response"]) {
        return [Response class];
    }
    
    return [super nestedClassForProperty:property];
}

@end

(Sidenote: This is necessary for Objective-C of course, but at least in Swift, there's probably a good way to automatically infer the type from the generic specified in the array, which I haven't looked into it yet. Let me know if this is possible!)

See the documentation for more on what you can do with NSRails-charged classes, or the cookbook for quick NSRRemoteObject override recipes.

####NSRRequest

Requests themselves can be customized with query parameters (/?a=b&c=d), additional HTTP headers, or to go to custom routes (i.e. for custom controller methods) using the NSRRequest class. The results of these requests can easily be converted from JSON into native model objects using inherited convenience methods such as +[MyClass objectWithRemoteDictionary:] and +[MyClass objectsWithRemoteDictionaries:].

Support

Installation

The best way to install NSRails is to use the Great CocoaPods. Add pod 'NSRails' to your Podfile, or pod 'NSRails/CoreData' if you're using CoreData.

  • Getting started using NSRails with Ruby has been moved here.
  • Also, autogenerate NSRails-ready classes from a Rails project.

Dependencies

  • iOS 5.0+ / OS X 10.7+
  • Automatic Reference Counting (ARC)

Credits

NSRails is written and maintained by Dan Hassin. A lot of it was inspired by the ObjectiveResource project, many thanks there!

http://nsrails.com – an open forum -type thing running on Rails/Heroku and powered by the included NSRails demo app!

Comments
  • Make NSCoding implementation  always encode properties to NSData, and de...

    Make NSCoding implementation always encode properties to NSData, and de...

    encodeWithCoder would use remoteAttributes, which, in some rare scenarios (manually changing properties on an object) would not be accurate.

    More importantly, initWithCoder would set the remoteAttributes but not use them to set the properties of the object.

    I've included tests, and they should have good coverage!

    Open to critique on general coding style or anything else!

    opened by marklarr 15
  • nested resource urls macro

    nested resource urls macro

    nested resources in rails are exclusively accessed with the nested url (at least in my case?) and i'm struggling to figure out how to make this addition with NSRails. for example...

    MySweetApp::Application.routes.draw do
      resources :users
        resources :invites
      end
    end
    

    Invites then are accessed in relation to some user.

    GET /users/1/invites.json
    POST /users/1/invites.json
    DELETE /users/1/invites/3.json
    

    At a cursory glance this would be handled by some macro with syntax recognition for an embedded property - example shown as NSRNestedResourcePrefix below. Let's pretend we have a User model and a UserInvite model to correspond to the above example.

    #import "UserInvite.h"
    
    #import "Challenge.h"
    #import "User.h"
    
    @implementation UserInvite
    @synthesize challenge, user, phoneDigest, emailDigest, twitterHandleDigest;
    NSRMap(*, challenge, user -b);
    NSRNestedResourcePrefix("users", "[user remoteID]");
    
    @end
    

    Thoughts are appreciated.

    opened by scootklein 15
  • NSRRequest POST body as query string

    NSRRequest POST body as query string

    Am I missing something, or is it only possible to set the POST body of an NSRRequest to JSON? There are times in the apps that I work on that we send URL encoded query string parameters through the POST body (aka, this=that&someotherthing[key]=value.

    If this is accurate, I wouldn't mind whipping up a PR to add functionality if desired. @dingbat @ihassin

    opened by marklarr 13
  • HTTP Token

    HTTP Token

    Hey guys, amazing work on this project. Makes it such a joy now to communicate with my rails back end. Just a quick question though. I noticed there is support in the config for oauth and basic authentication, but is there no option for using tokens? I am currently using authenticate_or_request_with_http_token on a project. But I can't seem to find a way to configure NSRails to put just a token field in the Authorization header for all of the requests. Any plans for including this?

    Thanks

    Matt

    opened by mdfdroid 13
  • Additional support for custom methods

    Additional support for custom methods

    In NSRRemoteObject, there's currently

    + (NSArray *) remoteAll:(NSError **)error;
    + (id) remoteObjectWithID:(NSNumber *)mID error:(NSError **)error;
    

    Which are great, because they know the class of object we're expecting, and automatically parse the response JSON into NSObjects for us.

    It seems like it'd be nice to have this same sort of automagic parsing of the return available for custom methods? Something like...

    + (NSArray *) remoteAllWithCustomMethod:(NSString *)customMethod andParams:(NSDictionary *)params:(NSError **)error;
    + (id) remoteObjectWithCustomMethod:(NSString *)customMethod andParams:(NSDictionary *)params error:(NSError **)error;
    

    Unless I'm missing something, it seems like the only option right now is to make an NSRRequest with - (id) routeToClass:(Class)c withCustomMethod:(NSString *)optionalRESTMethod, and then fire that off, but all you get back is JSON.

    Thoughts?

    opened by marklarr 12
  • Added Core Data support to NSRails

    Added Core Data support to NSRails

    I created an NSRailsManagedObject object by copying/pasting the code from NSRailsModel. NSRailsManagedObject, however, inherits from NSManagedObject rather than NSObject. When the CRUD and fetch operations succeed, the corresponding objects in Core Data (uniquely identified by their primary key attribute) are updated, and the Core Data managed object context is saved.

    The primary key attribute is assumed to be classname_id in the Core Data model. So for a class named "User", the primary key would be "user_id".

    Setup requires that the entities which should inherit from NSRailsManagedObject have their class set in the right pane of Xcode's data model editor (in the *.xcdatamodeld file) to the entity name. Otherwise, Core Data assumes that the entity's class inherits from NSManagedObject directly, and the application will crash.

    remoteCreate will create the object locally and send a request to the server to create the object.

    remoteUpdate will attempt to update the server's record, and if the request succeeds, the object will be saved locally. Otherwise, changes will be rolled back if you have implemented an undo manager for the core data managed object context.

    remoteDestroy will send a request to the server to destroy the remote object. If successful, the local object will be deleted from Core Data.

    remoteFetch will update the attributes of the object in Core Data and save it, if successful.

    opened by jdjennin 12
  • subclassing NSRRemoteObject decodeRemoteValue

    subclassing NSRRemoteObject decodeRemoteValue

    why do I need to do this because I have a hash that I wish to decode

    
      def decodeRemoteValue(remoteObject, forRemoteKey:remoteKey, change:change)
        if remoteKey == "obj"
          self.obj = remoteObject
        else
          super(remoteObject, forRemoteKey:remoteKey, change:change)
        end
      end
    

    Cannot define method decodeRemoteValue:forRemoteKey:change:' because no Objective-C stub was pre-compiled for typesv@:@@^c'. Make sure you properly link with the framework or library that defines this message.

    opened by hookercookerman 10
  • Is there a clash between 'NSRails' and 'NSData+Base64' pods?

    Is there a clash between 'NSRails' and 'NSData+Base64' pods?

    If I'm reading the tea-leaves properly, it seems that NSRails is doing something under the hood with 'NSData+Base64'. If I include the pod 'NSData+Base64' into my RubyMotion project, I get a compile error inside NSRails. If I take it away, it works.

    However, using 'base64EncodedString' on an NSData instance doesn't work, but I notice that using 'nsr_base64Encoding' does work.

    Is this something worth fixing in NSRails, or is there some kind of config I can use to make it work? It's a little bit obtuse to have to use the nsr_ version.

    opened by matthewsinclair 8
  • It seems like [NSRRequest sendSynchronous] does not catch server response on error?

    It seems like [NSRRequest sendSynchronous] does not catch server response on error?

    When I run following code and its server returns unauthorized response status code with an error message, I think we have no way to to access the server error message. Please let me know if I'm wrong.

    User *user = [[User alloc] init]; user.email = @"[email protected]"; user.password = @"password";

    NSRRequest *request = [NSRRequest POST]; [request routeTo:@"/users/sign_in.json"]; [request setBodyToObject:user]; NSError *error; [request sendSynchronous:&error];

    opened by tomoyuki28jp 8
  • Using NSRails with RocketPants Rails Back-End

    Using NSRails with RocketPants Rails Back-End

    I'm using RocketPants on my Rails back-end because it offers some nice features (such as pagination), but I think that because it sends its responses back inside a 'response' entity that it is causing NSRails some problems.

    For example with the Stores resource (GET /stores/:id) I end up with:

    (main)> store = Store.remoteObjectWithID(31, error:e_ptr)
    2013-04-05 09:27:51.548 T-Resources[73291:c07] [NSRails][OUT] ===> GET to http://my-service.dev/api/1/stores/31 
    2013-04-05 09:27:51.564 T-Resources[73291:c07] [NSRails][IN] <=== Code 200;  {
        response =     {
            "created_at" = "2013-03-31T05:01:04Z";
            currency = AUD;
            id = 31;
            "merchant_id" = 7;
            name = "In molestiae id";
            "updated_at" = "2013-03-31T05:01:04Z";
        };
    }
    => #<Store:0xaca0ec0>
    (main)> store.currency
    => nil
    

    But the returned store object remains unpopulated, which I assume is because the result is inside the "response" entity in the JSON returned. I also noticed that when I tried to get access to a resource that returns a list of items via stores.remoteFetchAll, I'm getting an "unrecognized selector sent to instance" error, presumably because of the RocketPants pagination items (count, pagination) at the end of the response.

    Is there anything I can do with NSRails to support a RocketPants-style RESTful API?

    Thanks, M@

    opened by matthewsinclair 8
  • Not so much an issue ...

    Not so much an issue ...

    Hey,

    When I found NSRails I was really intrigued. I'm a seasoned Objective-C developer and I'm working on a project that requires a Rails back-end and thought I'd found a framework that may well help out. That was until I started seeing things like NSRMap(*) and NSRUseModelName(@"subscriber").

    You make heavy use of compiler macros throughout the framework, and I can perhaps understand why this would be if you're a Ruby developer coming to Objective-C (after all, magic is inherent to Ruby) but for an Objective-C developer this isn't a standard convention. By using macros in this way, the developer relinquishes control. Whilst it may look simpler (and prettier) on the surface, debugging any issues would be a nightmare and behaviour cannot be overridden.

    What I found frustrating was that in the Ruby version where you've been unable to perform similar magic, you've actually adhered to the Objective-C convention of providing a base class with default behaviour and then allowing developers to override the methods to customise the behaviour. For example, the way you handle NSRUseModelName in Ruby.

    I know other things have already been brought to your attention, such as using the NS prefix, but the conventions and standards are there for a reason. If you haven't done so already, it may be worthwhile reading through Open Source Code by Matt Gemmell (specifically the 'Speak the language' paragraph) and API Design by Matt Gemmell (specifically Rule 1).

    For instance, you already have this in Ruby ...

    class User < NSRRemoteObject
      def self.NSRUseModelName
        "subscriber"
      end
    
      #optional method to define plural
      def self.NSRUsePluralName
        "subscriberz"
      end
    end
    

    So why not have the equivalent in Objective-C ...

    @implementation User
    
     - (NSString *)modelName
    {
        return @"subscriber";
    }
    
     - (NSString *)pluralizedModelName
    {
        return @"subscriberz";
    }
    
    @end
    

    Not only will you be staying true to the language and abiding by the conventions, you'll also have consistency across the two languages (where it's appropriate).

    It'd be great to get your thoughts on this. I did try to contact you on Twitter but I don't think you use your account that often.

    Regards,

    -Mic

    opened by ghost 8
  • Fix broken headings in Markdown files

    Fix broken headings in Markdown files

    GitHub changed the way Markdown headings are parsed, so this change fixes it.

    See bryant1410/readmesfix for more information.

    Tackles bryant1410/readmesfix#1

    opened by bryant1410 0
  • [RubyMotion] Error building with CoreData support

    [RubyMotion] Error building with CoreData support

    Hi,

    I'm trying to use NSRails with CoreData in a RubyMotion application but it doesn't seem to be able to build properly. Hopefully you can help shed some light. Any help would be great.

    Here's my Pod listing:

      app.pods do
        pod "AFNetworking"
        pod "JGProgressHUD"
        pod "JMImageCache"
        pod "FontasticIcons"
        pod "NSRails/CoreData"
      end
    

    and here's the error I'm getting when trying to compile the application.

    duplicate symbol _OBJC_IVAR_$_NSRConfigStackElement._config in:
        /Users/willrax/test/vendor/Pods/build-iPhoneSimulator/libPods.a(NSRConfig-BCA265D5AEE93092.o)
    duplicate symbol _OBJC_IVAR_$_NSRConfig._rootURL in:
        /Users/willrax/test/vendor/Pods/build-iPhoneSimulator/libPods.a(NSRConfig-BCA265D5AEE93092.o)
    duplicate symbol _OBJC_IVAR_$_NSRConfig._performsCompletionBlocksOnMainThread in:
        /Users/willrax/test/vendor/Pods/build-iPhoneSimulator/libPods.a(NSRConfig-BCA265D5AEE93092.o)
    duplicate symbol _OBJC_IVAR_$_NSRConfig._managesNetworkActivityIndicator in:
        /Users/willrax/test/vendor/Pods/build-iPhoneSimulator/libPods.a(NSRConfig-BCA265D5AEE93092.o)
    duplicate symbol _OBJC_IVAR_$_NSRConfig._succinctErrorMessages in:
        /Users/willrax/test/vendor/Pods/build-iPhoneSimulator/libPods.a(NSRConfig-BCA265D5AEE93092.o)
    duplicate symbol _OBJC_IVAR_$_NSRConfig._timeoutInterval in:
        /Users/willrax/test/vendor/Pods/build-iPhoneSimulator/libPods.a(NSRConfig-BCA265D5AEE93092.o)
    duplicate symbol _OBJC_IVAR_$_NSRConfig._autoinflectsClassNames in:
        /Users/willrax/test/vendor/Pods/build-iPhoneSimulator/libPods.a(NSRConfig-BCA265D5AEE93092.o)
    duplicate symbol _OBJC_IVAR_$_NSRConfig._autoinflectsPropertyNames in:
        /Users/willrax/test/vendor/Pods/build-iPhoneSimulator/libPods.a(NSRConfig-BCA265D5AEE93092.o)
    duplicate symbol _OBJC_IVAR_$_NSRConfig._ignoresClassPrefixes in:
        /Users/willrax/test/vendor/Pods/build-iPhoneSimulator/libPods.a(NSRConfig-BCA265D5AEE93092.o)
    duplicate symbol _OBJC_IVAR_$_NSRConfig._networkLogging in:
        /Users/willrax/test/vendor/Pods/build-iPhoneSimulator/libPods.a(NSRConfig-BCA265D5AEE93092.o)
    duplicate symbol _OBJC_IVAR_$_NSRConfig._basicAuthUsername in:
        /Users/willrax/test/vendor/Pods/build-iPhoneSimulator/libPods.a(NSRConfig-BCA265D5AEE93092.o)
    duplicate symbol _OBJC_IVAR_$_NSRConfig._basicAuthPassword in:
        /Users/willrax/test/vendor/Pods/build-iPhoneSimulator/libPods.a(NSRConfig-BCA265D5AEE93092.o)
    duplicate symbol _OBJC_IVAR_$_NSRConfig._oAuthToken in:
        /Users/willrax/test/vendor/Pods/build-iPhoneSimulator/libPods.a(NSRConfig-BCA265D5AEE93092.o)
    duplicate symbol _OBJC_IVAR_$_NSRConfig._additionalHTTPHeaders in:
        /Users/willrax/test/vendor/Pods/build-iPhoneSimulator/libPods.a(NSRConfig-BCA265D5AEE93092.o)
    duplicate symbol _OBJC_IVAR_$_NSRConfig._updateMethod in:
        /Users/willrax/test/vendor/Pods/build-iPhoneSimulator/libPods.a(NSRConfig-BCA265D5AEE93092.o)
    duplicate symbol _OBJC_IVAR_$_NSRConfig._managedObjectContext in:
        /Users/willrax/test/vendor/Pods/build-iPhoneSimulator/libPods.a(NSRConfig-BCA265D5AEE93092.o)
    duplicate symbol _OBJC_IVAR_$_NSRConfig._dateFormatter in:
        /Users/willrax/test/vendor/Pods/build-iPhoneSimulator/libPods.a(NSRConfig-BCA265D5AEE93092.o)
    duplicate symbol _OBJC_CLASS_$_NSRConfigStackElement in:
        /Users/willrax/test/vendor/Pods/build-iPhoneSimulator/libPods.a(NSRConfig-BCA265D5AEE93092.o)
    duplicate symbol _OBJC_METACLASS_$_NSRConfigStackElement in:
        /Users/willrax/test/vendor/Pods/build-iPhoneSimulator/libPods.a(NSRConfig-BCA265D5AEE93092.o)
    duplicate symbol _NSRRails3DateFormat in:
        /Users/willrax/test/vendor/Pods/build-iPhoneSimulator/libPods.a(NSRConfig-BCA265D5AEE93092.o)
    duplicate symbol _NSRRails4DateFormat in:
        /Users/willrax/test/vendor/Pods/build-iPhoneSimulator/libPods.a(NSRConfig-BCA265D5AEE93092.o)
    duplicate symbol _OBJC_CLASS_$_NSRConfig in:
        /Users/willrax/test/vendor/Pods/build-iPhoneSimulator/libPods.a(NSRConfig-BCA265D5AEE93092.o)
    duplicate symbol _OBJC_METACLASS_$_NSRConfig in:
        /Users/willrax/test/vendor/Pods/build-iPhoneSimulator/libPods.a(NSRConfig-BCA265D5AEE93092.o)
    duplicate symbol _OBJC_IVAR_$_NSRRemoteObject._remoteID in:
        /Users/willrax/test/vendor/Pods/build-iPhoneSimulator/libPods.a(NSRRemoteObject-8FBFC93A9CF7F98E.o)
    duplicate symbol _OBJC_IVAR_$_NSRRemoteObject._remoteAttributes in:
        /Users/willrax/test/vendor/Pods/build-iPhoneSimulator/libPods.a(NSRRemoteObject-8FBFC93A9CF7F98E.o)
    duplicate symbol _OBJC_IVAR_$_NSRRemoteObject._remoteDestroyOnNesting in:
        /Users/willrax/test/vendor/Pods/build-iPhoneSimulator/libPods.a(NSRRemoteObject-8FBFC93A9CF7F98E.o)
    duplicate symbol _OBJC_CLASS_$_NSRRemoteObject in:
        /Users/willrax/test/vendor/Pods/build-iPhoneSimulator/libPods.a(NSRRemoteObject-8FBFC93A9CF7F98E.o)
    duplicate symbol _OBJC_METACLASS_$_NSRRemoteObject in:
        /Users/willrax/test/vendor/Pods/build-iPhoneSimulator/libPods.a(NSRRemoteObject-8FBFC93A9CF7F98E.o)
    duplicate symbol _OBJC_IVAR_$_NSRRequest._route in:
        /Users/willrax/test/vendor/Pods/build-iPhoneSimulator/libPods.a(NSRRequest-B90541857AA69B65.o)
    duplicate symbol _OBJC_IVAR_$_NSRRequest._body in:
        /Users/willrax/test/vendor/Pods/build-iPhoneSimulator/libPods.a(NSRRequest-B90541857AA69B65.o)
    duplicate symbol _OBJC_IVAR_$_NSRRequest._httpMethod in:
        /Users/willrax/test/vendor/Pods/build-iPhoneSimulator/libPods.a(NSRRequest-B90541857AA69B65.o)
    duplicate symbol _OBJC_IVAR_$_NSRRequest._config in:
        /Users/willrax/test/vendor/Pods/build-iPhoneSimulator/libPods.a(NSRRequest-B90541857AA69B65.o)
    duplicate symbol _OBJC_IVAR_$_NSRRequest._queryParameters in:
        /Users/willrax/test/vendor/Pods/build-iPhoneSimulator/libPods.a(NSRRequest-B90541857AA69B65.o)
    duplicate symbol _OBJC_IVAR_$_NSRRequest._additionalHTTPHeaders in:
        /Users/willrax/test/vendor/Pods/build-iPhoneSimulator/libPods.a(NSRRequest-B90541857AA69B65.o)
    duplicate symbol _NSRRequestObjectKey in:
        /Users/willrax/test/vendor/Pods/build-iPhoneSimulator/libPods.a(NSRRequest-B90541857AA69B65.o)
    duplicate symbol _NSRErrorResponseBodyKey in:
        /Users/willrax/test/vendor/Pods/build-iPhoneSimulator/libPods.a(NSRRequest-B90541857AA69B65.o)
    duplicate symbol _NSRRemoteErrorDomain in:
        /Users/willrax/test/vendor/Pods/build-iPhoneSimulator/libPods.a(NSRRequest-B90541857AA69B65.o)
    duplicate symbol _NSRMissingURLException in:
        /Users/willrax/test/vendor/Pods/build-iPhoneSimulator/libPods.a(NSRRequest-B90541857AA69B65.o)
    duplicate symbol _NSRNullRemoteIDException in:
        /Users/willrax/test/vendor/Pods/build-iPhoneSimulator/libPods.a(NSRRequest-B90541857AA69B65.o)
    duplicate symbol _OBJC_CLASS_$_NSRRequest in:
        /Users/willrax/test/vendor/Pods/build-iPhoneSimulator/libPods.a(NSRRequest-B90541857AA69B65.o)
    duplicate symbol _OBJC_METACLASS_$_NSRRequest in:
        /Users/willrax/test/vendor/Pods/build-iPhoneSimulator/libPods.a(NSRRequest-B90541857AA69B65.o)
    ld: 41 duplicate symbols for architecture i386
    clang: error: linker command failed with exit code 1 (use -v
    
    opened by willrax 2
Lightweight Networking and Parsing framework made for iOS, Mac, WatchOS and tvOS.

NetworkKit A lightweight iOS, Mac and Watch OS framework that makes networking and parsing super simple. Uses the open-sourced JSONHelper with functio

Alex Telek 30 Nov 19, 2022
SwiftSoup: Pure Swift HTML Parser, with best of DOM, CSS, and jquery (Supports Linux, iOS, Mac, tvOS, watchOS)

SwiftSoup is a pure Swift library, cross-platform (macOS, iOS, tvOS, watchOS and Linux!), for working with real-world HTML. It provides a very conveni

Nabil Chatbi 3.7k Dec 28, 2022
Asynchronous socket networking library for Mac and iOS

CocoaAsyncSocket CocoaAsyncSocket provides easy-to-use and powerful asynchronous socket libraries for macOS, iOS, and tvOS. The classes are described

Robbie Hanson 12.3k Jan 8, 2023
This generic SOAP client allows you to access web services using a your iOS app, Mac OS X app and AppleTV app.

This generic SOAP client allows you to access web services using a your iOS app, Mac OS X app and Apple TV app. With this Framework you can create iPh

Prioregroup.com 479 Nov 22, 2022
Conforming WebSocket (RFC 6455) client library for iOS and Mac OSX

SwiftWebSocket Conforming WebSocket (RFC 6455) client library for iOS and Mac OS

null 0 Dec 24, 2021
A remote for your IR devices for iOS and Mac!

Command your TV, Apple TV or Receiver with your Mac/iOS device through iTach. Screenshots On iOS: On Mac (notification center): How to use Buy a iTach

Michael Villar 19 Nov 4, 2022
A communication channel from your Mac to your watch.

Stargate A communication channel from your Mac to your watch. Providing a convenient wrapper around MMWormhole and PeerKit, Stargate leverages Multipe

Contentful 135 Jun 29, 2022
Easy to use CFNetwork wrapper for HTTP requests, Objective-C, Mac OS X and iPhone

ASIHTTPRequest is an easy to use wrapper around the CFNetwork API that makes some of the more tedious aspects of communicating with web servers easier

Ben Copsey 5.8k Dec 14, 2022
A peer to peer framework for OS X, iOS and watchOS 2 that presents a similar interface to the MultipeerConnectivity framework

This repository is a peer to peer framework for OS X, iOS and watchOS 2 that presents a similar interface to the MultipeerConnectivity framework (which is iOS only) that lets you connect any 2 devices from any platform. This framework works with peer to peer networks like bluetooth and ad hoc wifi networks when available it also falls back onto using a wifi router when necessary. It is built on top of CFNetwork and NSNetService. It uses the newest Swift 2's features like error handling and protocol extensions.

Manav Gabhawala 93 Aug 2, 2022
Shawn Frank 2 Aug 31, 2022
OAuth2 framework for macOS and iOS, written in Swift.

OAuth2 OAuth2 frameworks for macOS, iOS and tvOS written in Swift 5.0. ⤵️ Installation ?? Usage ?? Sample macOS app (with data loader examples) ?? Tec

Pascal Pfiffner 1.1k Jan 8, 2023
Socket framework for Swift using the Swift Package Manager. Works on iOS, macOS, and Linux.

BlueSocket Socket framework for Swift using the Swift Package Manager. Works on iOS, macOS, and Linux. Prerequisites Swift Swift Open Source swift-5.1

Kitura 1.3k Dec 26, 2022
iOS Network monitor/interceptor framework written in Swift

NetShears NetShears is a Network interceptor framework written in Swift. NetShears adds a Request interceptor mechanisms to be able to modify the HTTP

Divar 119 Dec 21, 2022
A delightful networking framework for iOS, macOS, watchOS, and tvOS.

AFNetworking is a delightful networking library for iOS, macOS, watchOS, and tvOS. It's built on top of the Foundation URL Loading System, extending t

AFNetworking 33.3k Jan 5, 2023
RestKit is a framework for consuming and modeling RESTful web resources on iOS and OS X

RestKit RestKit is a modern Objective-C framework for implementing RESTful web services clients on iOS and Mac OS X. It provides a powerful object map

The RestKit Project 10.2k Dec 29, 2022
A little and powerful iOS framework for intercepting HTTP/HTTPS Traffic.

A little and powerful iOS framework for intercepting HTTP/HTTPS Traffic.

Proxyman 867 Dec 29, 2022
Frp Client Framework for iOS

Frp Client Framework for iOS README | 中文文档 base on https://github.com/fatedier/frp v0.37.1(the lastest at 2021.10) ios framework,it can run on your ip

zhouhao 5 Dec 13, 2022
NWReachability - a pure Swift library for monitoring the network connection of iOS devices using Apple's Network framework.

NWReachability is a pure Swift library for monitoring the network connection of iOS devices using Apple's Network framework.

null 4 Dec 2, 2022
Open source SDK to quickly integrate subscriptions, stop worring about code maintenance, and getting advanced real-time data. Javascript / iOS glue framework

Open source SDK to quickly integrate subscriptions, stop worring about code maintenance, and getting advanced real-time data. Javascript / iOS glue framework

glassfy 5 Nov 7, 2022