Git Product home page Git Product logo

gbdeviceinfo's People

Contributors

antimoron avatar aronhoff avatar bambuh avatar christophercotton avatar codingpub avatar cpsauer avatar croig avatar croig-bv avatar fcanas avatar gdurys avatar goncharik avatar igorrotaru avatar jalmaas-agens avatar leilee avatar lisonfan avatar lmirosevic avatar lukaswuerzburger avatar marchbold avatar mhupman avatar phillipc-myfiziq avatar qandelor avatar ricsantos avatar rist avatar rus1km avatar stevemoser avatar tesch1 avatar ustimov avatar vijayhike avatar x140yu avatar zats avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gbdeviceinfo's Issues

armv7s linker issue

Hello.

Thank you for excellent library.

I tried to use GBDeviceInfo in my project and got following issue presented on screenshot. Could you please help to resolve it. Seem it is related with using GBJailbreakDetection.framework. GBDeviceInfo with version 3.1 does not contain this one.

screen shot 2015-06-30 at 2 04 03 pm

Error to added 'GBDeviceInfo/Jailbreak'

Hi when I try to load your pod this way

pod 'GBDeviceInfo', '~> 5.5'
pod 'GBDeviceInfo / Jailbreak'

I receive the error below.
How can I solve?
Thank you

[!] The 'Pods-MYPODS' target has transitive dependencies that include static binaries: (MY_DIR/Pods/GBJailbreakDetection/GBJailbreakDetection.framework)

Carthage support

