locked
Xamarin.iOS 9.3 preview #2 for tvOS 9.0 and watchOS 2.0 RRS feed

  • Question

  • User2589 posted

    This thread has now been closed to direct all further updates about these previews onto the newer preview announcements:

    Xamarin Studio "Preview 4"

    Visual Studio "Preview 3"


    Xamarin.iOS 9.3.1 is our 2nd preview with support for tvOS 9.0 and watchOS 2.0. Those previews are very early, unsupported builds to allow developers to test the new features and platforms recently announced by Apple and for Xamarin to gather feedback and bug reports. Your help is very appreciated!

    Note: Support for iOS 9.1 (and Xcode 7.1) is available in Xamarin.iOS 9.1, available in the normal update channels (e.g. from Xamarin Studio).

    Links:

    This preview release supports:

    • watchOS 2.0 on simulator (only)
    • tvOS 9.0 GM on both simulator and devices

    New features (preview 2)

    • Bitcode support for tvOS applications
    • Support for tvOS binding projects

    Fixed issues (preview 2)

    • Building for ARM64 + LLVM won’t report an MT0075 error for tvOS.
    • System.ServiceModel.Internal.dll is now shipped with tvOS and watchOS profiles.
    • Crash if calling LogicalCallContext on tvOS or watchOS profiles.
    • The free Starter edition could not be used to create tvOS applications for this preview [#34752].
    • For device builds (both iOS and Apple TV) you must disable incremental builds in the project’s options;
    • tvOS Metal Game template gives a System.InvalidOperationException on launching on apple TV.
    • iOS template projects currently work on 32 bit devices. There is an issue reported in bug 34267 and bug 34469 causing projects to crash on 64 bit devices.
    • iOS SpriteKit Game Template gives build errors bug 34433.

    Known issues

    • API are not final, some type might be missing and some types might not be available on the platform (e.g. iOS only).
    • Visual Studio support is not available for this preview.

    watchOS

    • watchOS 1 apps don’t work on simulator.
    • watchOS 2 apps currently work only on watch simulator.
    • watchOS debugging supported only for default mode in watch simulator.
    • watchOS 1 WatchKit App shouldn’t be an execution target.
    • watchOS 2 WatchKit Extension shouldn’t be an execution target.
    • Bitcode support is not available for watchOS 2.0 device builds.

    tvOS

    • tvOS asset catalog editor does not work properly.
    • No storyboard support for tvOS projects with the iOS designer or Xcode 7.1.
    Tuesday, October 27, 2015 8:54 PM

All replies

  • User31231 posted

    I also wanted to add that we have released some tvOS preview documents and sample projects as well.

    Documentation

    We have a selection of preview documentation available for working with tvOS in a Xamarin.tvOS app:

    • Introduction to tvOS 9 - This article introduces all of the new and modified APIs and features available in tvOS 9 for Xamarin.tvOS developers.
    • Hello, tvOS Quick Start Guide - This guide walks through creating your first Xamarin.tvOS app, and in the process introduces the development toolchain, including Xamarin Studio, Xcode and Interface Builder. It also introduces Outlets and Actions, which expose UI controls to code, and finally, it illustrates how to build, run and test a Xamarin.tvOS application.
    • Working with Icons and Images - This article covers designing and working with icons and images inside of a Xamarin.tvOS app.
    • Working with Navigation and Focus - This article covers the concept of Focus and how it is used to present and handle Navigation inside of a Xamarin.tvOS app.
    • Resources and Data Storage - This article covers working with resources and persistent data storage in a Xamarin.tvOS app.
    • Siri Remote and Bluetooth Controllers - This article covers supporting the new Siri Remote and Bluetooth game controllers in your Xamarin.tvOS apps.
    • Supported Assemblies - This is a list of the assemblies supported by Xamarin for your Xamarin.tvOS apps.
    • Supported and Unsupported Frameworks - This is a list of the Frameworks supported by Xamarin for your Xamarin.tvOS apps

    Sample Projects

    We have a few sample projects available that show how to work with Xamarin.tvOS app:

    • Hello, tvOS - This sample implements a simple "Hello World" app in Xamarin.tvOS and presents the basics of working with tvOS.
    • tvAlerts - This sample shows how to work with alerts in a Xamarin.tvOS app.
    • tvButtons - This sample shows how to work with buttons is a Xamarin.tvOS app.
    • tvRemote - This sample presents several ways that your Xamarin.tvOS app can interact with the Siri Remote to navigate your User Interface.

    Additionally, Apple provides the following sample apps that can be transcoded to C# to work with Xamarin's support for tvOS apps:

    Tuesday, October 27, 2015 10:12 PM
  • User16 posted

    Hey,

    Looks like you've been busy bees :) How far away do you think you are from having device support for watchOS 2.0? days, weeks, months?

    Thanks

    Wednesday, October 28, 2015 8:10 PM
  • User644 posted

    Great work guys! Is there any way of getting a working AppIcon in the tvOS apps?

    I've been trying to add but it doesn't seem to be added in the app bundle.

    Maybe i'm doing something wrong or isn't supported in this version yet?

    Wednesday, October 28, 2015 8:40 PM
  • User31231 posted

    Hi @KoenPijnenburg,

    Currently there are a few issues in Preview 2 working with the image assets required to provide the Launch Image, Top Shelf Image and App Icons. From the Troubleshooting document:

    • tvOS asset catalog editor does not work properly.

    I'll check with engineering and see how support for that issue is coming along or if there is a work around.

    Thanks,

    Kevin

    Wednesday, October 28, 2015 11:51 PM
  • User644 posted

    Thx, Kevin. Yes i saw that bit.

    I was modifying the files manually and adding the layered images manually and setting them with build action ImageAsset. But it seems the complete *.brandassets for the app icon / shelf icon etc. are ignored in the build or i can't find them in the resulting build.

    Maybe that is known for now, then i will focus on other things.

    Thursday, October 29, 2015 5:57 AM
  • User2589 posted

    @KoenPijnenburg it would be best to file a bug report for any issues, it will be easier to track (the progress) and also ensure it will be forwarded to the right person (who might not read this post). Thanks!

    Thursday, October 29, 2015 1:02 PM
  • User644 posted

    Hi @SebastienPouliot , it's not a problem. As the issue with the tvOS asset catalog editor needs to be addressed, then it will be fixed also.

    Monday, November 2, 2015 3:54 PM
  • User10319 posted

    @KMullins any word on a workaround for that (inability to include/reference custom layered icons)? Even through hand-patching things?

    Saturday, November 7, 2015 4:50 AM
  • User5921 posted

    @KeithRome - if you only need to include layered app icons, here's one workaround:

    1. Create a project in Xcode, setting up the Assets.xcassets that is automatically added with your icons.
    2. Build that project and run it in simulator.
    3. Navigate to the simulator app directory - e.g. ~/Library/Developer/CoreSimulator/Devices/simulator uuid/data/Containers/Bundle/Application/test app uuid/ and show package contents on the test .app.
    4. Copy the Assets.car to your Xamarin project, including it as a resource.
    5. Add the following in your Info.plist (assuming the app icon in your Assets.xcassets is named "App Icon - Small"): <key>CFBundleIcons</key> <dict> <key>CFBundlePrimaryIcon</key> <string>App Icon - Small</string> </dict> You can also include a top-shelf image, launch image, and large icon (for App Store) in Assets.xcassets, adding the relevant Info.plist entries.
    Saturday, November 7, 2015 4:14 PM
  • User10319 posted

    Thanks @jordoh I will give that a try

    Saturday, November 7, 2015 7:55 PM
  • User624 posted

    I got the preview installed and now I'm tinkering around with the samples. I know this is a preview. Is there any roadmap on when 9.3 will make it to the beta or stable? I'm just looking for rough estimates. (weeks, months?) Thanks again for your excellent work on getting tvOS up and running for us.

    Monday, November 9, 2015 6:59 PM
  • User2589 posted

    @JonathanMiller our stable support for tvOS is planned for our next cycle (C7) and we'll have the usual alpha/beta/stable releases once it starts. In the mean time we're releasing public previews for people to try it out.

    Note that there are already applications on the AppStore using Xamarin, e.g. Transistor. In most aspects tvOS is quite close to iOS, so many things will work as expected. However we are still doing some changes and enhancements (e.g. tooling) and there won't be an stable, non-breaking API until it ships to stable.

    Monday, November 9, 2015 8:21 PM
  • User31231 posted

    All,

    I have documented the workaround required to currently set the Launch Image, App Icons and Top Shelf Image for a Xamarin.tvOS app project in the Setting Xamarin.tvOS Project Images section of our Working with Icons and Images documentation.

    Thanks to @jordoh for providing the workaround.

    Kevin

    Tuesday, November 10, 2015 5:31 PM
  • User1609 posted

    I followed the instructions for adding icons, but I get an ITMS-90471 error. The Large icon is missing. Did anybody submitted an Xamarin TVOS app successfully?

    Friday, November 13, 2015 11:24 AM
  • User31231 posted

    Hi @jeroenvandenBelt,

    Let me check and make sure I got all of the keys in the Info.plist file, I might have missed the one for the large icon. Thanks for point this out BTW.

    As a quick update, I've spoken with the Xamarin.tvOS engineering team and full support for Icons, Top Shelf and Launch Images is planned for the next preview release.

    Please let me know if you find any issues with the tvOS documentation or sample apps either by responding on the documentation feedback widget or you can message me here.

    Thanks,

    Kevin

    Friday, November 13, 2015 1:53 PM
  • User1609 posted

    Yes, the large icon is missing. I have several apps ready for submission, the only thing from stopping is the large icon. I spent several hours to correct this, but until now without success.

    Jeroen

    Friday, November 13, 2015 1:56 PM
  • User31231 posted

    I'm looking at this right now and I'll post a fix ASAP and message you here as soon as I have a solution.

    Kevin

    Friday, November 13, 2015 2:02 PM
  • User31231 posted

    Hi @jeroenvandenBelt,

    Ok, I've done some digging online and there doesn't seem to be a key in your Info.plist file for the App Icon - Large.imagestack, it just needs to be a part of your Assets.car file and properly configured with the correct json before the Image assets are compiled by Xcode. See Trouble submitting to iTunes - ITMS-90471

    I'd suggest building the Xcode project that you used to compile the Assets.car file for Archive (like you were going to submit it to the app store), then open the Organizer (from the Windows menu in Xcode) and selecting Validate... this will let you know if the icons are properly formed.

    Correct the icon assets as needed, compile and re-include the new Assets.car file in your tvOS app.

    Kevin

    Friday, November 13, 2015 3:00 PM
  • User5921 posted

    @jeroenvandenBelt - I can confirm that what @KMullins describes works. Note that the Assets.car built in Archive mode will be significantly larger, since it includes the large icons.

    Friday, November 13, 2015 3:34 PM
  • User1609 posted

    Where to find the Assets.car for the archive build?

    Friday, November 13, 2015 3:36 PM
  • User5921 posted

    Right click on the archive in xcode after it's been built and select "Show in Finder". Show Package Contents on the xcarchive file it reveals, and the app will be in the Products/Applications/ folder of the archive. The Assets.car is in there.

    Friday, November 13, 2015 3:40 PM
  • User31231 posted

    Thanks for the conformation @jordoh, most appreciated.

    Friday, November 13, 2015 3:46 PM
  • User1609 posted

    I found it and i successfully submitted a TV app. Thanks a lot for your help,

    Friday, November 13, 2015 3:57 PM
  • User1609 posted

    How to enable bitcode for tvOS app?

    Friday, November 13, 2015 4:21 PM
  • User5921 posted

    @jeroenvandenBelt - see SebastienPouliot's comment here: https://forums.xamarin.com/discussion/comment/163345/#Comment_163345

    Friday, November 13, 2015 7:45 PM
  • User1609 posted

    Thanks. When I add --bitcode=asmonly to my App at additional mtouch arguments, i get

    /tvos/TVFSXEX/TVFSXAirCreation.csproj (Build) -> /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets (_CompileToNative target) ->

    MTOUCH: error MT0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com
    
    Friday, November 13, 2015 8:12 PM
  • User5921 posted

    I haven't seen that error. I'm on El Capitan using the newest Xcode (7.1.1) - but also built fine on Yosemite with the last beta of Xcode 7.1.

    I have also set Platform target to x64 under Build -> Compiler for the device release build configuration. I'm not sure if that's required. I do not have "Use the LLVM optimizing compiler" enabled.

    Friday, November 13, 2015 8:19 PM
  • User1609 posted

    More detailed info:

    Process exited with code 1, command: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -fembed-bitcode -arch arm64 -mtvos-version-min=9.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS9.0.sdk /tvos/TVFSXEX/obj/iPhone/Release/mtouch-cache/TVFSXEX.exe.arm64.o /tvos/TVFSXEX/obj/iPhone/Release/mtouch-cache/Xamarin.TVOS.dll.arm64.o /tvos/TVFSXEX/obj/iPhone/Release/mtouch-cache/mscorlib.dll.arm64.o /tvos/TVFSXEX/obj/iPhone/Release/mtouch-cache/System.dll.arm64.o /tvos/TVFSXEX/obj/iPhone/Release/mtouch-cache/System.Xml.dll.arm64.o /tvos/TVFSXEX/obj/iPhone/Release/mtouch-cache/System.Core.dll.arm64.o /tvos/TVFSXEX/obj/iPhone/Release/mtouch-cache/TVFSXPanel.dll.arm64.o /tvos/TVFSXEX/obj/iPhone/Release/mtouch-cache/TVLocationClient.dll.arm64.o /tvos/TVFSXEX/obj/iPhone/Release/mtouch-cache/TVFrameWork.dll.arm64.o /tvos/TVFSXEX/obj/iPhone/Release/mtouch-cache/TVFSX.dll.arm64.o /tvos/TVFSXEX/obj/iPhone/Release/mtouch-cache/registrar.arm64.o /tvos/TVFSXEX/obj/iPhone/Release/mtouch-cache/main.arm64.o -o /tvos/TVFSXEX/bin/iPhone/Release/TVFSXEX.app/TVFSXEX -framework CoreGraphics -framework CoreLocation -framework Foundation -framework StoreKit -framework SystemConfiguration -framework UIKit -framework AVFoundation -framework CFNetwork -lz -liconv /Library/Frameworks/Xamarin.iOS.framework/Versions/9.3.1.63/SDKs/Xamarin.AppleTVOS.sdk/usr/lib/libmonosgen-2.0.a /Library/Frameworks/Xamarin.iOS.framework/Versions/9.3.1.63/SDKs/Xamarin.AppleTVOS.sdk/usr/lib/libxamarin.a /Library/Frameworks/Xamarin.iOS.framework/Versions/9.3.1.63/SDKs/Xamarin.AppleTVOS.sdk/usr/lib/libapp.a -deadstrip Undefined symbols for architecture arm64: "SecTrustEvaluate", referenced from: wrappermanagedtonativeSystemSecurityCryptographyX509CertificatesOSX509CertificatesSecTrustEvaluateintptrSystemSecurityCryptographyX509CertificatesOSX509CertificatesSecTrustResult_ in System.dll.arm64.o "GetNetworkParams", referenced from: wrappermanagedtonativeSystemNetNetworkInformationWin32FIXEDINFOGetNetworkParamsbyteint in System.dll.arm64.o "SecPolicyCreateSSL", referenced from: wrappermanagedtonativeSystemSecurityCryptographyX509CertificatesOSX509CertificatesSecPolicyCreateSSLboolintptr in System.dll.arm64.o "SecTrustCreateWithCertificates", referenced from: wrappermanagedtonativeSystemSecurityCryptographyX509CertificatesOSX509CertificatesSecTrustCreateWithCertificatesintptrintptrintptr in System.dll.arm64.o "SecCertificateCreateWithData", referenced from: wrappermanagedtonativeSystemSecurityCryptographyX509CertificatesOSX509CertificatesSecCertificateCreateWithDataintptrintptr in System.dll.arm64.o "SecRandomCopyBytes", referenced from: wrappermanagedtonativeCrimsonCommonCryptoCryptorSecRandomCopyBytesintptrintptr_byte in mscorlib.dll.arm64.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

    Friday, November 13, 2015 8:31 PM
  • User31231 posted

    All,

    I've updated the Project Images Workaround section of our Working with Icons and Images documentation to include the steps required to ensure that your Assets.car file includes the Large Icon required for submitting to the Apple TV App Store.

    I've also expanded the Troubleshooting documentation to include information about all known issues and their solutions. This section will continue to be updated as more issues and solutions are discovered.

    Thanks,

    Kevin

    Monday, November 16, 2015 4:33 PM
  • User31231 posted

    Since quite a few of you have been using the Preview Release of tvOS support to submit Xamarin.tvOS apps to the Apple TV App Store (and some have been having issues), I've accelerated my schedule and release an initial set of App Distributions documents today.

    I would specifically pay attention to the Setting the Build Configuration for your Application section of the Publish to the Apple TV App Store document, as there are some manual adjusted required to the build configuration for the Preview Release of tvOS support to make an .ipa that can successfully be uploaded to iTunes Connect.

    Monday, November 16, 2015 9:01 PM
  • User8289 posted

    Hi,

    I posted this in the forum but I suppose this is a better place to post it.

    I'm trying to use Game Center with TVOS, but ViewState in GKGameCenterViewControllerstate seems not to be present. It seems to work with iOS9 projects though. Browsing apple documentation doesn't seem it's been deprecated on TVOS. Any ideas?

    EDIT: I posted this to bugzilla. https://bugzilla.xamarin.com/show_bug.cgi?id=35981

    Wednesday, November 18, 2015 10:06 AM
  • User8289 posted

    Hi @KMullins ,

    I'm following the steps at "Working with Icons and Images" and I'm able to see the icons in the Apple TV, however I'm required to add assets to handle a Leaderboard and a Dashboard Image. I'm not sure those assets are included in the Assets.car, because there are several other Assets.Car files in the OnDemandResources directory. They also come with several other Info.plist files.

    Would it be possible to expand the "Working with Icons and Images" documentation to add instructions on how to make Leaderboards assets operative?

    thanks a lot, Kak

    Friday, November 20, 2015 2:06 PM
  • User31231 posted

    Hi @MrX.6304,

    In theory, it should work the same as the Assets.car for the Icons, Top Shelf and Launch Images: you should be able to include those images in your "stub" Xcode project and have them compiled in the same Assets.car. I'm assuming that there are another set of Info.plist keys and values that get baked into the final plist when a compile for archive happens.

    Here's what I would suggest:

    1. Look into Apple's docs for adding those Game Center images in a Xcode Swift-based project.
    2. Follow the same steps to compile and open an Archive build bundle as are shown for the current Icons, et al.
    3. Dig though the Info.plist and see what keys/values are needed.
    4. Add both the new Assets.car and any keys/values to you Xamarin.tvOS app.

    I'll take a look at this as soon as I get the chance, but I have a few high-priority tasks I need to take care of first, like the tvOS Table View docs.

    Until then, I'll help out as much as I can here.

    Kevin

    Friday, November 20, 2015 2:21 PM
  • User8289 posted

    Hi @KMullins , thanks a lot for your answer

    this is more or less what I tried to do without success. I'm quite new to iOS though so I may have been doing something wrong. Anyways my major problem is on step 3.

    Once steps 1 and 2 are executed, after searching a bit through files and directories, I find a directory named Payload/OnDemandResources/com.yyy.xxx.com.apple.gamecenter.Arcade Leaderboard.assetpack.

    Inside that directory, I find an Assets.car and Info.plist. Those are the files which are supposed to be included if I'm not wrong.

    However, plist is as follows: EDIT: I couldn't paste XML code even with code keys. I've attached the info.plist file as TXT file.

    Adding that to my Info.plist in the Xamarin main project, gives me an error because CFBundleIdentifier is a duplicated key.

    The other Assets.car+info.plist file (one for the Leaderboards, another for the Dashboard image) also contains a CFBundleIdentifier key.

    Any ideas on how to proceed? Thanks!

    Friday, November 20, 2015 8:51 PM
  • User31231 posted

    Hi @MrX.6304,

    I'll try to dig around some this weekend and see if I can figure it out. Thanks for letting me know what you had tried though.

    Kevin

    Friday, November 20, 2015 8:54 PM
  • User8289 posted

    Hi @KMullins ,

    I've found another clue. In fact the other car/plist files are not inside the "executable" file, but inside an IPA file. I've thought they're like an external package, and searching I've found about On Demand Resources (not hard as it was the directory name xD) : https://developer.xamarin.com/guides/ios/tvos/application-fundamentals/resources-data-storage/#On-Demand-Resources

    The problem is that this seems just a description, but I've found no tutorial of using OnDemandResources with Xamarin Studio.

    Again I'm totally new on iOS. I'm sorry if I'm saying something stupid XD

    Friday, November 20, 2015 9:10 PM
  • User31231 posted

    Yeah we currently don't have any examples of OnDemand Resources and that is something on my todo list. Again, I'll try to take a look at it this weekend and see what I can figure out for you.

    Friday, November 20, 2015 11:15 PM
  • User8289 posted

    Hi,

    I'm trying to publish a game to the Apple TV store but I'm having a hard time with it. First problem was that bitcode was required. Adding --bitcode=asmonly gives a MT000 error. Supposedly this error is appearing because I didn't have LLVM activated. When I activate it, after a long time, I get lots of "Could not AOT the assembly (dll file) MT3001" where Dll files are 'system' dlls like OpenTK-1.0.dll, System.Net.Http, and also my EXE file.

    How can I get past this error?

    thanks!

    Thursday, November 26, 2015 5:18 PM
  • User2589 posted

    @KakCAT an MT3001 error only means the AOT compiler was called but nothing came out of it - and there can be several reasons for this. Please provide (here or on a bug report) the full [1] build log for your game so we can see what the AOT compiler reported.

    [1] please add -v -v -v -v to your Additional mtouch arguments before re-building. This way we'll have the maximum level of details to see what went wrong.

    Thursday, November 26, 2015 5:42 PM
  • User8289 posted

    @SebastienPouliot I'm also having problems copying the build output :) It seems so big it doesn't fit the "build output" field in "errors". Is there any other way to get the Build Log other than copying-pasting the log? (I'm using this: https://forums.xamarin.com/discussion/27515/how-to-obtain-diagnostic-build-logs )

    Thursday, November 26, 2015 6:18 PM
  • User8289 posted

    Hi,

    any news on OnDemand Resources sample?

    Wednesday, December 2, 2015 9:28 AM
  • User13824 posted

    This thread has now been closed to direct all further updates about these previews onto the newer preview announcements:

    Xamarin Studio "Preview 4"

    Visual Studio "Preview 3"

    Monday, April 25, 2016 9:59 PM