Is there way to check device model in Apportable SDK? -
i have implement special behaviour particular device model. need check device model.
i'm using
[uidevice currentdevice] name];
but it's return me
nexus 7 running apportable
i think it's kind of weird result. other way it?
use [[uidevice currentdevice] nativemodel]
nslog(@"%@", [[uidevice currentdevice] nativemodel]);
will generate d/spin ( 3956): 2014-04-14 09:44:21.446 spin[3956:2752] nexus 7
in logcat output
there more information uidevice api extensions in .apportable/sdk/system/uikit/uidevice.h
apportable typically makes api decisions ios ports seamless possible. if want android specific result, non-ios api extension created.
here details on uidevice.h mappings android build api's:
@property (nonatomic, readonly) nsstring *nativesystemname; -> @"android" @property (nonatomic, readonly) nsstring *nativecpuabi; -> build.cpu_abi @property (nonatomic, readonly) nsstring *nativemodel; -> build.model @property (nonatomic, readonly) nsstring *nativeproduct; -> build.product @property (nonatomic, readonly) nsstring *nativemanufacturer; -> build.manufacturer @property (nonatomic, readonly) nsstring *nativesystemversion; -> build.release @property (nonatomic, readonly) nsuinteger nativesdkversion; -> build.sdk_int
Comments
Post a Comment