I tried to include GBDeviceInfo in my Cartfile (including the line github "lmirosevic/GBDeviceInfo" ~> 6.0 in the Cartfile, I also tried to add different lines in the Cartfile but it's always the same) but when I run carthage update --platform ios I get the following error:

Dependency "GBDeviceInfo" has no shared framework schemes for any of the platforms: iOS

What am I doing wrong to include this framework in my application through Carthage?

Support iPod

Hi. I'm getting "Unknown device" on the last gen iPod Touch. I've been debugging and the device version is (major = 7, minor = 1), but this library only supports until 5,1.

It would be nice that if you don't support a certain model, at least let us know what device it is. For example, iPad12,8 (non-existing yet) might return just iPad..

Can't install specified version of GBDeviceInfo with Cocoapods

Here is content of my Podfile:

platform :ios, '6.0'
pod 'GBDeviceInfo', '~> 3.5'
pod 'GBDeviceInfo/Jailbreak', '~> 3.5'

But after executing pod install, it responsed this:

screen shot 2016-01-21 at 10 24 49 am

Neither the search results contain the specified version 3.5, as you can see in this snapshot above.

Errors when building without precompiled headers

We incorporate the source code of the library into a large project, which we build using cmake. Since cmake doesn't officially support precompiled headers yet, we don't use them. This causes compilation errors on iOS because of a missing include for UIKit, which is only included from the PCH file. It's trivial to fix and we patched the code, but I wanted to let you know about this use case. Maybe you'll want to do something about it so the library can be used flawlessly in cmake/non-PCH setups.

bitcode support

ld: bitcode bundle could not be generated because '.../Pods/GBJailbreakDetection/GBJailbreakDetection.framework/GBJailbreakDetection(GBJailbreakDetection.o)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build for architecture armv7

xcode 7.0.1

Any plans for tvos support?

I have used GBDeviceInfo in alot of projects over the years. However, in a recent project that had alot of common code between iOS and TVOS, i had to remove the pod. Do you have any plans for adding TVOS support?

Identifying Apple Watch?

First, thanks! GBDeviceInfo has served us well for a while now

I am curious if the Apple Watch is something that can be identified?

I know there's a bit of a strange case because the watch extensions run on the phone, so technically it's still being executed on an iPhone. Any insight/thoughts on this?

Thanks again!

CocoaPods can't add version 3.5? Can you do me a favor to fix it?

Hi, in my podfile I type the line

pod 'GBDeviceInfo', '~> 3.5' 

just as you said in github. But can't install successfully. here are the error information:

[!] Unable to satisfy the following requirements:
- `GBDeviceInfo (~> 3.5)` required by `Podfile`

I need this project in my App to adapt the newest iPhone 6S and Plus. Thanks!

OS X retina resolution

Please fix OS X retina resolution

        NSScreen *mainScreen = [NSScreen mainScreen];
        NSRect rect = [mainScreen convertRectToBacking:mainScreen.frame];

Unable to use via Cocoapods with use_frameworks!

Cocoapods is now able to build pods as dynamic frameworks, which is necessary for compiling Swift dependencies. I just tried updating GBDeviceInfo, but get this error:

[!] The 'Pods-Foo' target has transitive dependencies that include static binaries: (/[PATH_TO_FOO]/Pods/GBJailbreakDetection/GBJailbreakDetection.framework)

git submodule

im trying to add this as a git submodule but i cannot. i added it as a submodule. then i added the .a file in the requred linked frameworks. then i import the header file but i get file not found.

Not working on iPad simulator ?

It's look like this lib is not working on iOS iPad simulator:

I executed this code on iPad Pro (10.5-inch) simulator 10.3.1:
if GBDeviceInfo.deviceInfo().family == .familyiPad {
print("IPAD")
}
and it's prints nothing.

I don't know if this is working on really device because currently I don't have one.

Move jailbreak detection in sub podspec

Hi

would it be possible to move the jailbreak detection (and therefore the dependency to GBJailbreakDetection) to a cocoapod subspec?

The reason is that our app needs to get reviewed and audited on a regular basis and having a closed source/compiled component in there adds some hassle for us. And we anyway need to do jailbreak detection but are forced to use another implementation.

What do you think about that change? I could try to create a PR for that.

Build issue when integrated as static library

Hi there,

I've build the GBDevice info library as a static library (iOS) via the attached Xcode project.
The resulting files look as follows:
screen shot 2017-03-09 at 12 18 02

Since the header file GBDeviceInfo_iOS.h is the only header copied to the resulting folder, I receive a build error once I integrated the resulting folder into an Xcode project.
screen shot 2017-03-09 at 12 22 54

Am I using the resulting library in the wrong manner?
Is it fine to simply copy the necessary header into my project.
These would be:
GBDeviceInfo_Common.h
GBDeviceInfoTypes_Common.h
GBDeviceInfoInterface.h
GBDeviceInfoTypes_iOS.h
screen shot 2017-03-09 at 12 27 21

New devices

Hi!

Any update for new iPhone SE and iPad Pro 9.7?

Separate Simulator device models

It would be nice to be able to test different device configurations on the simulator rather than them being included as a separate device aka GBDeviceModelSimulatoriPhone or GBDeviceModelSimulatoriPad

Please add version tags

Please add version tags to your repo, so you can specify a explicit version (e.g. for CocoaPods)

Bitcode issue in iOS 9

libGBDeviceInfo.a(GBDeviceInfo_Common.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64

About CPU cache line size

How do I know the number of CPU instruction sets of the device

If a iPhone is a 32 - bit architecture or a 64 - bit architecture, I have more memory to allocate when I do some memory alignment.

Jailbreak Detection

Hi,
Thank you for your amazing framework.

I used GBJailbreakDetection (1.3.0) and GBDeviceInfo (3.8.0) in my project.
in the latest release in my project I add isJailbroken and its working fine in development, but after I submit my release to the app store, I found many issues in Crashlytics like the image attached and some users told me their devices not jailbroken but they can't use the app because the app told them you use Jailbroken device.

The crash in Crashlytics it is normal?
Note: When isJailbroken true i show msg alert for the user and when he click on the button I use exit() func to close the app.

screen shot 2016-12-18 at 8 41 37 am

Incorrect Device Info for OSX 10.10.1 - Minor OS Version

Hi, I noticed that your OS X operating system version info comes by way of a uname call. It looks like the Darwin kernel information is not a reliable way to do this, at least as of Yosemite .1.

On various 10.10.1 Macs we all see:

mymac:~ me$ uname -a
Darwin mymac 14.0.0 Darwin Kernel Version 14.0.0: Fri Sep 19 00:26:44 PDT 2014; root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64

Which is consistent with the 0 minor os version returned by GBDeviceInfo.

May I suggest basing your version string on the system version plist instead? Something like:

NSString *systemVersion = [NSDictionary dictionaryWithContentsOfFile:@"/System/Library/CoreServices/SystemVersion.plist"][@"ProductUserVisibleVersion"];

property not found on object of type GBDeviceInfo

When I try reproing the code from the example I get the following error:

property "nodeName" not found on object of type 'GBDeviceInfo'
property "cpu" not found on object of type 'GBDeviceInfo'

I've imported the library into my file. I'm not sure why it doesn't seem to see it.
Are these properties only available for mac? I'm trying to run on iOS simulator.

GBDeviceDisplay is always Unknown.

GBDeviceDisplay display = [GBDeviceInfo deviceInfo].displayInfo.display;

when I print display info, it is always "GBDeviceDisplayUnknown" in the simulator.

Is this normal in the simulator?
Will it work in the real devices?

Excessive DerivedData Warnings v3.3.0 and v3.2.0 for GBJailbreakDetection

Hello @lmirosevic,

We seem to be having some compile-time warnings due to some changes that were made for Bit support with GBJailbreakDetection. I've tried DerivedData clean, Xcode clean, completely fresh pod install, etc. and am still not having any luck. My issues:

warning: object file (/Users/kyleturner/Projects/NeXgen-iOS/Pods/GBJailbreakDetection/GBJailbreakDetection.framework/GBJailbreakDetection(GBJailbreakDetection.o)) was built for newer iOS version (8.2) than being linked (8.0)

And about 10 instances of warnings like:

warning: /Users/lm/Library/Developer/Xcode/DerivedData/ModuleCache/2MGDRTGQWFKA4/Darwin-38I6DLZ5IH61J.pcm: No such file or directory
warning: /Users/lm/Library/Developer/Xcode/DerivedData/ModuleCache/2MGDRTGQWFKA4/ObjectiveC-1RQA2RIXJIE19.pcm: No such file or directory

or

warning: Could not resolve external type c:objc(cs)NSArray
warning: Could not resolve external type c:objc(cs)NSString
warning: Could not resolve external type c:objc(cs)NSMethodSignature

Were local files accidentally included in your most recent Pod update?

We're pulling in GBJailbreakDetection v1.1.0 with either version of GBDeviceInfo (3.3.0 or 3.2.0), but I'm not certain that was your intention? Maybe we're missing something on our end?

If you could please help us resolve this issue, that would be greatly appreciated. Please let us know if we can provide any more debugging information/repro steps.

Thank you!

Support iPad Pro

Hello @lmirosevic, In GBDeviceInfoTypes_iOS.h file, GBDeviceDisplay enum does not contain iPad Pro's device display type.😀

Problematic PPI Default on iOS

Hi! Thanks for creating such a useful library.

I just updated to the latest and noticed a somewhat problematic change. In the absence of PPI data on iOS, where the OS doesn't provide an easy lookup of the screen's PPI, we're falling back to the following code in GBDeviceInfo_iOS.m:

[UIFont systemFontOfSize:72].lineHeight

I was initially excited, thinking we'd found a future proof way of getting PPI on iOS...but on closer inspection, I think this doesn't do what the author intended. For example, on an iPhone X, that code returns 85.921875. The true PPI in the lookup table is 458... In general, it seems this code just creates a font with 72 point height and then gets its standard line spacing in points, with no relation to the physical height of the screen or pixels.

It feels like we should just revert out the else defining the default, if it doesn't have any particular relation to the true value. I'd suggest preserving the previous behavior of returning 0, over returning some wrong value, though we could do 153*[[UIScreen mainScreen] scale], to provide a better default. That'd be right for the iphone X family anyway, and about right for some older ones.

Would reverting be an okay change? Happy to submit the PR, if so.

Commits that introduced the issue:
47a2217
32a68f0

Thanks!

Latest Update returning GBDeviceDisplayUnknown?

I'm on the simulator, and I'm familiar with #41, and I looked briefly at the code which sets GBDeviceDisplayUnknown for the simulator, but I have an NSAssert firing on a return from [GBDeviceInfo deviceInfo].displayInfo.display when GBDeviceDisplayUnknown is returned that was not firing before. It looks like you used to return a valid display for this value, even if it was generic? Or am I wrong about this? This is a breaking change if so.

Add Pod spec

Please add a podspec. This lib is very helpful, would be nice to have it as a cocoapod.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.