简体   繁体   English

合并两个xcode项目并根据条件运行

[英]Merge two xcode projects and run based on condition

I want to merge two Xcode projects. 我想合并两个Xcode项目。

I have two Xcode projects Project A and Project B. Both run fine separately and both have different concepts. 我有两个Xcode项目Project A和ProjectB。两个项目分别运行良好,并且都有不同的概念。 Now I want to combine this two projects and run based on their respective condition. 现在,我想将这两个项目结合起来并根据各自的条件运行。

What I want is when I am connected to WIFI AI want to run project A(Target of A) and when I am connected two WIFI BI want to run project B(Target of B). 我想要的是当我连接到WIFI AI时要运行项目A(目标A),当我连接两个WIFI BI时要运行项目B(目标B)。

I have tried workspace in that I have added both projects , but now i don't know what I have to do. 我尝试了工作区,因为我已经添加了两个项目,但是现在我不知道该做什么。

Please help me solve this issue. 请帮我解决这个问题。

you can't have xcode set up to build&run a specific target based on the wifi. 您无法设置xcode来构建和运行基于wifi的特定目标。


you could set up a construct using OSX Locations feature and some app that executes certain actions based on your location but that wouldn't be with xcode at all 您可以使用OSX位置功能和一些应用根据您的位置执行某些操作,但根本不会使用xcode来设置构造

eg 例如

1. - if location == office then make a symbolic link from WORKING_PROCT to folder A - if location == home then make a symbolic link from WORKING_PROCT to folder B 1.-如果location == office,则建立从WORKING_PROCT到文件夹A的符号链接-如果location == home,则建立从WORKING_PROCT到文件夹B的符号链接

  1. close xcode if A or B is open 如果A或B打开,则关闭xcode

  2. open WORKING_PROJECT with xcode 用xcode打开WORKING_PROJECT

==> but that would best be discussed on superuser ==>但最好在超级用户上讨论

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM