1. Open the official website of Xiong Mai :https://open.xmeye.net
2. Enter the background, create an app, get uuid, AppKey, Appsecret, and Movecard four values.
Register as a developer -"complete information -" Add app app -"Pending review -" Start and test
3, download the SDK: Open platform-"Resource Center -" Download Center -"funsdk-" Download iOS version
4. Import the SDK
Description of the "1" SDK file
Funsdk.framework
"2" in the project to import the male third-party library, add system-dependent library
Funsdk.framework, Openal.framework, Libresolv, Libiconv, libbz2, Libz
"3" Build setting configuration parameters in the project
1. Build Active architure Only:yes
2. Enable Bitode:no
3. Enable Testability:no
4. Other Linker Flags:-O BJC
5, C Language Dialect:compiler Default
6. C + + Language Dialect:compiler Default
7. C + + standard Library:compiler Default
8, preprocessor macros:debug:debug=1 Os_ios=1 formal=1
Release:os_ios=1 formal=1
"4" Add other system dependent libraries
Avkit, Assetslibrary, Usernotification, Audiotoolbox, CoreMedia, OpenAL, MediaPlayer, Avfoundation, Opengles, GLKit, Videotoolbox, Libz.tbd, Libstdc++.6.0.9.tbd, LIBZ2.TBD, LIBRESOLV.TBD
"5" NOTE: If you need to integrate Fisheye device users, you can add fish Eye Bank libvrsoft.a. Since the funsdk provided by wemed is mixed in C + +, so needs to support C + + in all areas of the project that require this class, as well as methods. Rename the. m file that you want to use FUNSDK directly to a. mm file.
5. Basic function execution
"1" FUNSDK initialization
A> Library initialization 1:fun_init ();
B> Library initialization 2:fun_initnetsdk ();
C> Setting the app file storage path
d> setting the parameters of local login, AP mode login and peer-mode login
-(void) initfunsdk{
Sinitparam PA;
Pa.napptype = H264_dvr_login_type_mobile;
Library initialization
Fun_init (0, &PA);
Background parameters
NSString *uuid = @ "Jufeng";
NSString *appkey = @ "A16ea8f9d5164d1d830e8dbc66a71e24";
NSString *appsecret = @ "672f645441b14a259356d027a6b8853f";
int movecard = 5;
Registration API
nsstring* Strappkey = @ "6356F3673B134E53983798CFB7A0ADF3";
Nsdictionary *infodictionary = [[NSBundle mainbundle]infodictionary];
NSString *struuid = [infodictionary objectforkey:@ "Cfbundleidentifier"];
Fun_registapi ([Strappkey utf8string], [Struuid utf8string]);
Error code initialization
FUN_INITNETSDK ();
Initializing the Cloud Platform
Fun_xmcloundplatforminit ([uuid utf8string], [Appkey utf8string], [Appsecret utf8string], movecard);
Set up a data profile for storing device information, etc.
Nsarray *patharray = Nssearchpathfordirectoriesindomains (
Nscachesdirectory, Nsuserdomainmask, YES
);
NSString *path = [Patharray lastobject];
Setting the Profile storage directory
Fun_setfunstrattr (
Efun_attr_config_path, [[PATH stringbyappendingstring:@ "/configs/"] utf8string]
);
Setting up the upgrade file storage directory
Fun_setfunstrattr (
Efun_attr_update_file_path,[[path stringbyappendingstring:@ "/updates/"] utf8string]
);
Set temporary file storage directory
Fun_setfunstrattr (
Efun_attr_temp_files_path,[[path stringbyappendingstring:@ "/temps/"] utf8string]
);
To set information about a local login device where to save the file
Fun_sysinit (
[[Path stringbyappendingstring:@ "/localdevs.db"] utf8string]
);
Set up device information under AP Mode (App Direct connect device hotspot) Save file location
Fun_sysinitasapmodel (
[[Path stringbyappendingstring:@ "/apdevs.db"] utf8string]
);
Set up a cloud service
Fun_sysinit (Conststrserveraddrs, Constintserverport);
}
"2" Device Login
Regardless of which mode (local, AP, or peer-to) login log out are using the same set of login logout interface, and different login mode login device is only devid parameters;
Local login and AP mode login Devid are all filled in as "ip:port" format. For example, if the device IP address is 192.168.1.12 device TCP port set to 34567 (normal device default) then Devid is "192.168.1.12:34567". AP mode, because the device as a gateway, so devid generally filled out as "192.168.10.1:34567" this format;
The Devid is the serial number of the device, and the other interfaces that need to use the Devid parameter are the same; Call the device login interface before accessing the device:
int Fun_devlogin (
Ui_handle huser, const char *szdevid, const char *szuser, const char *szpwd, int nseq
);
Device Logout Interface:
int Fun_devlogout (Ui_handle huser, const char *szdevid);
"3" Monitoring device video playback
Device playback Live Video interface:
int Mediarealplay (
int Huser, String devId, int nchnindex, int nstreamtype, Object hWnd, int nseq
);
Device playback Video Stop interface:
int mediastop (int hplayer, int nseq = 0);
Parameter description:
Parameter 1 Huser returns the message receiver for the interface call result, and Parameter 2 devId is the device ID (log out with login). The parameter 3 Nchnindex is the channel number, starting from 0. Parameter 4 Nstreamtype is the stream type 0-main stream (high resolution) 1-sub-stream (low resolution), parameter 5 hWnd Displays the view pointer for the video. The return value is the player handle hplayer;
"4" Device alarm message
After the open platform login, go to the console page and upload the iOS certificate, please upload the iOS push certificate as required. The background will add the certificate to the server, and then follow the demo integration interface to achieve the alarm push function. (no upload certificate, invalid push function)
6. Interface description
"1" Call process
Start -"funsdk.init () -" Funsdk.regwnd ()-"funsdk.xxx () Other interfaces-" proxy method Onfunsdkresult function Print callback result-"Funsdk.unregwnd ( )-"Funsdk.uninit ()"
"2" library method
Initialize, reinitialize, initialize the service (log on locally), initialize the service (AP mode), initialize the service (cloud login), initialize the service (error code), initialize the service (error code), initiate the app certificate, initialize the server IP, and port
"3" system function method
"4" Device function method
"5" Media function method
"6" Log function method
"7" Alarm function method
"8" Advertising function method
"9" language function method
"10" JPEG turn MP4 method
"11" Cloud storage Function method
"12" DSS service-related methods
"13" Media file compilation method
"14" enumeration and struct
"15" Error code description
"16" section Configuration usage Instructions
iOS Development integrated FUNSDK video step