How can I simulate the Apple Watch for development purposes? - xcode

I just downloaded the Xcode 6 GM, and I'd like to see how my apps work with an Apple Watch connected to the simulated iPhone.
How can I simulate this new device on my MacBook?

Install Xcode (starting from 6.2) (link)
Add Apple Watch target to your project (New->Target->Apple Watch->Watch App)
Go to iOS Simulator -> Hardware -> External displays and select any Apple Watch options
Choose '[your project] Watch App' target and Run
Have fun! :)

Xcode 6.0 does not support development for Apple Watch.
Xcode 6.2 supports development using WatchKit. Check out the WatchKit Programming Guide which includes some examples and note issues reported in the Xcode 6.2 Beta Release Notes. Furthermore, be aware that most of the simulator issues mentioned in the Xcode 6.1 Release Notes still apply but were unfortunately omitted from the 6.2 notes.
Xcode does not support development of native apps for Apple Watch, but it was announced as coming in 2015.

Apple has announced WatchKit. Here's an example of what the WatchKit simulator looks like, from the "getting started" video:
There's also a WatchKit programming guide and framework reference, which seem to reveal quite a bit about how the Apple Watch will work.

Also note that while you can't exactly simulate what will truly be available to developers for the Watch, Apple has announced "WatchKit," which is the platform developers will use.
Unfortunately, there has been no release date set.

Watchkit is coming out in November of 2014. They will likely add the simulator in Xcode then.

You must have Xcode 6.2+ to develop app/extension using WatchKit.
This guide gives detailed information about apple watch development including how to run apple watch app in simulator.
Apple Watch Documentation

Related

Xamarin UI test alternative

I started using Xamarin.UITest for cross-platform testing (IOS & Android).
With Android it worked instantly without any problem and it keeps forking even after any SDK update or JDK.. name it!
But for iOS there was so many issue encountered with the device agent that didn't want to start, the wrong Xcode commande one, the wrong Xcode. Some time it worked, but out of no where it crashes.. then you must clean, rebuild, retry, cross your fingers it doesn't crash or at least that it will launch..
But now April 19 2019, I had an iOS update, combine with an Xcode update and sadly, it doesn't work anymore. I made a lot of research and attempt to recover my test case:
Downgrade Xcode to 10.1
Downgrade Xcode commande line tool to 10.1
downgraded the OS!
To finally rethink it. It's not a good solid testing tool if it breaks at every updates.
On the AppCenter it still works for both platform. But to create your test, you have to run them locally.. You can't anymore with iOS and if you find how to make it work, let me tell you : "See you for the next update!"
So the question is:
What are the alternative to do some automated UI test for iOS & Android using Xamarin?
Xamarin.UITest Xcode 10.2 support
Sorry to hear about your difficulty with the Xcode update.
Unfortunately Xcode minor updates for the last several releases have tended to break local iOS simulator testing, and occasionally device testing. I've seen this be an issue since at least as early as Xcode 9.x versions.
For context, Xcode 10.2 support was added in this package: https://www.nuget.org/packages/Xamarin.UITest/2.2.7.2002-dev
If you or future readers of this discussion still do end up using Xamarin.UITest, I recommend checking the release notes when new minor versions of Xcode come out to see if that support has been confirmed. Typically the support has been added in the 1st Xamarin.UITest package released after a new minor version of Xcode has been released.
(I generally haven't seen this issue with patch versions though, for example Xcode 10.2.1 didn't seem to cause any issues when it came out if it was run against a test suite that was working for Xcode 10.2)
Other testing frameworks
As for other testing frameworks, if you're using App Center itself; then Appium (JUnit) or Calabash are both able to be used with App Center Test and can be used cross-platform to run against your IPA/APK, generally regardless of what was used to write the apps in the first place, like Xamarin.UITest. (Though each framework has slightly different set up requirements and limitations.)
Outside of App Center Test, there may be other testing frameworks you can use; but that gets more into individual developer opinion which strictly speaking is out-of-scope for Stack Overflow answers.
Appium Studio which holds all the pros of native Appium. It also supports parallel execution with built-in test reporting mechanism. They also provide cloud devices with which you can check whether it is feasible for your project. Check out their documentation for more features.

Can I submit iOS 9 beta build to iTunes Connect?

