Latest 0.1.0
Homepage https://github.com/lm2s/MEOCloudSDK
License MIT
Platforms ios 7.0, requires ARC
Dependencies AFNetworking, BDBOAuth1Manager
Authors

MEOCloud SDK is a library for iOS (and soon OS X) that makes it easy to use the MEOCloud services.

Installation

Using CocoaPods:

platform :ios, '7.0'
pod "MEOCloudSDK", "~> 0.1.0"

Usage

Session

Register your application URL scheme in the Xcode project settings (Tutorial).

Then on your application delegate (e.g.: AppDelegate.m) implement the following:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // (...)
    NSString *kClientID = @"YOUR_CONSUMER_KEY";
    NSString *kClientSecret = @"YOUR_SECRET";
    NSString *kUrlScheme = @"YOUR_URL_SCHEME://success";

    MCSession* session = [[MCSession alloc] initWithKey:kClientID secret:kClientSecret urlScheme:kUrlScheme sandbox:NO];
    session.sharedSession = session;
    // (...)
}
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
    return [[MCSession sharedSession] handleAuthorizationCallbackURL:url];
}

Client

You are now ready to use the SDK. Try to get all the metadata at the root:

MCClient* cloudClient = [[MCClient alloc] initWithSession:[MCSession sharedSession]];
[cloudClient metadataAtPath:@"/" success:^(NSArray *metadata) {
    for (MCMetadata* m in metadata) {
            NSLog(@"%@ - %@", m.path, m.size);
    }
 } failure:^(NSError *error) {
        NSLog(@"ERROR: %@", error);
 }];

More

See the documentation for all the available methods.

Contact

Follow me on Twitter (@_lm2s)

License

MEOCloud SDK for iOS is available under the MIT License. See the LICENSE file for more info.

MEO is a registered trademark of MEO – Serviços de Comunicações e Multimédia, S.A.

Latest podspec

{
    "name": "MEOCloudSDK",
    "version": "0.1.0",
    "summary": "An iOS framework for using MEOCloud API in a simple and easy way.",
    "homepage": "https://github.com/lm2s/MEOCloudSDK",
    "license": "MIT",
    "authors": {
        "Luu00eds M. Marques Silva": "[email protected]"
    },
    "source": {
        "git": "https://github.com/lm2s/MEOCloudSDK.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": [
        "MEOCloudSDK/*.{h,m}",
        "MEOCloudSDK/Model/*.{h,m}",
        "MEOCloudSDK/AFDownloadRequestOperation/*.{h,m}"
    ],
    "dependencies": {
        "AFNetworking": [
            "~> 2.5"
        ],
        "BDBOAuth1Manager": [
            "~> 1.5.0"
        ]
    }
}

Pin It on Pinterest

Share This