BasicsObjective C

Overview



Description : This rich framework provides the flexibility and simplicity you will need to connect with millions of MediaFire users around the world while also adding powerful features to your iOS or Mac OSX app.


Getting Started


Download the MediaFire Objective-C SDK
Prepare Your Project to Use MediaFire's Objective-C SDK

  • Get the latest source-code from GitHub by either downloading it as a zip file or by cloning the repository.
  • Create a new Xcode project or open an existing project.
  • Drag the MediaFireSDK Xcode Project file MediaFireSDK.xcodeproj into your Xcode Project Navigator. Alternatively, you could add it by selecting File > Add Files to Your Project.
  • Add MediaFireSDK under Target Dependencies in your Target's Build Phases.
  • Add libMediaFireSDK.a under Link Binary With Libraries in your Target's Build Phases.
  • Add Other Link Flag" -all_load under Linking in your Target's Build Settings.
  • Import MediaFireSDK.h in AppDelegate.m

#import "MediaFireSDK/MediaFireSDK.h"

  • Add the following configuration code to your AppDelegate.m within didFinishLaunchingWithOptions or applicationDidFinishLaunching

[MediaFireSDK createWithConfig:@{@"app_id" : @" <your app id&rt; ", @"api_key" : @" <your api key&rt; "}];

  • Add the following log capture function to AppDelegate.m :

extern void MFCaptureLogMessage(NSString* message) { // Use this method to capture log messages from MediaFire SDK. }

Build and run project. If errors occur, clean build folder and try again.

Demo Projects
Two demo projects are included for example usage.

iOS Demo
In AppDelegate.m, replace <your app id> with your appID. Also, replace <your api key> with your generated API Key or a blank string if Require Secret Key is disabled in your developer profile. Click here for more information.

The appID and API Key needed are created when registering as a developer.

OSX Demo
In AppDelegate.m, replace <your app id> with your appID. And replace <your api key> with your generated API Key or a blank string if Require Secret Key is disabled in your developer profile.

The appID and API Key needed are created when registering as a developer.

In the MediafireSDK Project under Build Settings change Base SDK to OS X 10.9 or later.

Usage
Developed for use with iOS 7.0+ and OSX 10.9+