[英]Can we convert xcode project (xcodeproj) to swift playground (.playground) format?
I develop an ios app in xcode, I want to run this app in swift playground. 我用xcode开发了一个ios应用,我想在swift操场上运行这个应用。 so i want to convert my .xcodeproj project in .playground format.
所以我想将我的.xcodeproj项目转换成.playground格式。 so any solution?
有什么办法吗?
You can't really convert your .xcodeproj
file to a .playground file but you can add a .playground file to your .xcodeproj
file and use it from there 您无法真正将
.xcodeproj
文件转换为.playground文件,但可以将.playground文件添加到.xcodeproj
文件并从那里使用
Open up your .xcodeproj
file and follow the steps below to add a .playground
file to your project. 打开您的
.xcodeproj
文件,然后按照以下步骤将.playground
文件添加到您的项目中。
Go to File > Save as Workspace
Save the Workspace file in the same directory as the .xcodeproj
file 转到“
File > Save as Workspace
将工作区文件与.xcodeproj
文件保存在同一目录中
Create a new .playground
file under Source
在
Source
下创建一个新的.playground
文件
Go to File > New > Target
. 转到
File > New > Target
。 Next go to iOS > Framework & Library > Cocoa Touch Framework
接下来转到
iOS > Framework & Library > Cocoa Touch Framework
Add any files that you want to access from the .playground
to the target membership of the Framework we created earlier. 将您要从
.playground
访问的所有文件添加到我们先前创建的Framework的目标成员资格中。
Select your framework and iOS device from the build sources and Build the project 从构建源中选择您的框架和iOS设备并构建项目
Import your framework to the .playground
file 将框架导入到
.playground
文件
That's All :) 就这样 :)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.