License | Commercial |
ReleasedLast Release | Dec 2019 |
Maintained by Christophe AZEMAR, Xavier LELEU, Sylvain Camus, Gaël Bréard.
You can configure your project manually or with CocoaPods
Add the framework dependency to project's target.
Cocoapods setup
target :MyProject do
pod 'Webcom'
end
#import <Webcom/Webcom.h>
import Webcom
/// Webcom reference
WCWebcom * webcomRef = [[WCWebcom alloc] initWithURL:@"https://io.datasync.orange.com/base/{your-webcom-app}"];
/// Webcom reference
let webcomRef = webcom = WCWebcom(URL: "https://io.datasync.orange.com/base/{your-webcom-app}")
/// Say Hello
[webcomRef set:@"Hello World!"];
/// Say Hello
webcomRef.set("Hello World!")
/// Read
[webcomRef onEventType:WCEventTypeValue withCallback:^(WCDataSnapshot * _Nullable snapshot, NSString * _Nullable prevKey)
{
NSString * value = (NSString *)snapshot.value;
NSLog(@"%@", value);
}];
/// Read
webcomRef.onEventType(.Value , withCallback:
{
(snapshot: WCDataSnapshot?, prevKey: String?) -> Void in
if let message = snapshot?.value as? String
{
print(message)
}
}
In order to publish your application to AppStore you need to add a script to your project.