Giter Site home page Giter Site logo

kmcgeigercounter's People

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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kmcgeigercounter's Issues

inXcode7 and ios9 appCrash

this is how i use:

_window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
[[[UIApplication sharedApplication] delegate] setWindow:_window];

// main view controller
homeViewController = [[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateInitialViewController];
[homeViewController setDelegate:self];

UINavigationController* navView = [[DirectionUINavigationController alloc] initWithRootViewController:homeViewController];

[_window setRootViewController:navView];
[_window makeKeyAndVisible];

#ifndef APP_STORE_RELEASE
    [KMCGeigerCounter sharedGeigerCounter].enabled = YES;
#endif

error info:
*** Assertion failure in -[UIApplication _runWithMainScene:transitionContext:completion:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit/UIKit-3505.16/UIApplication.m:3294

remove KMCGeigerCounter app ok.

iPhone X incompatible

The KMCGeigerCounter is enabled on the top center of the main screen, however it's the safe area of iPhone X.

sample project cannot run

2017-08-26 18:35:17.370 KMCGeigerCounter[71863:6870637] *** Assertion failure in -[UIApplication _runWithMainScene:transitionContext:completion:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3600.7.47/UIApplication.m:3677
2017-08-26 18:35:17.432 KMCGeigerCounter[71863:6870637] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Application windows are expected to have a root view controller at the end of application launch'
*** First throw call stack:
(
0 CoreFoundation 0x000000010a365b0b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x00000001098c2141 objc_exception_throw + 48
2 CoreFoundation 0x000000010a369cf2 +[NSException raise:format:arguments:] + 98
3 Foundation 0x000000010945c536 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 193
4 UIKit 0x000000010b2f6c46 -[UIApplication _runWithMainScene:transitionContext:completion:] + 3343
5 UIKit 0x000000010b2f37f3 -[UIApplication workspaceDidEndTransaction:] + 182
6 FrontBoardServices 0x000000010e3bd5f6 FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK + 24
7 FrontBoardServices 0x000000010e3bd46d -[FBSSerialQueue _performNext] + 186
8 FrontBoardServices 0x000000010e3bd7f6 -[FBSSerialQueue _performNextFromRunLoopSource] + 45
9 CoreFoundation 0x000000010a30bc01 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
10 CoreFoundation 0x000000010a2f10cf __CFRunLoopDoSources0 + 527
11 CoreFoundation 0x000000010a2f05ff __CFRunLoopRun + 911
12 CoreFoundation 0x000000010a2f0016 CFRunLoopRunSpecific + 406
13 UIKit 0x000000010b2f208f -[UIApplication _run] + 468
14 UIKit 0x000000010b2f8134 UIApplicationMain + 159
15 KMCGeigerCounter 0x00000001092e47af main + 111
16 libdyld.dylib 0x000000010dd3e65d start + 1
17 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

iOS 9.3.X: Crash because window has no UIViewController

Using this pod on a device with iOS 9.3.2 I get a crash because UIKit complains that every window needs to have a rootViewController set after application:didFinishLaunchingWithOptions:.

This happens because the KMCGeigerCounter creates its own window but doesn't set a rootViewController there. So the fix is to just set some UIViewController on it:

[self.window setRootViewController:[UIViewController new]];

Would be nice if you could please make this small change and push out a new release to CocoaPods. 😉

iOS 9+: SKView presence for measurement affects performance of regular views

I've fixed some bugs in the iOS 9 branch:

  • Overlay window needed a root view controller
  • Example application didn't create its table views properly
  • The meter window would be hidden if the status bar was hidden

Thanks for writing in about those. But I'm not able to ship a new release of the pod yet, because I haven't solved the most serious problem, which has to do with my method of measuring the timing of drawing.

    // Low framerates can be caused by CPU activity on the main thread or by long compositing time in (I suppose)
    // the graphics driver. If compositing time is the problem, and it doesn't require a lot of main thread activity
    // between frames, then the framerate can drop without CADisplayLink detecting it.
    // Therefore, put an empty 1pt x 1pt SKView in the window. It shouldn't interfere with the framerate, but
    // should cause the CADisplayLink callbacks to match the timing of drawing.
    // TODO: This should be lightweight but affects the framerate on iOS 9, particularly in the example application.
    // Maybe if I use only the SKView and not the CADisplayLink?
    // No, that doesn't help. The SKView alone is causing the drawing latency. The CADisplayLink does not interfere.
    // SceneKit doens't exist before iOS 8, so I'd prefer not to rely on it.
    // A GLKViewController works on the default run loop, so it doesn't get updates during core animation scrolling.
    // Using a custom view with -drawRect: or -displayLayer:, callbacks happen just as often as CADisplayLink.
    // I need a new way to accurately detect when a frame is drawn to the screen without affecting the framerate.

I've tried several things, but I don't have a solution yet. If you want to see where I am on this, check out the ios9 branch. To see the problem for yourself, try running the example application on your device with and without this line in -[KMCGeigerCounter start]:

    [[UIApplication sharedApplication].keyWindow addSubview:self.sceneView];

You'll notice that without the line, the framerate on scrolling the first tab is not smooth, but the meter reads 60. This is because the cost of rendering that view is not on the main thread like layout. With that line included, I'm able to detect the delays, but the framerate actually gets worse and should not.

Needs SpriteKit if not using Pods

Installation instructions need to be say that you have to add SpriteKit to "Build Phases - Link Binary With Libraries" for users not using Cocoapods.

What's the meter window ?????

Always crash like this "Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Application windows are expected to have a root view controller at the end of application launch'"

Floating point conversion errors

When you have Warnings set to be treated as Errors in Xcode the following prevent the app from building:

KMCGeigerCounter.m:198:74: Implicit conversion loses floating-point precision: 'double' to 'CGFloat' (aka 'float')

KMCGeigerCounter.m:237:47: Implicit conversion loses floating-point precision: 'double' to 'UIWindowLevel' (aka 'float')

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.