view.makeToastActivity(.center)
let deviceId = "281106AFB0F7"
let productKey = "HHosiYUNdG42t1cTgKOzIUPOvAVMI2QT"
- let password = "4FTYYyqtQfXrAVUAa3MfYQPtddBRZb"//注册获得的密码
+ let password = "aWGKrBWaijsKD5eEsVVU5rjWPI1sVy"//注册获得的密码
MixSdk.shared.auth.login(productKey:productKey,deviceId: deviceId, password: password){[weak self] token,error in
self?.view.hideToastActivity()
</Locations>
</BreakpointContent>
</BreakpointProxy>
- <BreakpointProxy
- BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
- <BreakpointContent
- uuid = "7633208F-F5F5-4D17-AA82-75195D3EBF4F"
- shouldBeEnabled = "Yes"
- ignoreCount = "0"
- continueAfterRunningActions = "No"
- filePath = "Example/Example/ViewController.swift"
- startingColumnNumber = "9223372036854775807"
- endingColumnNumber = "9223372036854775807"
- startingLineNumber = "96"
- endingLineNumber = "96"
- landmarkName = "loginAction()"
- landmarkType = "7">
- <Locations>
- <Location
- uuid = "7633208F-F5F5-4D17-AA82-75195D3EBF4F - 51a97ac42267ef80"
- shouldBeEnabled = "Yes"
- ignoreCount = "0"
- continueAfterRunningActions = "No"
- symbolName = "closure #1 (Swift.Optional<Swift.String>, Swift.Optional<MixSdk.MSError>) -> () in Example.ViewController.loginAction() -> ()"
- moduleName = "Example"
- usesParentBreakpointCondition = "Yes"
- urlString = "file:///Users/apple/Desktop/code/MixSdk_iOS/MixSdk/Example/Example/ViewController.swift"
- startingColumnNumber = "9223372036854775807"
- endingColumnNumber = "9223372036854775807"
- startingLineNumber = "96"
- endingLineNumber = "96"
- offsetFromSymbolStart = "1316">
- </Location>
- <Location
- uuid = "7633208F-F5F5-4D17-AA82-75195D3EBF4F - 51a97ac42267ef80"
- shouldBeEnabled = "Yes"
- ignoreCount = "0"
- continueAfterRunningActions = "No"
- symbolName = "closure #1 (Swift.Optional<Swift.String>, Swift.Optional<MixSdk.MSError>) -> () in Example.ViewController.loginAction() -> ()"
- moduleName = "Example"
- usesParentBreakpointCondition = "Yes"
- urlString = "file:///Users/apple/Desktop/code/MixSdk_iOS/MixSdk/Example/Example/ViewController.swift"
- startingColumnNumber = "9223372036854775807"
- endingColumnNumber = "9223372036854775807"
- startingLineNumber = "96"
- endingLineNumber = "96"
- offsetFromSymbolStart = "1452">
- </Location>
- </Locations>
- </BreakpointContent>
- </BreakpointProxy>
</Breakpoints>
</Bucket>
static let httpBaseURL = "https://amp.raisound.com/"
// static let authBaseURL = "http://180.184.206.142/bz-api/"
static let authBaseURL = "http://dmp.raisound.com/bz-api/"
-
+// static let authBaseURL = "http://180.184.206.142/bz-api/"
static let wsHeartBeatTime = 5.0
// static func http(api:String)->String{
return digest;
}
+
++ (NSData *)dataWithHexString:(NSString *)hexStr {
+ hexStr = [hexStr stringByReplacingOccurrencesOfString:@" " withString:@""];
+ hexStr = [hexStr lowercaseString];
+ NSUInteger len = hexStr.length;
+ if (!len) return nil;
+ unichar *buf = malloc(sizeof(unichar) * len);
+ if (!buf) return nil;
+ [hexStr getCharacters:buf range:NSMakeRange(0, len)];
+
+ NSMutableData *result = [NSMutableData data];
+ unsigned char bytes;
+ char str[3] = { '\0', '\0', '\0' };
+ int i;
+ for (i = 0; i < len / 2; i++) {
+ str[0] = buf[i * 2];
+ str[1] = buf[i * 2 + 1];
+ bytes = strtol(str, NULL, 16);
+ [result appendBytes:&bytes length:1];
+ }
+ free(buf);
+ return result;
+}
@end