Skip to content

Instantly share code, notes, and snippets.

View cvasilak's full-sized avatar

Christos Vasilakis cvasilak

View GitHub Profile

Easy enterprise iOS app

(with AeroGear)

Type: Tools in Action

Abstract: Today, it’s a fact: mobile and smartphones sales are double than personal computers. Tomorrow, enterprise applications will be mobile apps. What are the challenges of mobile apps: accessing RESTful services, paging, data storage, security features... But not only your device interacts with cloud services, enterprise applications interact with registered devices providing you valuable contextual information. How do you unified push notifications across different platforms?

Easy enterprise iOS app

(with AeroGear)

Type: Tools in Action

Abstract: Today, it’s a fact: mobile and smartphones sales are double than personal computers. Tomorrow, enterprise applications will be mobile apps. What are the challenges of mobile apps: accessing RESTful services, paging, data storage, security features... But not only your device interacts with cloud services, enterprise applications interact with registered devices providing you valuable contextual information.

cvasilak-MacBook-Pro:~ cvasilak$ curl --verbose -H "Accepts:application/json" "localhost:8080/aerogear-controller-demo/cars?color=black&offset=0&limit=5"
* About to connect() to localhost port 8080 (#0)
* Trying 127.0.0.1...
* connected
* Connected to localhost (127.0.0.1) port 8080 (#0)
> GET /aerogear-controller-demo/cars?color=black&offset=0&limit=5 HTTP/1.1
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8r zlib/1.2.5
> Host: localhost:8080
> Accept: */*
> Accepts:application/json
e.g.
-----
AGPipeline* pipeline = [AGPipeline pipelineWithBaseURL:BASE_SOCCER_APP_URL];
id<AGPipe> leagues = [pipeline pipe:^(id<AGPipeConfig> config) {
[config setName:@"leagues"];
[config setNestedPipes:[@"teams", @"players"]; // an array of nested resources for this pipe
}];
-----
- (void)postPath:(NSString *)path
parameters:(NSDictionary *)parameters
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure {
NSURLRequest* request = [self requestWithMethod:@"POST" path:path parameters:parameters];
AFHTTPRequestOperation* operation = [self HTTPRequestOperationWithRequest:request success:success failure:failure];
void (^timeout)(void) = ^ {
[operation cancel];
/*
* JBoss, Home of Professional Open Source.
* Copyright Red Hat, Inc., and individual contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
//
// ViewController.m
// TimeoutNSURLConnection
//
// Created by Christos Vasilakis on 2/19/13.
// Copyright (c) 2013 Christos Vasilakis. All rights reserved.
//
#import "ViewController.h"
package com.mkyong.rest;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.FormParam;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.core.Response;
//http://localhost:8080/RESTfulExample/rest/message/hello%20world
#import "AGPropertyListStorage.h"
@implementation AGPropertyListStorage {
NSString* _file;
}
@synthesize type = _type;
+(id) storeWithConfig:(id<AGStoreConfig>) storeConfig {
return [[self alloc] initWithConfig:storeConfig];
xcodeproj 'AeroGear-iOS-Integration.xcodeproj'
platform :ios
pod 'AeroGear', :podspec => 'https://raw.github.com/aerogear/aerogear-ios/master/AeroGear.podspec'
target 'AeroGear-iOS-IntegrationTests', :exclusive => true do
pod 'Kiwi'
end