简体   繁体   English

我可以在Xcode中使用Spotify Web API开发本机iOS应用程序吗?

[英]Can I use the Spotify Web API in Xcode to develop a native iOS app?

I would like to use Swift and web languages to write my app but I'm confused as to how I can achieve this. 我想使用Swift和网络语言编写我的应用程序,但是我对如何实现这一目标感到困惑。 Spotify's API is written in Obj C but I'd like to circumvent that as much as possible by using Obj C to stream songs and their web api to search and do other things. Spotify的API是用Obj C编写的,但我想通过使用Obj C播放歌曲以及使用其网络api来搜索和执行其他操作来尽可能地避免这种情况。

Thanks! 谢谢!

You can use a bridging header to use Spotify's API in Swift. 您可以使用桥接标头在Swift中使用Spotify的API。 Create a new header file, add #import "Spotify/Spotify.h" , go to Build Settings and search for Objective-C Bridging Header (under Swift Compiler - Code Generation), and add the name of the header file you just made. 创建一个新的头文件,添加#import "Spotify/Spotify.h" ,转到Build Settings并搜索Objective-C桥接头文件(在Swift Compiler-Code Generation下),然后添加刚创建的头文件的名称。 You may also need to add "-all_load" under Other Linker Flags in Build Settings as well. 您可能还需要在“构建设置”中的“其他链接器标志”下添加“ -all_load”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我可以使用Spotify Web API创建Android / iOS Web应用程序吗? - Can I use Spotify Web API for creating Android/iOS Web app? 我可以使用Xcode 3.1为iOS版本4.0、4.3和5开发应用程序吗 - Can I use Xcode 3.1 to develop app for iOS version 4.0, 4.3 and 5 我可以在iOS 12的Xcode 9.2中开发App吗? - Can I develop App in Xcode 9.2 for iOS 12? 我可以在iOS应用中使用API​​ Spotify来解决此问题吗? - Can I fix this with the using of API Spotify in iOS app? 我们可以在Xcode中将iOS本机应用程序转换为Web应用程序吗 - Can we convert iOS native app to web app in xcode 我可以在 HTMLH 中开发 Native iOS 应用程序吗?(具体来说,我问的是 Nativ iOS 应用程序) - can I develop Native iOS application in HTMLH?(Be specific i am asking about Nativ iOS app) 我可以在 os Mavericks 中开发 iOS 应用程序吗? - Can I develop iOS app in os mavericks? 我是否需要Xcode(和Mac)来开发适用于iOS的Ionic应用程序? - Do I need Xcode (and a Mac) to develop an Ionic app for iOS? 如何使用Big Commerce上的Stores and Orders API开发iOS应用程序? - How to use the Stores and Orders API on Big Commerce to develop an iOS app? 从Native App深度链接到iOS上的Spotify搜索 - Deeplink into Spotify Search on iOS from Native App
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM