question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't build example scene in Unity 2019.4.14f1 + XCode12.1 + iOS. CoreLocation.framework errror?

See original GitHub issue

In my enviroment, this repo shows these errors in Xcode. And can’t build for iOS.

Showing All Messages
iPhoneOS14.1.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CLErrorDomain.h:12:1: Unknown type name 'NS_ASSUME_NONNULL_BEGIN'
iPhoneOS14.1.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CLErrorDomain.h:22:1: Expected unqualified-id
iPhoneOS14.1.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CLErrorDomain.h:24:1: Unknown type name 'NS_ASSUME_NONNULL_END'
iPhoneOS14.1.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CLError.h:12:24: Expected ';' after top level declarator
iPhoneOS14.1.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CLError.h:20:17: Unknown type name 'NSInteger'
iPhoneOS14.1.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CLError.h:20:28: Unknown type name 'CLError'
iPhoneOS14.1.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CLError.h:20:37: Function definition declared 'typedef'
iPhoneOS14.1.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CLError.h:20:9: C++ requires a type specifier for all declarations
iPhoneOS14.1.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CLError.h:21:5: Use of undeclared identifier 'kCLErrorLocationUnknown'
iPhoneOS14.1.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CLError.h:22:5: Use of undeclared identifier 'kCLErrorDenied'
iPhoneOS14.1.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CLError.h:23:5: Use of undeclared identifier 'kCLErrorNetwork'
iPhoneOS14.1.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CLError.h:24:5: Use of undeclared identifier 'kCLErrorHeadingFailure'
iPhoneOS14.1.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CLError.h:25:5: Use of undeclared identifier 'kCLErrorRegionMonitoringDenied'
iPhoneOS14.1.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CLError.h:26:5: Use of undeclared identifier 'kCLErrorRegionMonitoringFailure'
iPhoneOS14.1.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CLError.h:27:5: Use of undeclared identifier 'kCLErrorRegionMonitoringSetupDelayed'
iPhoneOS14.1.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CLError.h:28:5: Use of undeclared identifier 'kCLErrorRegionMonitoringResponseDelayed'
iPhoneOS14.1.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CLError.h:29:5: Use of undeclared identifier 'kCLErrorGeocodeFoundNoResult'
iPhoneOS14.1.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CLError.h:30:5: Use of undeclared identifier 'kCLErrorGeocodeFoundPartialResult'
iPhoneOS14.1.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CLError.h:31:5: Use of undeclared identifier 'kCLErrorGeocodeCanceled'
Too many errors emitted, stopping now
スクリーンショット 2020-11-17 22 58 32
  • Mac OS X 10.15.7
  • Unity 2019.4.14f1
  • XCode12.1.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12

github_iconTop GitHub Comments

4reactions
jasontraskcommented, Feb 19, 2021

Just bumped into this issue today too!

I’m not sure what caused the problem, but I have a feeling it might be something to do with Unity’s change in 2019.3 which packages things up into UnityFramework within the XCode project… but basically, it’s the Locale.h file within this project which is causing the issue. It’s conflicting with the system <locale.h> library and causing all these linker issues.

The simple fix is to rename Locale.h, Locale.mm (and the reference to Locale.h within Locale.mm). I renamed them to LocaleTools.h / LocaleTools.mm (no need to rename the class) and everything seems to have now built correctly within XCode. 😃

1reaction
ti-hardikshahcommented, Feb 19, 2021

This thing broke my project too. Now I am finding a way to remove it from unity. Any way to do it?

if you don’t want a location functionality then just remove it from plugin >> iOS >> location related .a file

and remove or comment code where applicable … simple !!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bug - Unity framework in xcode gives build errors
I get the following errors on a clean build after installing mediation, Xcode can't build. Any advice welcome. Unity 2019.4.40f1. Mac osx 11.3.1...
Read more >
Unity iOS project fails Xcode vali… | Apple Developer Forums
I've tried this on various versions of Unity 2019.x and Xcode 11.6. Develop Unity project. Build project for iOS. Open Xcode for the...
Read more >
[iOS] CoreLocation.framework is not automatically exported to ...
1. Open the user-supplied project · 2. Build for iOS and attempt to deploy the build onto a device on Xcode · 3....
Read more >
Unity app crashes on iOS14 when transitioning to a specific ...
I've been having the same error. I found that if I remove "VideoPlayer" in my scene, it doesn't crash anymore.
Read more >
Can't build on Xcode, no such file or directory error #22 - GitHub
I used unity 2017.1.0f3, I seems that I need to add dependency manually in Xcode to make it build successfully. But every time...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found