Geo Location API not working on iOS 8 ?

S Siddhant Wadhera 3 years 7 months ago
3 3 0

Hi
I am new to both ruby and rhodes. I have been using Geo Location API in my app which works fine on iOS7.But when i build the app for iOS8 using Xcode 6 and rhodes4.1.1 I always get the positioning co-ordinates as 0 from the API itself.

is there any workaround for this so that the API works.

I tried building the app with 5.0.2 but i get an error as given below :
ld: symbol(s) not found for architecture armv7
  ==================== ERROR! ====================
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** BUILD FAILED **

The following build commands failed:
    Ld build/Release-iphoneos/rhorunner.app/rhorunner normal armv7
(1 failure)
cd /Users/varalakshmip/.rvm/gems/ruby-1.9.3-p547/gems/rhodes-5.0.2
************************************
ERROR during building by XCode !
XCode return next error code = pid 95524 exit 65
which i could not understand

Any help is appreciated in regards to make the GEo Location API work on iOS8???

Thanks
Siddhant

Please Register or Login to post a reply

3 Replies

P Paul Goh

Hi Siddhant,

Your post was earlier in the month, so you may have found a work around already.
GeoLocation API needs some changes to work with IOS 8.0. This post I found online explains the changes to the LocationManager in IOS 8.x SDK quite well is http://nevan.net/2014/09/core-location-manager-changes-in-ios-8/

Workaround that we are using for now is, updating the initLocationManger method in /Classes/GeoLocation/LocationController.m as below:

- (void) initLocationManager:(NSObject*)param {

    self._locationManager = [[[CLLocationManager alloc] init] autorelease];
    self._locationManager.desiredAccuracy = kCLLocationAccuracyBest;
    self._locationManager.delegate = self; // Tells the location manager to send updates to this object
 
    // Workaround for IOS 8 SDK LocationManager changes
    if ([self._locationManager respondsToSelector:@selector(requestAlwaysAuthorization)]) {
        [self._locationManager requestAlwaysAuthorization];
    }
}

and updating Info.plist file with string values for NSLocationAlwaysUsageDescription and NSLocationWhenInUseUsageDescription.

A formal fix would be ideal, but I haven't seen if something like this has made into Rhodes GIT repo or Rho 5.x
Would be great to hear if there are any other solutions / workarounds for this.

K Kutir Mobility

Hi Siddhant
I see already shared his experience about building Rhodes app for iOS8 at https://developer.motorolasolutions.com/message/81609#81609

Was that helpful to you ?
Thank you.
Visnupriya R
Kutir Mobility

D Dmitry Soldatenkov

Hi,

Please post full console output for "rake run:iphone --trace" or full build log from XCode.
If you use XCode project generated in 4.0, you should regenerate it by 5.0 (remove app_folder/project/iphone and regenerate by "rake build:iphone:setup_xcode_project")

CONTACT
Can’t find what you’re looking for?