I upgraded my iOS app to Swift 3.0 in Xcode 8.0 beta (8S128d). I thought it was all ready to go and uploaded it to iTunes Connect. When I clicked "Submit for Review", it gave me a list of 26 errors, one for each embedded framework, such as:
Invalid sdk value. The value provided for the sdk portion of LC_VERSION_MIN_IPHONEOS in MyApp.app/Frameworks/libswiftFoundation.dylib is 10.0 which is greater than the maximum allowed value of 9.3.2.
And one final error:
New apps and app updates must be built with the public (GM) versions of Xcode 6 or later, OS X, and iOS SDK. Don't submit apps built with beta software including beta OS X builds.
Okay, that would have been helpful to know before I upgraded my app! How would I go about submitting this app?
I noticed about changing the project Base SDK from iOS 10.0 to iOS 9.3 by copying the base SDK from Xcode 7.3.1 to Xcode 8:
/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk
And then changing the Base SDK setting in Xcode 8's Build Settings. However, it didn't recognize the new SDK (see this question), even when I entered it manually, and compiled it with iOS 10.0 anyway. Is there any way to compile with the older SDK? Or must I roll back my code to Swift 2?
Here's the quick solution:
Don't use Xcode beta versions to submit apps for release — it's beta for a reason and shouldn't be used with production code.
Submitting Apps
Apps that are created using beta versions of Xcode or that are built
for beta versions of operating systems will not be accepted on the App
Store and Mac App Store. Apps that you submit should be developed
using the latest version of Xcode from the Mac App Store and should be
built for publicly available versions of iOS, OS X, and watchOS —
except when GM seeds are available. When a GM Seed of Xcode becomes
available, use it to develop your app for submission. When GM seeds of
iOS, OS X, or watchOS become available, build your app for these
versions.
↳ https://developer.apple.com/support/pre-release-software/
Re: Okay, that would have been helpful to know before I upgraded my app!
How would I go about submitting this app?
Use the current or GM release of Xcode to build and submit your app.
Unfortunately, it doesn't look like there's a way to change the SDK version in Xcode Beta; it could be either a bug or just the fact that Apple wants you using the beta SDK alongside the beta software. Like #l'L'l said, one must open the app in stable Xcode in order for the App Store to accept the submission.
However, I did find that downgrading the project to Swift 2 wasn't exorbitantly difficult. It only took me an hour to "downgrade" the entire project by manually fixing all of the errors in Xcode 7.3. In case it will help anyone, the main patterns I noticed during the process were:
Changing function declarations to not have an _ before the first argument, because the first argument is not anonymous in Swift 3
Removing the first argument label from all function calls, which sometimes involves renaming the function (including in delegates, which sometimes don't report an error)
Changing a couple built-in properties, like label.isOn to label.on
Adding NS before several object names, like NSData and NSTimer, which became Data and Timer in Swift 3, respectively
"Downgrading" the Storyboard by re-saving it
Compile using Xcode-stable but upload with Xcode-beta; Xcode-stable had issues with my provisioning profiles, but it turns out it doesn't matter which version you use the upload the binary from Organizer
Related
We have our native iOS app developed in Xcode and now software developer is saying that we should upgrade our code to Xcode 9 as we may face issue with the new release on the App Store if we continue using Xcode for development. I would like to know if this is a fact, since I am not from iOS development and I don't know if this is a fact.
Any help in this regarding or a pointer to documentation would be appreciated.
Appstore won't reject your app because compiled with version 8 but as your developer says, It will be better approach to compile the project with latest version of Xcode.
In addition, with iPhone X release, Apple probably look into support for iPhone X so If you send a new version without iPhone X support, It may be rejected and for iPhone X support, you need to use Xcode version 9 or later.
Apple Xcode Support:
You should use the latest version of Xcode available on the Mac App Store to submit your apps, or when available, the latest GM seed release from the Downloads page. For more information, read the App Distribution Guide.
Note: If your source codes are written fully with Objective-C then compile won't be problem because with Xcode 9 nothing changed on Obj-C side. However, If you have a swift code It may needed to be updated to Swift 4.
To contrast the other posters here: I'd say it depends. Right now, iTunes Connect accepts updates/uploads for apps built using Xcode 6 (six). There is no hard technical requirement to use Xcode 9 today, and there isn't going to be one in the forseeable future. 2019/2020, maybe, but by then we'll likely also have Xcode 11 or 12.
That said, there are many reasons to actually switch to the most recent Xcode release rather sooner than later, not the least of which is being able to target the current iOS version, iOS 11 and make your app work correctly on the new iPhone X.
Yes, your developer is absolutely right.
General Suggestion: Your project/app source code should be compatible with latest technological upgrades.
Why should you move your app development on Xcode 9?
Here are several useful stack over flow discussions (questions and answers), explaining, new changes with Xcode 9.
Xcode 9 Release Notes
iPhone-X interface support - Safe Area of Xcode 9
Swift 4 - Code migration from Swift 2.x to Swift 4
Face-Id Authentication (If you have used biometric authentication)
Facebook integration IOS 11 & FBSDKShareDialog not working on IOS11
Navigation Controller and Navigation Bars
Apple releases a new version of Xcode every year, while it also removes the functionality in iTunes Connect to upload builds from older Xcode versions. So, to be brief, your developer is right!
Source: App Store - Submissions
My iOS app is nearly complete, but I read about swift's performance improvements in xcode 6.3 and wanted to take advantage. If I use the latest xcode but compile my app for iOS 8.1 (publicly available) will I have any problems submitting my app?
App needs to be compiled with release version of Xcode.
I was already using Xcode 6.3 Beta, and it doesn't let me submit to the Appstore.
I would not recommend using the beta version of Xcode if you plan to release your app soon.
EDIT: You should also be able to use the GM or RC version.
I won't swear to this time, but in the past Apple has always required that submissions be compiled wit the most recent released (not beta) tool chain
The only exceptions have been to allow an older tool chain to be used for a brief period after a release (a few months) and to allow a beta tool chain to be used for early submissions aimed at major new iOS releases(7.0, 8.0, not 8.1)
Is there some way that I can use Apple's TestFlight (as opposed to the original TestFlight, which does still accept sign ups and can currently be used) with Xcode 5?
I want to be able to use Xcode 5 because Xcode 6 only works with the iOS 8 SDK. While there are hacks to make the iOS 7 SDK work with Xcode 6, they don't seem to successfully build an archive (I get link errors about the Metal framework for some architectures).
I wanted to use the iOS 7 SDK because our App needs some modifications to work with the iOS 8 SDK. This modifications are largely due to changes in the implementation details of autorotation, which is carried out at the window level under iOS 8. Some libraries we use rely on the iOS 7 approach and are broken under iOS 8. While we're happy to update all of this, we'd prefer to resolve it at a future time.
Short answer – No.
Longer answer…
I noticed that Xcode 5 and Xcode 6 share the same "Archives".
It is possible to create an archive build with Xcode 5 and then see this archive build in Xcode 6. You can use Xcode 6 to upload the build to iTunes Connect. This all works, and iTunes connect will let you distribute the build created in Xcode 5 to test devices. Using the TestFlight App on devices, they'll download and attempt to instal the build.
However, the final step of installation fails, and the TestFlight App asks you to come and try later on. Trying later never got me any further, so my conclusion is that the final installation step requires the build to have been created with the iOS 8 SDK (or later).
What exactly does iOS 7 use to determine whether the application should be displayed with the traditional iOS 6 style UI (aka iOS6 compatibility mode), or the newer iOS 7 UI?
If I build our app in Xcode 5, with base SDK set to 7 I get the iOS 7 UI as expected
If I build our app in Xcode 5, with base SDK set to 6 I still get the iOS 7 UI (unexpected, happens on real device and simulator)
If I build in Xcode 4.x, I get the older UI as expected
In all cases, the deployment target is set to 5.
Since our app has fairly custom UI we're not ready to move to the new look of iOS 7 yet. However we do need to make some backend changes to support iOS 7 which we need to release now. Can we still submit apps built with Xcode 4.x and expect them to be accepted?
For the time being, you are able to. Apple will make an announcement when they stop accepting apps built with Xcode 4.x. My company is currently submitting apps with Xcode 4.6 since we do not have a new enough operating system for 5. I suspect it will be at least a few months until they stop.
Running against 6.1 Base SDK should do it.
However, as I discovered yesterday. Anything less than 7.0 Base SDK isn't supported by Xcode 5 (officially) and so it is undefined behaviour.
My app suddenly switched from iOS6 UI to iOS7 UI with no code changes.
In the end I restarted my mac and phone, deleted the app, deleted derived data and reinstalled cocoapods and it was working on iOS6 UI again.
Make sure that you set the Base SDK to iOS 6 in both the Project build settings & the target build settings - that should do the trick. Even though the target settings are supposed to override the project, I found that when just the target was set to 6 - it compiled with 7.
Regarding XCode 5, it's true that it doesn't officially ship with the iOS 6 SDK. However, you can extract it from XCode 4.6 and use it in 5.
You'll find the SDK in the XCode app under:
Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs
Simply copy it from an existing installation of XCode 4.6 or from its .dmg (which can still be downloaded from Apple's website) to the corresponding folder in XCode 5, restart and you should now be able to select it as the Base SDK. Note that you'll have to do this after every update of XCode so you might find it easier to use a symbolic link rather than copying.
We've successfully submitted apps built this way to the App Store although as has been said before me, it would be a good idea to transition to iOS 7 ASAP before Apple makes it compulsory.
Now, I use Xcode 4.2 supporting iOS 5.0. Apple has just released iOS 5.0.1 beta 2. I can install it on my iPhone.
I want to test with this beta version, i.e build code from Xcode.
How do I build code from Xcode 4.2 for device of iOS 5.0.1 beta?
Please help
In exactly the same way that you would do so for iOS 5.0. We can't talk about beta versions of the software, but we can talk about what happens when newer versions of iOS are released. When you connect a device with a newer version of iOS installed, the Xcode Organizer will give you a message like:
Xcode does not have debugging information for the version of iOS on the device named “Dev iPhone”. Xcode can collect debugging data from the device to enable development with this version of iOS. This process only needs to be done once per iOS version, and will take several minutes.
You simply click OK or similar, and Xcode downloads the necessary debugging data. You can then build to the device from Xcode and use all the debugging tools as usual. This process works for point releases. It is highly unlikely this would work for major updates (e.g. if iOS 6 was released) and it may or may not work for iOS 5.1, depending on the changes included. But when Apple have not released a new version of Xcode to developers, you can be sure it is because one is not required.
It is important to understand the distinction between an updated version of iOS (for the device) and the iOS SDK (for Xcode). A point release of iOS does not necessarily require any change to the iOS SDK, and therefore with Xcode's ability now to download the debugging information on demand (a feature that has been around for a while), you don't necessarily need an updated version of Xcode. Likewise, with Xcode 4.2 you still set the iOS 5.0 as your base SDK even if you are setting an earlier version (e.g. iOS 4.2) as your deployment target. You don't need the iOS SDK v4.2 to target iOS 4.2 for deployment. (Just make sure you add back "armv6" to targeted architectures in your build settings, if you still want to support the iPhone 3G and equivalent iPods, as in Xcode 4.2 this is not included by default.)