我想在模拟器或在服务器上。
例如=>服务器名称
- 在模拟器上=> localhost
- 在Real Device => MyServer.com 上
目前,我的环境是钛。
但是,我想知道在Xcode上可能。
这对我来说可能是一个很好的提示,如果iMopposible onxcode,在钛中也是不可能的。
for android
Build.FINGERPRINT.startsWith("generic")
iOS
#define SIM(x) if ([[[UIDevice currentDevice].model lowercaseString] rangeOfString:@"simulator"].location != NSNotFound){x;}
SIM(NSLog(@"This will only be logged if the device is simulated"));