Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.7.0
-
XCode 4.3.2 & iOS Simulator 5.1
Description
Create an Xcode project using the Cordova 1.7 Template.
Open the MainViewController.m file, and overwrite the viewDidLoad method with:
- (void) viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
[UIView animateWithDuration:0.75
animations:^
completion:^(BOOL finished)
{ NSLog(@"Complete"); }];
}
Run app in the iPhone simulator.
App crashes with EXC_BAD_ACCESS (code=2 address 0x0) on line beginning [UIView ..
Solution:
Alter the build settings 'Other linker flags' for main target.
- Remove -weak_library
- Replace with -weak-lSystem
Re-build, app no longer crashes. Note that it works on the device regardless of this setting.
Suggest template includes this change.
This stackoverflow post describes the problem in more detail:
http://stackoverflow.com/questions/6738858/use-of-blocks-crashes-app-in-iphone-simulator-4-3-xcode-4-2-and-4-0-2