Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
661 views
in Technique[技术] by (71.8m points)

xamarin.ios - Can't resolve the reference 'CoreLocation.CLAuthorizationStatus CoreLocation.CLLocationManager::get_AuthorizationStatus() XAMARIN

I am trying to release my application so I can distribute, however when I try to build my application I get this error message.

Can't resolve the reference 'CoreLocation.CLAuthorizationStatus CoreLocation.CLLocationManager::get_AuthorizationStatus()', referenced from the method 'System.Void Xamarin.Essentials.Permissions/LocationWhenInUse/ManagerDelegate::DidChangeAuthorization(CoreLocation.CLLocationManager)' in 'Xamarin.iOS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065'. (MT2101)

Everything works fine when I am in debug mode. I can test on my phone and the emulator but when I think I am good to release I get hit with the error above. I read in the docs, looks like this happens when someone is trying to request access to the location information. However the only thing I can think I am requesting is the current UTC time and dateTime.Now for local time which I don't think has anything to do with the location of the device/user. That is the only major thing I have changed from my last release, that and I updated some nugget packages. I had issues when I tried to release last time and someone on here was able to help me figure it out, it was a nugget package creating a conflict with another one. I want to think it is my Xamarin.Essentials nugget but I'm not sure. Has anyone else seen this? I saw some people requested help from Xamarin forums but the solution they explained I did not find helpful.

they said to do the following.

Updatring
pool: vmImage: 'macOS-latest'

and removing

- script: sudo $AGENT_HOMEDIRECTORY/scripts/select-xamarin-sdk.sh 6_8_0

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I found the same issue in this thread:

And this should be fixed in #1606

The solution is using the latest Xamarin.Essentials/1.6.1-preview1.

If you can' switch to the preview, then you will have to install the latest version of Xamarin.iOS on the agents.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...