Leverage the MediaFire Platform to connect with millions of MediaFire users around the world and add powerful features to your iOS or Mac OSX app.
Full documentation available here: MediaFire Developers
- Get the latest source from GitHub by either downloading as a zip file or by cloning the repository at
https://github.com/MediaFire/mediafire-objectivec-sdk.git
. - Create a new Xcode project or open an existing project.
- Drag the MediaFireSDK Xcode Project file
MediaFireSDK.xcodeproj
into your Xcode Project Navigator. Or add it using 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
inAppDelegate.m
#import "MediaFireSDK/MediaFireSDK.h"
- Add the following configuration code to your
AppDelegate.m
withindidFinishLaunchingWithOptions
orapplicationDidFinishLaunching
[MediaFireSDK createWithConfig:@{@"app_id" : @"<your app id>", @"api_key" : @"<your api key>"}];
- 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 (⌥⇧⌘K) and try again.
Two demo projects are included for example usage.
In AppDelegate.m
, replace <your app id>
with your app id. And replace <your api key>
with your generated api key or a blank
string if "Require Secret Key" is disabled in your developer profile. Visit https://www.mediafire.com/developers for more information.
In AppDelegate.m
, replace <your app id>
with your app id. And replace <your api key>
with your generated api key or a blank
string if "Require Secret Key" is disabled in your developer profile. Visit https://www.mediafire.com/developers for more information.
In the MediafireSDK Project under "Build Settings" change "Base SDK" to OS X 10.9
or later.
Developed for use with iOS 7.0+ and OSX 10.9+