Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS 7 crashes with this plugin #2

Open
adamscybot opened this issue May 10, 2016 · 2 comments
Open

iOS 7 crashes with this plugin #2

adamscybot opened this issue May 10, 2016 · 2 comments

Comments

@adamscybot
Copy link

This plugin crashes iOS 7 when a page with a select box is present:

-[ForcedViewController popoverPresentationController]: unrecognized selector sent to instance 0x16dbbef0
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[ForcedViewController popoverPresentationController]: unrecognized selector
sent to instance 0x16dbbef0'
stack:
(0x303ddf83 0x3ab2accf 0x303e1917 0x303e0203 0x3032f768 0x92a29 0x871e7 0x3b012833 0x3b01281f 0x3b01949f 0x303a88a1 0x303a7175 0x30311ebf 0x30311ca3 0x35234663 0x32c5e14d 0x5d593 0x3b037ab7)
type NSException
Process 638 stopped
* thread #1: tid = 0x1070a, 0x3b0ed1f0 libsystem_kernel.dylib`__pthread_kill + 8, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
   frame #0: 0x3b0ed1f0 libsystem_kernel.dylib`__pthread_kill + 8
libsystem_kernel.dylib`__pthread_kill:
->  0x3b0ed1f0 <+8>:  blo    0x3b0ed208                ; <+32>
   0x3b0ed1f4 <+12>: ldr    r12, [pc, #0x4]           ; <+24>
   0x3b0ed1f8 <+16>: ldr    r12, [pc, r12]
   0x3b0ed1fc <+20>: b      0x3b0ed204                ; <+28>

Is there an easy way to make it only load on iOS 8?

@kurtisf
Copy link
Owner

kurtisf commented May 10, 2016

Since iOS 7 and below only holds 5% of the market share I'm not currently supporting it. I also don't have an iOS 7 device to test on.

Try adding this code to CDVFixSelectPoppover.m at the start of the load method:

`+(void)load {

// Check for iOS 7 and below.  Bail if we aren't iOS 8 or above.
NSArray *versionPieces = [[UIDevice currentDevice].systemVersion componentsSeparatedByString:@"."];

// Check the Major version number only
if ([[versionPieces objectAtIndex:0] intValue] < 8) {
    return;
}

`

@adamscybot
Copy link
Author

I dont think iOS 7 suffers from the bug so this is a good solution. I've tested and everything seems fine. I've put in a PR for easy merge: #3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants