Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

weather.moonPhase always returns "0" #20

Open
Rasputin007 opened this issue Mar 25, 2019 · 3 comments
Open

weather.moonPhase always returns "0" #20

Rasputin007 opened this issue Mar 25, 2019 · 3 comments

Comments

@Rasputin007
Copy link

It is just pass Full Moon (numerical phase 17, 18) however weather.moonPhase always return "0".

@JunesiPhone
Copy link
Owner

XenInfo is returning what the framework is sending on the current City. Maybe this was depreciated in iOS? I do not see any reference to a moonPhase (example weather.app) except in the headers.

@Rasputin007
Copy link
Author

I got the weather.moonPhase from the xeninfo API website. As I get a value returned I assume it exits in weather.framework otherwise it would be undefined.
It still is in the runtime headers, City.h in iOS 12 from what I can see.

@JunesiPhone
Copy link
Owner

JunesiPhone commented Mar 26, 2019

Yes the framework is returning 0. I've looked into it and that's exactly what I found. It may be depreciated as they are not updating that value as it's not used. The same thing happens with chance of rain, it was never returned as undefined either. The temp fix for that was just pull it off the forecast for the current hour.

@"moonPhase": [NSNumber numberWithInt:(int)roundf(self.currentCity.moonPhase)],

@"chanceofrain": hourlyForecasts.count > 0 ? [hourlyForecasts[0] objectForKey:@"percentPrecipitation"] : @0,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants