how to develop tvOS app using nativescript - nativescript

I'm trying to build a tvOS and roku app with nativescript.
I was about to start working on the tvOS app after I read this article https://www.nativescript.org/blog/running-the-nativescript-runtime-for-ios-on-apple-tv but I'm not sure where the nativescript ios runtime or the metadata generator are in my project. Also, would this mean that my provisioning file and certificates should be for an appletv app instead of ios?

The iOS runtime is generally downloaded from NPM for your project. But it includes support for only iOS. For tvOS, you will have to checkout the open source iOS runtime project from Github and update the config scripts as described in the blog post,
set(CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos;-iphonesimulator;-appletvos;-appletvsimulator")
set(CMAKE_XCODE_ATTRIBUTE_SUPPORTED_PLATFORMS "iphoneos iphonesimulator appletvos appletvsimulator")
and build your custom version of iOS runtime with CMake.

Related

iOS-only SPM targets built against watchOS

Our project uses several 3rd party packages using Swift Package Manager. Some of them are shared among the iOS and watchOS project, but several packages depend on UIKit, so they are not included in the "Frameworks, Libraries, and Embedded Content" part of the WatchKit Extension target in Xcode project settings.
I can build the iOS or the watchOS app and run in Simulator or on a device, but when I want to preview SwiftUI files included in the watchOS application, building fails.
What I read from the build log is that Xcode wants to build all of the packages added to the iOS project against watchOS too, which will fail obviously.
Is some of my project settings bad or is this a bug?
It seems to be an unresolved bug on Xcode 14.
There is an opened discussion on Apple Developer forums

Integrate Crashlytics in visual studio?

I am new at VisualStudio.I am using xamarin for both iOS and Android application.
Now, If i want to integrate Crashlytics in my application then what should i do or how should i do?
Suggestions please.
There are two easy and widely use option for xamarin Crashlytics:
Hockey App
Firebase
Also if you need within the premises you can write some code.
You can use Fabric to add Crashlytics to your app.
Drungrin has built a fabulous NuGet package to connect your Xamarin iOS & Android apps to Fabric & Crashlytics (GitHub Link).
Getting it hooked up to your app is a massive hastle because Fabric don't natively support Xamarin however.. (forgive the shameless plug) I have written up a complete guide on implementing it on both platforms, link here. The long and the short of this is:
iOS (you need a mac for this)
Create a new native ios app (through xcode) with the same bundle id as your xamarin app & install it using the fabric mac app.
Forget about the xcode project (you only need to register the bundle id), add api key from sample to xamarin info.plist
add fabric & crashlytics nugets (follow github docs)
build your xamarin app for release & then archive for publishing. Open the fabric mac app and you will have your build in archives. Dysms can be automated to upload but for now you can upload them manually
Android
Create a new native Android app (using android studio), Make sure build & version numbers are the same as your xamarin app. Let the fabric plugin build & connect the sample to fabric. (once again the app need the same name)
Copy the fabric api key from sample to xam app manifest (edit the xml).
Give the android app internet permissions (if yours somehow doesnt)
Copy the crashlytics.build.properties file (found $ProjectFolder -> app -> build -> intermediates -> assets -> debug) into your xamarin app's resources, set build action to AndroidAsset.
Copy the crashlytics build number into string.xml: <string name="com.crashlytics.android.build_id">APP_BUILD_NUMBER</string>
add fabric & crashlytics nugets (follow github docs).
Archive app & publish apk
Drag apk into fabric plugin (android studio).
As of 2022 and Visual Studio 2019 for MacOS, there is now a NuGet package that handles the Firebase Crashlytics API. If you add the Xamarin.Firebase.IOS.Crashlytics package, and your GoogleService-Info.plist into the project, you can then add the updated Initialization code.

Adding firebase analytics into tvos and macos project

Is there a way to add firebase analytics events into my tvos project and macos project? I found tutorials to add it only into ios app.
As of the 8.9.0 release, Firebase has official beta support for tvOS and macOS.

How to integrate Native ios and android sdk in Xamarin

I have to integrate one third party sdk in xamarin project.
They are providing the native sdk's for android and ios. I need to use them in Xamarin project to develop app for ios and android.
Xamarin offers in depth documentation for linking native libraries.
Linking native library iOS here and Binding a java Library here.
If you want to go further and use these sdk's in Xamarin.Forms you can make a wrapper in each platform dependent project and link them to your Forms project using Xamarin.Forms.DependencyService.
To use Firebase Crashlytics in your application follow the steps:
Install packages: Xamarin.firebase.iOS.Crashlytics and Xamarin.firebase.iOS.Core
Download GoogleService-Info.Plist file and add it to your project.
Set the build action as "Bundle Resource".
Build the project and run.

Creating NativeScript app with Teleriks AppBuilder

I am writing hello world on nativeScript at AppBuilder platform. I created new project from template. It works perfetct with companion app (Run->Build->NativeScript) but i can't:
1) run it on iOS or android emulator
2) build app package (Run->Build->App Package)
Thanks much
From the browser you can't run on native emulators, but you can deploy to the NativeScript companion app for Android/iOS, and you can also build app packages for Android/iOS.
To build iOS app packages you need to register for the iOS developer program and register your provisioning profiles and certificates with AppBuilder before you can create app packages. If you have any other questions related to this let me know.

Resources