Xcode 7 supporting watch OS1 and OS2
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
Upgrading existing watchOS 1 project to watchOS 2
Here is what I did:
- Save your WatchOS1 files in a backup folder
- Remove all WatchOS1 targets and files
- Add new WatchOS2 targets (make sure it compiles)
- Copy the backup files to the new targets
Related Topics
How to Calculate Actual Font Point Size in iOS 7 (Not the Bounding Rectangle)
Images Not Showing Up When Architecture Set to 64 Bit
iPhone Different Screen Sizes in Flash? (Getting Black Bars)
Running Xcodebuild from a Forked Terminal
Email & Phone Validation in Swift
Disable Bitcode for Project and Cocoapods Dependencies with Xcode 7
How to Set Aspect Ratio Constraints Programmatically in iOS
Ios: How to Run a Function After Device Has Rotated (Swift)
Apple MACh-O Linker Warning "Directory Not Found for Option..."
Code Signing Error: Application Failed Codesign Verification
My Swift 4 Uiscrollview with Autolayout Constraints Is Not Scrolling
Does Mkannotationview Buffer Its Input Queue
How to Limit Uitableview Row Reordering to a Section
Locking a Uisearchbar to the Top of a Uitableview Like Game Center
Xcode 6 Save for Enterprise Deployment Does Not Create Plist for IPA Anymore