[
https://issues.apache.org/jira/browse/CB-754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Shazron Abdullah updated CB-754:
--------------------------------
Fix Version/s: 1.8.0
thanks! Scheduling this for 1.8.0. The reason we had this is for iOS 3.x
support, but no one seems to care for that anymore.
> Use of -weak_library in 'other library flags' of generated template XCode app
> causes crashes in Simulator when Obj-C Blocks are used
> ------------------------------------------------------------------------------------------------------------------------------------
>
> Key: CB-754
> URL: https://issues.apache.org/jira/browse/CB-754
> Project: Apache Cordova
> Issue Type: Bug
> Components: iOS
> Affects Versions: 1.7.0
> Environment: XCode 4.3.2 & iOS Simulator 5.1
> Reporter: Ben Clayton
> Assignee: Shazron Abdullah
> Labels: crash, objective-c, template, xcode
> Fix For: 1.8.0
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> 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:^{
> self.view.alpha = 0.5;
> self.view.alpha = 1.0;
> }
> 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
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira