Emme Developer Well-Known Member Licensed User Longtime User May 28, 2017 #1 Hi everybody! There is a way to get iPhone model (like iphone 4g, iphone 7 etc) on b4i? I'm not able to work using inline obj-c, but i found this. As wrote in the post, he used this to get what i want: B4X: #import <sys/utsname.h> // import it in your header or implementation file. NSString* deviceName() { struct utsname systemInfo; uname(&systemInfo); return [NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding]; }
Hi everybody! There is a way to get iPhone model (like iphone 4g, iphone 7 etc) on b4i? I'm not able to work using inline obj-c, but i found this. As wrote in the post, he used this to get what i want: B4X: #import <sys/utsname.h> // import it in your header or implementation file. NSString* deviceName() { struct utsname systemInfo; uname(&systemInfo); return [NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding]; }
Erel B4X founder Staff member Licensed User Longtime User May 29, 2017 #2 https://www.b4x.com/android/forum/t...ad-the-device-model-number.69602/#post-441675 Upvote 0
Emme Developer Well-Known Member Licensed User Longtime User May 29, 2017 #3 Thanks Erel, i did not find it on forum when I tried to search it. I think you should to add it on code snippet section Upvote 0
Thanks Erel, i did not find it on forum when I tried to search it. I think you should to add it on code snippet section
Erel B4X founder Staff member Licensed User Longtime User May 29, 2017 #4 Emme Developer said: I think you should to add it on code snippet section Click to expand... Be my guest Upvote 0
Emme Developer said: I think you should to add it on code snippet section Click to expand... Be my guest