Comments (15)
Bravo ! It works!! Good job, thanks a lot 👍👍👍 @dannycabrera
from get-ios-model.
Hi @jinnan, what iPad do you have and could you please give the model # on the back of your iPad. Should be something like A1432 (this is for my iPad mini). Thanks
from get-ios-model.
hi @dannycabrera I've tested on 2 iPads, their Model# are : A1474 and A1566
from get-ios-model.
@jinnan what iOS version are you running?
from get-ios-model.
@dannycabrera iOS 10.3.3 for A1566 and iOS 9.3.5 for A1474
from get-ios-model.
@dannycabrera I juste tested on my iPhone6S (iOS 10.3.3), it didn't work neither, I got the same exception.
from get-ios-model.
@jinnan likely related to the type (Xamarin-PCL structure project) of project. sysctlbyname is failing. Will check into it.
from get-ios-model.
@dannycabrera Ok, I'll wait for your good news, thank you :)
from get-ios-model.
I've just tried it out by calling the NuGet from an iOS app and it works. You shouldn't be able to add this package to a PCL, so maybe we ned to change the NuGet to only install into Xamarin.iOS projects?
from get-ios-model.
@jimbobbennett agree, not sure this belongs in a PCL. Still new to creating nuget packages so do you know what needs to change to only allow Xamarin.iOS projects? Thanks
Also, already have the iPhone 8, 8 Plus and X ready to go, just waiting on the hardware strings.
from get-ios-model.
hi @jimbobbennett
I haven't try it in a single iOS project, but I believe it works well. In my PCL structure, the package is only available for iOS project, so I just added it to my iOS project. I added an abstract class in PCL project so I can call the funcrion from PCL. Also, I tried to call it directly in delegate page of iOS project during the initialization, and I got same exception.
I'll try it in a new PCL project later, there should be something different between single iOS project and PCL structure project.
from get-ios-model.
Hi again @dannycabrera @jimbobbennett
I created a new PCL structure project and a new project iOS, resp. None of them worked with the package....
In detail:
- In Visual Studio Community for Mac, File-> New Solution... -> iOS App -> Single View App
- Add the package from Nuget to the project
- I put "Console.WriteLine(Xamarin.iOS.DeviceHardware.Model);" in ViewDidLoad
The function is called, but I still got "Unkown" and the same exception
Did I do something wrong?
from get-ios-model.
@jinnan was able to replicate issue on Single View App. Have an idea on what it could be so let me test out a few things. Keep you posted.
from get-ios-model.
@jinnan I pushed package v1.1 to nuget and should get indexed here in a bit so be on the lookout. Let me know if that works.
from get-ios-model.
Weird issue, all I did was rebuild package and that did the trick. Glad it works now and thanks for reporting it.
from get-ios-model.
Related Issues (20)
- iPhone5,2 wrong Identifier String HOT 1
- Not able to detect the simulator model version HOT 5
- Apple store App reject reading via Marshal the hw.machine property (?) HOT 1
- iPhone XS, XR, and XS Max HOT 3
- Mapping from model to chip type HOT 1
- [Enhancement] .NET Standard support HOT 4
- iPhone 11 codes HOT 1
- Unable to install Nuget package version 1.11.0 HOT 5
- No license HOT 4
- iPhone SE 2nd Gen hardware string and model name? HOT 2
- Proposal: JSON meta for lookup HOT 2
- ChipType not visible HOT 1
- Values in iOS App not matching samples HOT 3
- iPhone 12 references HOT 3
- Add support for iOS app running on macOS M1 computers HOT 1
- iPhone 13/14 references (incl. new iPad) HOT 6
- iPhone 7 & iPhone 7 Plus Hardware Strings HOT 3
- Any plans for a NuGet? HOT 12
- iOSHardware class should be public HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from get-ios-model.