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

'unicode/utf8.h' file not found [Catalyst UIKit for macOS] #3189

Closed
appfrilans opened this issue Jun 14, 2019 · 8 comments · Fixed by #3512
Closed

'unicode/utf8.h' file not found [Catalyst UIKit for macOS] #3189

appfrilans opened this issue Jun 14, 2019 · 8 comments · Fixed by #3512
Assignees
Labels
api: database Catalyst macOS Issues or feature requests for macOS.

Comments

@appfrilans
Copy link

appfrilans commented Jun 14, 2019

[READ] Step 1: Are you in the right place?

  • For issues or feature requests related to the code in this repository
    file a Github issue.
    • If this is a feature request make sure the issue title starts with "FR:".
  • For general technical questions, post a question on StackOverflow
    with the firebase tag.
  • For general Firebase discussion, use the firebase-talk
    google group.
  • For help troubleshooting your application that does not fall under one
    of the above categories, reach out to the personalized
    Firebase support channel.

[REQUIRED] Step 2: Describe your environment

  • Xcode version: 11.0 beta 1
  • Firebase SDK version: 6.2.0
  • Firebase Component: FirebaseCore (Auth, Core, Database, Firestore, Messaging, Storage, etc)
  • Component version: 6.0.2

[REQUIRED] Step 3: Describe the problem

I get an error

fatal error: 'unicode/utf8.h' file not found when running.

Steps to reproduce:

I am trying to integrate macOS in my Catalyst/ UIKit for Mac app. Using Cocoapods 1.7.2. With this pod file:

target 'xxxxxMac' do
platform :macos, '10.15'

use_frameworks!

pod 'FirebaseCore'
pod 'FirebaseAuth'
pod 'FirebaseDatabase'
pod 'FirebaseStorage'
end

Error is:

Library/Developer/Xcode/DerivedData/projectx-gjaanasqdnycapdqrcipkyxevoec/Build/Intermediates.noindex/Pods.build/Debug-uikitformac/FirebaseDatabase-iOS.build/Objects-normal/x86_64/FSRWebSocket.o

....../Users/xxxx/xxx/xxxx/Pods/FirebaseDatabase/Firebase/Database/third_party/SocketRocket/FSRWebSocket.m:28:9: fatal error: 'unicode/utf8.h' file not found
#import <unicode/utf8.h>
^~~~~~~~~~~~~~~~
1 error generated.

Relevant Code:

#if targetEnvironment(UIKitForMac)
import FirebaseCore
#else
import Firebase
#endif

@google-oss-bot

This comment has been minimized.

@morganchen12 morganchen12 added macOS Issues or feature requests for macOS. api: database and removed needs-triage labels Jun 14, 2019
@morganchen12
Copy link
Contributor

While our support for Catalyst is non-existent as of right now, this unicode header is one that should be present on every platform that Apple supports. Looks like this header is part of the WebKit framework. Does the error go away if you add WebKit to your target's linked frameworks?

@morganchen12 morganchen12 self-assigned this Jun 14, 2019
@appfrilans
Copy link
Author

appfrilans commented Jun 16, 2019

Adding WebKit did not help. Even if Catalyst support is not existing, would it not be possible to add it anyway as Firebase has macOS support?

Here is my Build phases/Link Binary with libraries after adding WebKit. However, setting the firebase frameworks to iOS + Mac gives me another error.

Skärmavbild 2019-06-16 kl  09 49 16

"Building for UIKit for Mac, but the linked framework 'FBSDKLoginKit.framework' was built for . You may need to restrict the platforms for which this framework should be linked in the target editor."

Keeping the setting att iOS only still gives me the 'unicode/utf8.h' file not found-error

@Jason-Morcos
Copy link

Jason-Morcos commented Jun 16, 2019

Could this perhaps be because of changes apple is making to web handling with Catalyst? I know they deprecated UIWebView and don't have a Catalyst equivalent of UIWebView (forcing the use of WKWebView). Perhaps they have made deprecating changes to WebKit in general and are enforcing these deprecations in Catalyst? Perhaps they have made a breaking change to the utf8 header file. Just a thought.

@ryanwilson
Copy link
Member

This may also be related to CocoaPods not having support for Catalyst - they have an Issue open tracking it now. CocoaPods/CocoaPods#8892

@morganchen12
Copy link
Contributor

Even if Catalyst support is not existing, would it not be possible to add it anyway as Firebase has macOS support?

See #3144

@appfrilans
Copy link
Author

Could this be relevant? An answer from Apple but also a comment about getting one framework working with UIKit-for-mac:

https://forums.developer.apple.com/message/362577

@ryanwilson
Copy link
Member

Responded in the other issue #3144 (comment)

General Catalyst related progress and updates should be posted there.

"Building for UIKit for Mac, but the linked framework 'FBSDKLoginKit.framework' was built for . You may need to restrict the platforms for which this framework should be linked in the target editor."

It's also worth noting that FBSDKLoginKit is a Facebook SDK, not a Firebase one 😃

@firebase firebase locked and limited conversation to collaborators Oct 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: database Catalyst macOS Issues or feature requests for macOS.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants