React-native-track-player: [ios] Swift is not supported for static libraries

Created on 15 Aug 2017  路  9Comments  路  Source: react-native-kit/react-native-track-player

After linking, I get this error when trying to build in XCode:

screen shot 2017-08-15 at 15 48 27

Can I fix this somehow?

Question iOS

Most helpful comment

Can you try adding a swift file to your project? You can call it dummy.swift then you will be prompted if you want to generate a bridging header. Say yes, and then try building again :)

We've yet to formalize the documentation for this.

All 9 comments

Hey @anderslemke -- it actually requires Xcode beta for Swift right now. Are you able to install that?

Oh! I will try... :)

@anderslemke as Jason said, you'll need the latest Xcode 9 beta for this to work :)

Now I've updated, and that first error went away.
I have new one now, though... :)

ld: library not found for -lswiftCoreAudio for architecture x86_64

I will investigate.

I tried this: https://stackoverflow.com/a/39630099/923539

But it doesn't work...

Hey @anderslemke are you working with a default xcode project? The ones generated by the react-native cli?

I would say so. It was, however, not generated with the latest version of React Native.

Can you try adding a swift file to your project? You can call it dummy.swift then you will be prompted if you want to generate a bridging header. Say yes, and then try building again :)

We've yet to formalize the documentation for this.

Yes! I created the dummy.swift.
XCode failed, and gave me the path to the header file it was missing. So I created that file:

touch /Users/anders/Projects/zetland/lyd-react-native/ios/LydReactNative-Bridging-Header.h

Now it works! 馃帀

Was this page helpful?
0 / 5 - 0 ratings

Related issues

EhteshamAnwar picture EhteshamAnwar  路  3Comments

mckmarc picture mckmarc  路  4Comments

moduval picture moduval  路  4Comments

toooldmohammad picture toooldmohammad  路  3Comments

b3rkaydem1r picture b3rkaydem1r  路  3Comments