I am new to Xcode and iOS coding. I updated my app to iOS 9, and I would like to submit it to the app store. Is this possible? Or will they not accept an iOS 9 build?
It works fine on both iOS 9 and iOS 8 devices.
PetahChristian is right. Apple does not allow you to submit beta build with beta version of Xcode, which is indeed suboptimal thing, as you won't be able to test your app until final version of Xcode comes out (this is all just in case you switched to Swift 2.0, otherwise just use Xcode 6.4 to submit the build).
Let's just hope that our users will be willing to accept possibly buggy apps when iOS 9 kicks in, as developers simply can't test them properly :).
You can't submit an app using a beta version of Xcode.
As long as you did not update your project to Swift 2.0, you should be able to submit it using the released version of Xcode.
If you upgraded your project and it won't compile with Swift 1.2, you'll have to wait until Xcode 7 is released.
Update:
The beta has several purposes:
To test Apple's code and report bugs to Apple.
To gain early access to new features and functionality of the SDK. You beta test your new or upgraded app on iOS 9 and fix bugs. When Xcode is released, you test against the release, then submit it.
To test existing apps to make sure they still work properly on (a prerelease of) iOS 9. You fix any bugs that may have turned up, but keep your code compatible with Swift 1.2 and Xcode 6. You submit using Xcode 6, and are able to submit any bug fixes in advance of Xcode 7 being released.
Ideally, you get to do all three things, but updating your app generally involves maintaining and working on different branches of your project.
This allows you to both support and fix issues for your released version, and add new features to an upcoming version.

Xcode Plugin release on Mac App Store

I have just started developing a plug-in for Xcode 6. I am planning to release that on Mac App Store.
When I tried to search the Mac App Store to check if there are any Xcode Plug-ins available or not, I could not find any.
So now I am wondering whether Apple will approve Xcode plug-ins or not.
Has anyone tried to do something simillar? Please suggest.
Note that there is no formal support for Xcode plugins, so this information may change and/or become obsolete as Apple makes changes to Xcode. Also, as it is unsupported, you will not be able to submit this plugin to the Mac App Store.
This quote is for older version of Xcode, but I think the answer is still the same. You can read more here.

Developing iOS 7 apps on PhoneGap not an option anymore after February 1th? (Xcode 5 and iOS 7 SDK restriction!)

Yesterday I've received a mail from the Apple Developer Center, stating:
Make sure your apps work seamlessly with the innovative technologies in iOS 7. Starting February 1, new apps and app updates submitted to the App Store must be built with Xcode 5 and iOS 7 SDK.
Will this mean the end of developing apps cross-device off of non-Apple devices?
It sure is a heavy restriction and I'm very disappointed with this news!
Could someone shine a light on this painful news?
I don't believe this is the case.
As long as the app is compiled using XCode, and using the iOS7 SDK, you should be fine.
When they say "built" they mean, it has a corresponding XCode project. Not that every line of code has been written in XCode. At least, that's my interpretation.

Do I have to compile my iPhone app with 4.2?

I have iPhone application in the App Store. Do I have to compile my app with iOS 4.2 SDK in order to allow it run on iOS 4.2 devices? Or compiling using iOS 4.2 is required only to allow using new features of new iOS?
I will appreciate if you can clarify this issue...
Thanks!
Yoash
Do I have to compile my app with iOS
4.2 SDK in order to allow it run on iOS 4.2 devices?
No, it will run on the new firmare just fine. At least if the new firmare does not reveal some bugs in your code (which happens).
You don't need to recompile it to let it run on newer OS versions, but like you already guessed, you need to recompile it when you want to use the newer features (eg. AirPlay, "Multitasking" etc).
The old version should still run.
The app might not play well with new features like multitasking on iPad, so it is worthwhile trying to get some testing and feedback done as soon as you can in case there are issues.
If you download the XCode 4 pre-release from the developer portal, you can use the new static analyser to look for problems in the code: this is not just for SDK issues but also things like memory leaks.
Apple recommends that you always compile with the latest SDK, even if you are targeting older versions.
Unless you run into a specific issue that is causing incompatibilities, it is wise to take this advice. A lot of small bugs and performance issues are fixed with each new iteration of the SDK.
That being said - you can continue to use the older SDK's, and Apple will still accept the apps you build. For mature apps that are only going through minor tweaks, this is probably the safest course to avoid introducing new bugs.

Resources