Xcode 7 supporting watch OS1 and OS2 - ios

I have been fiddling with Xcode 7 for sometime now, I get to know that it supports only Swift 2 and there is no way to support Swift 1.0 or 1.2 in Xcode 7. This is fine.
Now coming to WatchOS, can I have two targets one for WatchOS1 and one for WatchOS2 separately in Xcode 7 so that I can support for both??
I was looking into the deployment target setting in the build settings of both the watch target and the iOS app target but I could see only WatchOS2 in the list so
Can I support two targets one for WatchOS1 & WatchOS2 respectively in Xcode 7? If so should I install WatchOS1 SDK at some place?? or
this it totally not possible, if not why?.
If both targets can be supported how can I prevent source duplicates for both targets since both OS have significant
differences in terms of architecture.
Also since the introduction of WatchConnectivity framework the iOS counterpart app will also have some changes, how to maintain that
for the two targets?
I am confused and I need to take a decision quickly, any help is appreciated.

You can support watchOS 1 apps in Xcode 7.
You can also support watchOS 2 apps in Xcode 7.
If you want to support both watchOS 1 and watchOS 2 then you will need to have separate targets for each OS (due to the differences in architecture)
For a watchOS 1 app, add a new target and select the Apple Watch section from the left and then click on the WatchKit App for watchOS 1 from the list.
For a watchOS 2 app, add a new target and select the watchOS > Application section and then click on the WatchKit App option in the list.
Couple of things to note about making a watchOS 1 app in Xcode 7 (beta 1)...
Because I did my testing on an iPhone 6 running iOS 8.3 and my watch running watchOS 1.0.1, I needed to change my deployment target to iOS 8.3 but note that you want to do this at a project level rather than just target level (so that the extension also gets set to 8.3 and not just the main app) otherwise it won't let you deploy onto a real device.
Due to a known issue in Xcode 7 beta 1, a watchOS 1 app will fail to install on a real watch with the following error if your paired phone is 64 bit:
Jun 20 17:25:08 Liams-iPhone companionappd[271] <Notice>: (Error) WatchKit: validateWatchKitApplicationInfoDictionary, invalid Info.plist key 'UIRequiredDeviceCapabilities'
This is because Xcode 7 is adding arm64 to the UIRequiredDeviceCapabilities info.plist key at build time even to your watchOS 1 extension when it shouldn't be.
You can temporarily get around this by setting Build Active Architecture Only to NO for DEBUG mode.
Hope that helps

You can have both a watchOS 2 app for an iOS 9 iPhone and a watchKit Extension for an iOS 8 device.
I would though say that if you haven't already made a WatchKit app (as in watchOS 1), then it's highly unproductive to make a watchOS 2 app and try to create and maintain a watchOS 1 app... just jump on board to watchOS 2 for sanity purposes!

Related

Minimal Deployment target available for new publishings in the App Store

In this link, we can find a statement from Apple stating the following:
You can now submit apps that take advantage of the powerful new capabilities in the next release of iOS, watchOS, and tvOS. Build your apps using Xcode 10 GM seed, test with the latest releases of iOS 12, watchOS 5, and tvOS 12, and submit them for review.
Starting March 2019, all new apps and app updates for iPhone, including universal apps, will need to be built with the iOS 12 SDK and support iPhone XS Max. All new apps and app updates for Apple Watch will need to be built with the watchOS 5 SDK and support Apple Watch Series 4.
I understand that now I have to update Xcode to 10.2, and that's ok. But what is unclear for me - what is minimal deployment target available for new publishings? Right now I have an app which has a deployment target of iOS 9.0. Do I fit into the latest requirements of Apple and should I be worried about my deployment target at all?
During my searches in the internet I found that some people propose to have a deployment target which is "latest-ios-version - 2.0 = deployment-target", but I don't know if that statement is legit.
Any insight would be appreciated. Thanks in advance!
Yes, you can still publish an application with a deployment target of iOS >8.0. All that matters is whether your app is built with the iOS 12 SDK (basically, if you're building with Xcode 10, it's a given).
Starting April 26, 2021, all iOS and iPadOS apps submitted to the App Store must be built with Xcode 12 and the iOS 14 SDK. Refer https://developer.apple.com/ios/submit for more details.

App Store allows only iOS 10 or newer when deployment target is set to iOS 8.0

