Return-Path: X-Original-To: apmail-cordova-issues-archive@minotaur.apache.org Delivered-To: apmail-cordova-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 45246E158 for ; Tue, 12 Feb 2013 00:17:15 +0000 (UTC) Received: (qmail 419 invoked by uid 500); 12 Feb 2013 00:17:14 -0000 Delivered-To: apmail-cordova-issues-archive@cordova.apache.org Received: (qmail 373 invoked by uid 500); 12 Feb 2013 00:17:13 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 152 invoked by uid 99); 12 Feb 2013 00:17:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Feb 2013 00:17:13 +0000 Date: Tue, 12 Feb 2013 00:17:13 +0000 (UTC) From: "Wouter cx (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-2392) Xcode 4.6 warning in CDVLocation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-2392?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13576240#comment-13576240 ] Wouter cx commented on CB-2392: ------------------------------- I had this issue also. IPhone simulator 6.1, using 2.4. I had just downloaded PhoneGap 2.4, done the "Getting Started with iOS" tutorial. After starting the simulator I got three errors, of which 2 were easily fixed by XCode itself. After that this warning remained. I did a little research just an hour ago, found a fix, and then I saw your fix. I have a comment, I think this is not good practice to cast UIDeviceOrientation to UIInterfaceOrientation Read this: http://stackoverflow.com/questions/7015709/xcode-getting-warning-implicit-conversion-from-enumeration-type-uideviceorient and this: https://github.com/ricardoquesada/facebook-ios-sdk/commit/c760a38c5357323aab7756e70c745f3dc0d7163d "I wouldn't consider this a good practice, casting UIInterfaceOrientation to UIDeviceOrientation! I would rather see a structural fix." and this: http://stackoverflow.com/questions/8413750/implicit-conversion-from-enumeration-type-uiinterfaceorientation-to-different "bad practice" and this: http://stackoverflow.com/questions/2614274/determine-uiinterfaceorientation-on-ipad (solution) Also, the definition of supportsOrientation in supportsOrientation.m says - (BOOL)supportsOrientation:(UIInterfaceOrientation)orientation I changed it to this on my machine (this works, doesn't give any warnings anymore): - (void)startHeadingWithFilter:(CLLocationDegrees)filter { if ([self.locationManager respondsToSelector:@selector(headingOrientation)]) { UIInterfaceOrientation currentInterfaceOrientation = [UIApplication sharedApplication].statusBarOrientation; UIDeviceOrientation currentDeviceOrientation = [[UIDevice currentDevice] orientation]; CDVViewController* cdvViewController = (CDVViewController*)self.viewController; if([cdvViewController supportsOrientation:currentInterfaceOrientation ]) { self.locationManager.headingOrientation = (CLDeviceOrientation) currentDeviceOrientation; // FYI UIDeviceOrientation and CLDeviceOrientation enums are currently the same } } self.locationManager.headingFilter = filter; [self.locationManager startUpdatingHeading]; self.headingData.headingStatus = HEADINGSTARTING; } What do you think? I'm still brand new to this stuff, so I hope I'm right. > Xcode 4.6 warning in CDVLocation > -------------------------------- > > Key: CB-2392 > URL: https://issues.apache.org/jira/browse/CB-2392 > Project: Apache Cordova > Issue Type: Bug > Components: iOS > Reporter: Shazron Abdullah > Assignee: Shazron Abdullah > Priority: Minor > Fix For: 2.5.0 > > > See: https://groups.google.com/d/topic/phonegap/vMwiOislx9Q/discussion > Shows up when running on device. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira