Giter VIP home page Giter VIP logo

hprose-objc's Introduction

Hprose

Hprose for Objective-C

Join the chat at https://gitter.im/hprose/hprose-objc Version License Platform

Hprose is a High Performance Remote Object Service Engine.

It is a modern, lightweight, cross-language, cross-platform, object-oriented, high performance, remote dynamic communication middleware. It is not only easy to use, but powerful. You just need a little time to learn, then you can use it to easily construct cross language cross platform distributed application system.

Hprose supports many programming languages, for example:

  • AAuto Quicker
  • ActionScript
  • ASP
  • C++
  • Dart
  • Delphi/Free Pascal
  • dotNET(C#, Visual Basic...)
  • Golang
  • Java
  • JavaScript
  • Node.js
  • Objective-C
  • Perl
  • PHP
  • Python
  • Ruby
  • ...

Through Hprose, You can conveniently and efficiently intercommunicate between those programming languages.

This project is the implementation of Hprose for Objective-C.

Example

To run the example project, clone the repo, and run pod install from the examples directory first.

Installation

hprose is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "hprose"

License

Hprose is available under the MIT license. See the LICENSE.md file for more info.

hprose-objc's People

Contributors

aijun198600 avatar andot avatar gitter-badger avatar gogames avatar kakuchichi avatar on99 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hprose-objc's Issues

关于hprose中的service类问题

我看到Java中有一个类是HproseService 但是我看iOS的框架里面只有HproseClient 请问一下iOS这个框架可以做服务端吗?

Xcode 6 build failed,HproseClient.m have 20 errors

code:

import <Foundation/Foundation.h>

import "Hprose.h"

@protocol Hello

  • (NSString *)hello:(NSString *)name;
    @EnD

int main(int argc, const char * argv[]) {
@autoreleasepool {
id client = [HproseHttpClient client:@"http://www.hprose.com/example/"];
id helloClient = [client useService:@protocol(Hello)];
NSLog(@"%@", [helloClient hello:@"World"]);
}
return 0;
}

error(HproseClient.m):objc_msgSend(delegate, onError, _name, e);
Semantic Issue:Too many arguments to function call,expected 0,hava 4

关于promise then的回调

请问获取token后一直不走里面的回调是什么原因

  • (Promise *) then:(id (^)(id))onfulfill catch:(id (^)(id))onreject {
    Promise * next = [Promise promise];
    @synchronized(_subscribers) {
    if (_state == FULFILLED) {
    promise_resolve(next, onfulfill, _result);
    }
    else if (_state == REJECTED) {
    promise_reject(next, onreject, _reason);
    }
    else {
    [_subscribers addObject:[Subscriber subscriber:next success:onfulfill fail:onreject]];
    }
    }
    return next;
    }

在登陆成功后一直走_subscribers addObject:方法,请问这个应该怎么解决呢

如何使用postman模拟发送请求

如何使用postman模拟hprose-oc客户端 向 hprose php的服务端 发送请求;尝试多次 失败;求解
1.设置了 服务器地址
2.设置了post参数

点击send
提示 系统发生错误

UIKIT_EXTERN not defined in Swift-based project for iOS

In Promise.h, the macro PROMISE_QUEUE is dependent on definition (or the lack of) macro UIKIT_EXTERN. In a Swift based project built with recent SDKs, UIKIT_EXTERN is not imported from ObjC headers, leading to potential race conditions upon promise fulfillment and non-main-thread call to UI API issues.

(protocol's function name contains '_',it will lead to crash)接口方法名中含有'_'字符会导致崩溃

服务器端定义方法名中包含"_"下划线,比如friends_notice,但是Hprose客户端中,object-c中是解析为名称空间,然后导致程序崩溃错误。
错误信息(error information):Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[NSMethodSignature signatureWithObjCTypes:]: type signature is NULL.'
错误处为:HproseClientProxy.m
有什么方法可以使用带有下划线的方法名呢?

使用时,HproseHttpClient 时,服务器无返回数据 ,界面就全部卡主

  • (HproseClient_) sharedHPClient{
    static HproseClient *sharedHPClient = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
    NSString
    webHost = API_HOST;
    _sharedHPClient = [[HproseHttpClient alloc] init:webHost];
    [_sharedHPClient setDelegate:self];
    [_sharedHPClient setOnError:@selector(errorHandler:withException:)];
    [_sharedHPClient setFilter:[LogFilter new]];
    });
    return _sharedHPClient;
    }

    [[HttpClient sharedHPClient] invoke:GetStatistics withArgs:@[text] block:^(id responseString, NSArray * params) {

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.