cjam / cjam/react-native-spotify-remote
Library fails to build on arm64 architecture
- Dominant language
- Objective-C
- Stars
- 283
- Forks
- 110
- PR merge metrics
- No merged PRs in 30d
Description
Hi, I've been testing this library out for a project and I'm having various difficulties with it. I've tried building the example application that comes with the package but neither one builds properly for me, so I've created an entirely new app which all it does is include the spotify-remote library, just to test whether it will build. The repo is here:
https://github.com/wwdrew/spotify-remote-testing
I've tried building this on both an Intel and M1 Mac.
At first I couldn't get Android to build, but patching the package using the latest commit in the repo has fixed it for both Intel and M1.
I can get my iOS test app to build in Intel, but when I try building it on M1 I end up with this error log.
```
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_SPTConfiguration", referenced from:
objc-class-ref in libRNSpotifyRemote.a(RNSpotifyRemoteAuth.o)
"_OBJC_CLASS_$_SPTSessionManager", referenced from:
objc-class-ref in libRNSpotifyRemote.a(RNSpotifyRemoteAuth.o)
"_SPTAppRemoteErrorDescriptionKey", referenced from:
-[RNSpotifyRemoteAuth application:openURL:options:] in libRNSpotifyRemote.a(RNSpotifyRemoteAuth.o)
"_OBJC_CLASS_$_SPTAppRemote", referenced from:
objc-class-ref in libRNSpotifyRemote.a(RNSpotifyRemoteAppRemote.o)
"_SPTAppRemoteContentTypeDefault", referenced from:
-[RNSpotifyRemoteAppRemote constantsToExport] in libRNSpotifyRemote.a(RNSpotifyRemoteAppRemote.o)
-[RNSpotifyRemoteAppRemote getRootContentItems:resolve:reject:] in libRNSpotifyRemote.a(RNSpotifyRemoteAppRemote.o)
-[RNSpotifyRemoteAppRemote getRecommendedContentItems:resolve:reject:] in libRNSpotifyRemote.a(RNSpotifyRemoteAppRemote.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
2022-08-12 11:55:23.795 xcodebuild[61691:293968] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-08-12 11:55:23.796 xcodebuild[61691:293968] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
** BUILD FAILED **
The following build commands failed:
Ld /Users//Library/Developer/Xcode/DerivedData/SpotifyTesting-gsxrqkotmdstexblpxdqjmlnctlv/Build/Products/Debug-iphonesimulator/SpotifyTesting.app/SpotifyTesting normal (in target 'SpotifyTesting' from project 'SpotifyTesting')
(1 failure)
```
I suspect this can be fixed by importing the `SpotifyiOS.xcframework` instead of `SpotifyiOS.framework` in the podspec. I've tried getting this to work on my local machine but couldn't get it working though, otherwise I'd have submitted a PR instead of an issue :)
Contributor guide
Assessment
This issue has not been assessed yet.