Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View corinnekrych's full-sized avatar
🐝

corinnekrych corinnekrych

🐝
View GitHub Profile
// AGSyncPipe protocol
@protocol AGSyncPipe
// to dicuss: conflict callback could also have baseObject for 3 ways merge options
-(void) save:(AGSyncMetaData*) object
success:(void (^)(id responseObject))success
failure:(void (^)(NSError *error))failure
conflict:(void (^)(NSError *error, AGSyncMetaData* fromObject, AGSyncMetaData* toObject))conflict;
-(void) read:(void (^)(id responseObject))success
failure:(void (^)(NSError *error))failure;
// AGSyncPipe protocol
@protocol AGSyncPipe
// to dicuss: conflict callback could also have baseObject for 3 ways merge options
-(void) save:(AGSyncObject*) object
success:(void (^)(id responseObject))success
failure:(void (^)(NSError *error))failure
conflict:(void (^)(NSError *error, AGSyncObject* fromObject, AGSyncObject* toObject))conflict;
-(void) read:(void (^)(id responseObject))success
failure:(void (^)(NSError *error))failure;
onDeviceReady: function() {
app.receivedEvent('deviceready');
console.log(':::::::::::::::::::::::::::::::::::::::::DEVICE READY');
var pushConfig = {
// senderID is only used in the Android/GCM case
senderID: "107028882733",
pushServerURL: "https://judconpush-sblanc.rhcloud.com/",
variantID: "d366b4df-a9bc-4a16-a4f2-8884d094cc19",
variantSecret: "XXXXXXX",
alias: "corinne"
curl -3 -u "4106d2d1-0549-4dbe-8134-88f27cf25d1b:34373832-e82e-4a4e-b6ed-55cda5555c75" -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{
"message": {
"alert":"HELLO!"
}
}' https://judconpush-sblanc.rhcloud.com/rest/sender
D/CordovaLog(13484): file:///android_asset/www/js/index.js: Line 39 : :::::::::::::::::::::::::::::::::::::::::DEVICE READY
I/Web Console(13484): :::::::::::::::::::::::::::::::::::::::::DEVICE READY at file:///android_asset/www/js/index.js:39
V/PushPlugin(13484): execute: action=register
V/PushPlugin(13484): execute: data=[{"pushConfig":{"senderID":"107028882733","variantID":"d366b4df-a9bc-4a16-a4f2-8884d094cc19","variantSecret":"d565cace-ab1b-4898-b4a6-f5ddf4242135","alias":"corinne","pushServerURL":"https:\/\/judconpush-sblanc.rhcloud.com\/"},"ecb":"onNotification","sound":"true","badge":"true"}]
V/PushPlugin(13484): execute: jo={"pushConfig":{"senderID":"107028882733","variantID":"d366b4df-a9bc-4a16-a4f2-8884d094cc19","variantSecret":"d565cace-ab1b-4898-b4a6-f5ddf4242135","alias":"corinne","pushServerURL":"https:\/\/judconpush-sblanc.rhcloud.com\/"},"ecb":"onNotification","sound":"true","badge":"true"}
V/PushPlugin(13484): execute: ECB=onNotification
D/dalvikvm(13484): GC_CONCURRENT freed 218K, 51% free 2
ls-la /Users/corinne/.rvm/rubies/
total 8
lrwxr-xr-x 1 corinne staff 42B Nov 15 17:40 default -> /Users/corinne/.rvm/rubies/ruby-2.0.0-p247
drwxr-xr-x 9 corinne staff 306B Sep 5 10:16 ruby-1.9.1-p431
drwxr-xr-x 8 corinne staff 272B Sep 5 10:18 ruby-1.9.2-p320
drwxr-xr-x 8 corinne staff 272B Sep 17 11:31 ruby-1.9.3-p429
drwxr-xr-x 8 corinne staff 272B Sep 17 13:30 ruby-1.9.3-p448
drwxr-xr-x 7 corinne staff 238B Sep 17 11:26 ruby-2.0.0-p0
drwxr-xr-x 9 corinne staff 306B Nov 15 16:36 ruby-2.0.0-p247

iOS app for Java developer

(devoxx uk) You boss said: "I need an iPhone version". And you're a Java guy...

So, that's mean: Objective-C! You're scared of this barbarian syntax? Relax Objective-C is a cool dude. Xcode is not a bad guy, he’ll help you. And if you want to stay in known territory: AppCode is here. Using template, you get up and running in no time. UI designing with interface builder and storyboard are dead easy to start with. Your app has to be connected to your enterprise cloud-based server application? No worries, all the plumbing for accessing REST services feels fluent using iOS AeroGear libraries.

Join us to follow the tribulations of a Java guy in the world of iOS programming. And of course, the unbearable suspense: will he get his iOS app on time?

Easy enterprise mobile app

@corinnekrych
corinnekrych / gist:9687218
Last active August 29, 2015 13:57
NSSpain submission

Let's practise OAuth2 dance !

You want to build a cool iOS app to share your photos on Twitter, Googgle+, Facebook... Tackle all the 'cool' social networks. First thing you need to do is: authenticate and authorize your app for each providers.

Good news is: there is a common protocol for that. Its little name is 'OAuth2'. Each provider comes with an iOS sdk to ease the OAuth2 dance, but of course, each has its own API.

Ouch! And what you really want is use the same API for all them. Let's see how you can implement OAuth2 protocol and provide a common API across providers. Much easier than his elder brother OAuth, we will dive into OAuth2 protocol and see the challenges of implementing it from a native app perspective.

Enterprise SSO / OAuth2 without stress

If you think security topic is hard to tackle, join me in this interactive session. This is a journey in the wolrd of SSO and OAuth2, we will see in a step by step approach how to build a complete app from server side to mobile client.

@corinnekrych
corinnekrych / gist:10101749
Created April 8, 2014 08:29
Développer une application mobile native ou hybride sans effort
Aujourd’hui, c'est un fait: les ventes de smartphones et de tablets sont prédominantes face aux traditionnels desktops. Les applications d'entreprise se mettent au mobile.
AeroGear est un ensemble de librairies pour le Mobile et l'Entreprise, développé par JBoss. Le focus porte sur trois domaines essentiels : Persistance, Sécurité et Connectivité. Lors de cette présentation, nous vous monterons comment les librairies AeroGear tentent de résoudre ces problèmes. Comment elles permettent aux développeurs d'accéder facilement aux composants côté serveur (endpoints REST) tout en utilisant côté client, une API commune à de multiples plates-formes mobiles telles que JavaScript/ HTML5, Android et iOS.
Nous présenterons également le composant "Unified Push Server" qui permet de facilement mettre en place une solution de notification push cross plate-forme.