简体   繁体   English

我可以在Xcode beta中开发,然后从最新的Xcode GM提交吗?

[英]Can I develop in Xcode beta, then submit from the most recent Xcode GM?

I have found a lot of questions similar to the one I am asking only ask if you can develop and submit through the beta. 我发现了许多与我要求的问题类似的问题,如果您可以通过测试版进行开发提交。 This is not what I am looking for an answer to. 不是我想要的答案。

I am curious to know if I can develop my application using the Xcode 9 beta, but submit it through Xcode 8? 我很想知道我是否可以使用Xcode 9 beta开发我的应用程序, 但是通过Xcode 8提交它?

All programming would be done in the Xcode 9 beta, but when it is time to release the app, I would open the project in Xcode 8 to archive and submit it. 所有编程都将在Xcode 9测试版中完成,但是当需要发布应用程序时,我会在Xcode 8中打开项目进行存档并提交。

Is this something that would work? 这有什么用吗? If not, why wouldn't it? 如果没有,为什么不呢?

Note : I would be using Swift 3.2, not 4. 注意 :我将使用Swift 3.2,而不是4。

Submitting with Xcode 8 would be submitting using Swift 3.1 instead of Swift 3.2. 使用Xcode 8提交将使用Swift 3.1而不是Swift 3.2进行提交。

So you can write conditional code like that: 所以你可以像这样编写条件代码:

#if swift(>=3.2)
    // code builds for Xcode 9 beta
#else
    // code builds for Xcode 8
#endif

So in practice it gives compatibility to two versions of Xcode, but it's not the same code that compiles. 所以在实践中它提供了两个版本的Xcode的兼容性,但它不是编译的相同代码。

That's useful for pods and frameworks. 这对pod和框架很有用。

An example where code is required to be different between swift 3.1 and swift 3.2 is when using function swap() ; 使用函数swap()时,swift 3.1和swift 3.2之间的代码需要不同的一个例子; example of use case : 用例示例

extension Array {
    mutating func unstableShuffle() {
        for i in stride(from: count - 1, to: 0, by: -1) {
            #if swift(>=3.2)
                swapAt(i, Int(arc4random_uniform(UInt32(i))))
            #else
                swap(&self[i], &self[Int(arc4random_uniform(UInt32(i)))])
            #endif
        }
    }
}

Xcode 9 GM Seed is available now. Xcode 9 GM Seed现已上市。 You can download Xcode 9 without Paid (Premium) Apple Developer Account from below links. 您可以从以下链接下载没有付费(高级)Apple开发人员帐户的Xcode 9。

Now you can submit your project developed using Xcode 9 beta to app store using Xcode 9 GM Seed. 现在,您可以使用Xcode 9 GM Seed将使用Xcode 9 beta开发的项目提交到应用商店。

Xcode 9 - GM Seed Xcode 9 - 转基因种子
- (Command Line Tool - Xcode 9 - GM Seed for macOS 10.12) - (命令行工具 - Xcode 9 - macOS 10.12的GM种子)
- (Command Line Tool - Xcode 9 - GM Seed for macOS 10.13) - (命令行工具 - Xcode 9 - macOS 10.13的GM种子)

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

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