I have set deployment target to iOS 8.0 in both project and target settings (Xcode 9.2, Swift 4). Everything builds fine and with my testing iPhone 4S device (iOS 9.3.5) I can run app and works fine.
My problem is that same build in App Store allows only to download app for iOS 10 or newer. I get this message when trying to download from App Store:
"App name" is not compatible with this iPhone.
When I tried to look for way to fix this I found this in iTunes Connect (it's in Pricing and Availability section):
Why there is no older version? How can I fix this? I probably dont need to support iOS 8 but I want to support iOS 9.
Thanks for all help
2 things worth doing:
In Build Settings->Architecture, ensure that Build Active Architecture Only is set to NO, particularly for the Release section.
When archiving the project for distribution, ensure that the device at the top left corner of XCode is set to "Generic iOS Device" and not a device connected to your MacBook via USB. This is because despite setting Build Active Architecture to NO, XCode seems to not honour the setting.
Source: https://forums.developer.apple.com/thread/67488

Will i still be able to run my iOS 8.0 app on my iPhone 6 with iOS 9?

I am a developer and i am thinking about updating my iPhone (8.4) to iOS 9 beta. I know all the pros and cons but i was wondering if, if i were to update to iOS 9, it would still be possible to run my app ( was created in Xcode 6.4, deployment target 8.0) on my iPhone using Xcode 7 beta.
Sure, you can run it with Xcode 7 beta on your iOS 9 device (but not Xcode 6). But you can't submit to App Store with Xcode beta until it's out of beta, so I recommend not taking any Xcode 7/iOS 9-only approaches for backwards compatibility if you want to submit within the next two months.
I Confirm you that with Xcode 7 and iOS 9 you can run your 8.0 target App !
EXTRA : The Only Problem:
There is only a small bug if you're using Parse.com, you can't retrive PFFiles. So in this case you need to redevelop your app in Target 9.0 to make it work
hope it helps

I set the deployment target to iOS8 and App store says "Compatibility: Requires iOS 7.0 or later". Can I force app to install only in iOS8 only?

I released an iOS 8 version of my app today and wanted to limit it only to users running iOS 8 (because it uses some new Core Motion APIs that only work with iOS 8). It seems like iOS7 users are still able to download my app, even though the deployment target is iOS8 and the App Store says "Compatibility: Requires iOS 7.0 or later". Can I force app to run in iOS8 only? Does the Deployment Target option in Xcode still control which version of the OS is required on the App Store?
The answer is, you have to set the Deployment Target in three different places, in the project, in the app target, and (in my case) in the extension. If you don't set it in all three locations the app won't show as iOS 8 only.
Deployment target on all your TARGETS is the correct option. It's important to understand the different between "Deployment target" and "Base SDK". Both regard a iOS SDK version, but they have different meanings. To learn what read here.

Minimum target iOS version/device platform for iPhone-App to get uploaded at AppStore

what is the allowed minimum target iOS version and device platform for a new iPhone App to get uploaded on AppStore
Apple support iOS 4.3 see Setting Deployment Info. But support 64-Bit Binary minimum deployment target of iOS 5.1.1
Apple has officially announced apps need to be compiled with Xcode5 starting February 1, 2014:
So you must have Xcode5 for submission app in to app store. And in to xCode5 we can not define device platform like(iPhone4,iPhone4s,iPhone5,iPhone5s.. etc.) we can set deployment Target so you can setting minimum deployment target is 6.0 if you want to less then 6.0 and if you are not find that Option like Bellow image you can directly type in to Deployment Target filed.
Building with Xcode 5 is currently required for iOS App Store submission. Xcode 5 does not include an armv6 compiler, thus does not support building for the original iPhone (2G) or the iPhone 3G, which only run armv6 code, or for iOS versions below 4.3, which also require armv6 code. So the 3GS and iOS 4.3 and newer are the supported lower limits.
Note that using Xcode 5 to build arm64 binaries for the newest devices has a Deployment Target lower limit of iOS 5.1.1. Anything lower won't create a functional build.
However, there are reports that one can additionally build the app with old Xcode 4.3 or earlier, which does include an armv6 compiler, and then use lipo to combine the results with an Xcode 5 build archive to support both newer and older devices down to iOS 4.0. Manual plist editing before codesigning may also be required after using lipo. Apple might currently be approving a small number of such lipo builds, however it is unknown whether they will continue to do so.
Starting from June 1st, 2015, APP updates needs to be 64bit and built with ios8 SDK.
Please check the answer:
I think Minimum target iOS version which apple should support be 4.3.
Check this if you want to add more targets: XCode 5 deployment target limited only to iOS 7

Resources