I am unable to show just simple UIActionSheet in my application in IOS8 on real device

Renetik

When I run this in IOS 8 I get NSRangeException exception

UIActionSheet *uias = [[UIActionSheet alloc] initWithTitle:@"Test"
                                                      delegate:self
                                             cancelButtonTitle:@"Test"
                                        destructiveButtonTitle:@"Test"
                                             otherButtonTitles:@"Test", nil];

[uias showInView:self.view];

Exception from output:

2014-09-26 22:18:17.106 rcherzios[354:51170] * Terminating app due to uncaught exception 'NSRangeException', reason: '* -[__NSArrayM replaceObjectAtIndex:withObject:]: index 0 beyond bounds for empty array' * First throw call stack: (0x2b153f87 0x38bc6c77 0x2b071331 0x10b587 0x2b96109b 0x2b961211 0x2b965897 0x2b963141 0x2b963579 0x2b964391 0x2b964215 0x2b966e2d 0x2b9641ab 0x2b99e65b 0x2b99d067 0x2b99ca87 0x2b9643e7 0x2b964215 0x2b966e2d 0x2b9641ab 0x2b99bd01 0x2b966e2d 0x2b99bc79 0x2b953bed 0x2b953ceb 0x2b11a82d 0x2b119af1 0x2b11864b 0x2b065db1 0x2b0af6cb 0x2b966b7f 0x392a6e67 0x392a6ddb 0x392a4b84) libc++abi.dylib: terminating with uncaught exception of type NSException Signal: 6 (signal SIGABRT)

In IOS7 and even in simulator IOS 8 everything works, just on real device in IOS8 it crashes...

It looks like in my complex application on wich I wokr for 3 years also all UIAlertView are crashing with same exception, i tried to test new UIAlertController and have same exception. So my conclusion is that some configuration of my application is causing problem to UIAlertController what is actually what UIAlertView and UIActionSheet are using in ios 8.

Renetik

OK, this was my fault but I don't understand why this caused so hard to tackle problem just under this special circumstances IOS8 and build running on device and ...

So this code caused problem...

@implementation NSMutableArray (Extension)

- (void)setObject:(id)thing atIndexedSubscript:(NSInteger)index {
    [self replaceObjectAtIndex:index withObject:thing];
}

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

How can I tell if my Cordova application is running on a simulator or real device?

분류에서Dev

i am unable to boot with my latest rpi-3.18.0 kernel and enabling the device tree?

분류에서Dev

Why am I unable to use app.Device.IsPhone in Xamarin UI Tests

분류에서Dev

I can't show AdMob banner in my application

분류에서Dev

Am I stupid or I just have a faulty USB drive?

분류에서Dev

How can I setup a variable in the application_controller and have is show in my footer?

분류에서Dev

My usb stick is not mounting. It shows in 'Disks' though where I am able to format it but even on restarting it doesn't show up normally

분류에서Dev

Videos application doesn't actually show video, just audio

분류에서Dev

How to restrict orientation of alertview on orientation change of device in ios8

분류에서Dev

Why am I unable to include vectors?

분류에서Dev

Why am I unable to enable button in android

분류에서Dev

$_POST is returning just 'Array' as string and i am posting an Array

분류에서Dev

Why am I getting a The installer was interrupted before xxx could be installed error when installing my ASP.Net Web application with installer?

분류에서Dev

Simple table view in iOS8 with swift and storyboard

분류에서Dev

web view loading in simulator but not loading in my device (ios 8)

분류에서Dev

NAT for a local device on pfSense - what am I missing?

분류에서Dev

Am I inflating my custom view correctly?

분류에서Dev

How do I show an arrow just to the selected item?JQuery

분류에서Dev

Creating simple database for iOS application

분류에서Dev

I am trying to read a file and to show the reading progress in %. I have tried following code but I am not able to divide in chunks & show progress

분류에서Dev

I purchased iOS developer license for iPhone and I am not able to add Profile to my iPhone 5. Request Timed Out

분류에서Dev

Simple JUnit tests keep failing and I am not sure why

분류에서Dev

I am trying to get a value the i just want the last date and time only

분류에서Dev

Integrate the dropbox in my application which show security alert

분류에서Dev

Am I doing it right? Background work in Windows forms application

분류에서Dev

How do I add my PWA to the share sheet on a mobile device?

분류에서Dev

How can I view my recent device activity?

분류에서Dev

Can I power a PoE device from my laptop?

분류에서Dev

Under Linux, how can I tell the real power consumed by a usb device

Related 관련 기사

  1. 1

    How can I tell if my Cordova application is running on a simulator or real device?

  2. 2

    i am unable to boot with my latest rpi-3.18.0 kernel and enabling the device tree?

  3. 3

    Why am I unable to use app.Device.IsPhone in Xamarin UI Tests

  4. 4

    I can't show AdMob banner in my application

  5. 5

    Am I stupid or I just have a faulty USB drive?

  6. 6

    How can I setup a variable in the application_controller and have is show in my footer?

  7. 7

    My usb stick is not mounting. It shows in 'Disks' though where I am able to format it but even on restarting it doesn't show up normally

  8. 8

    Videos application doesn't actually show video, just audio

  9. 9

    How to restrict orientation of alertview on orientation change of device in ios8

  10. 10

    Why am I unable to include vectors?

  11. 11

    Why am I unable to enable button in android

  12. 12

    $_POST is returning just 'Array' as string and i am posting an Array

  13. 13

    Why am I getting a The installer was interrupted before xxx could be installed error when installing my ASP.Net Web application with installer?

  14. 14

    Simple table view in iOS8 with swift and storyboard

  15. 15

    web view loading in simulator but not loading in my device (ios 8)

  16. 16

    NAT for a local device on pfSense - what am I missing?

  17. 17

    Am I inflating my custom view correctly?

  18. 18

    How do I show an arrow just to the selected item?JQuery

  19. 19

    Creating simple database for iOS application

  20. 20

    I am trying to read a file and to show the reading progress in %. I have tried following code but I am not able to divide in chunks & show progress

  21. 21

    I purchased iOS developer license for iPhone and I am not able to add Profile to my iPhone 5. Request Timed Out

  22. 22

    Simple JUnit tests keep failing and I am not sure why

  23. 23

    I am trying to get a value the i just want the last date and time only

  24. 24

    Integrate the dropbox in my application which show security alert

  25. 25

    Am I doing it right? Background work in Windows forms application

  26. 26

    How do I add my PWA to the share sheet on a mobile device?

  27. 27

    How can I view my recent device activity?

  28. 28

    Can I power a PoE device from my laptop?

  29. 29

    Under Linux, how can I tell the real power consumed by a usb device

뜨겁다태그

보관