Can I use apple libraries like CoreML and PencilKit with react-native apps? - ios

I really want to make use of the pencil kit in my react-native application. I just want to know whether I can do it. If yes, then how?

TLDR: Doesn't exist as of 2/6/2021 and you will need to write bridge code between react native (js) and native (swift/ObjC). There are big performance limitations with this approach. I recommend you create a native Swift based app for your project.
I was also curious if this is available.
For those willing to use Swift, here's the sample shown during the demo.
For those that want to use PencilKit / CoreML native libraries from React native you need need to write bridge code between Javascript (please use typescript) and the native code.
Here's more information on bridging and a guide.
For me, I will be building a note taking app and it needs to be performant. Despite being a react / react native developer I will be choosing Swift to build this project due to performance concerns.
Last point to make is that you can use react native and native together. But this is more of a headache than an enabler. AirBnB used this for some time but moved away from this approach.
For anyone new to React Native, it's a great platform. I personally like to use it for simple applications (not graphically intensive). You can also use it with the Expo tooling which speeds up prototyping but be warned some functionalities are not available bluetooth is one example.

Yes I Did it.
I created a native view for iOS Pencil Kit in React Native with Swift.
You can check basic examples for native module in my Repo

Related

Show dialogs from JUCE library

I want to develop an iOS/MacOS app which would use Metal for rendering. This is not supported as a “main window” by JUCE (yet). The reason I was to use JUCE is because it unifies acquiring access to audio interfaces, which is quite different between iOS and MacOS (and also has a GUI component for configuring the audio source, which AudioKit doesn’t have, which is why I don’t want to use it).
I’m struggling to generate a project in JUCE that would have Metal-backed view as a main component. So I’m thinking to instead make a library using JUCE, and then make two native apps for iOS and MacOS which would both use that library. The library would be used to show the dialogs for configuring the audio input (and other parameters that I have, through custom components).
The question: is it possible to make a JUCE library which would be capable if showing dialogs (on both iOS and MacOS) to configure my app, and then use this library from the native iOS and MacOS apps that would have a Metal-backed main view?
Thanks in advance!

Is possible to use React Native *only for UI* and the logic in .NET?

I need to create a multi-platform app for web, ios, android and partially desktop.
I wish to use .NET/F#, but the UI is a complication. I have tried Xamarin.Forms and it is too limited to me. I could live to use React Native but I don't wanna to code the full app in javascript, instead, I wish to use F# for all the logic and web backend, and use react only for the UI in mobile.
But I wonder how?
How feed data to the UI and react to events there?
P.D: If nativescript make this possible I'm all ears. I'm still not rule out xamarin for it, but forms is too limited and the nature of the apps and so far think react native is the closer to my needs.
There's already a sample of this, because the entry file of the Fable React Native demo is a pure JS file that calls the JS generated by Fable. You just need to extend this pure JS layer and import the code generated by Fable when needed.

Can I use F# to build a (cross-platform) library for use in an otherwise native iOS application?

Subject line pretty much describes it. I'm looking for a toolchain to build a cross-platform business logic library that would be consumed by (among others) an otherwise native iOS application.
I'm thinking about using F# for this library, as I like its functional approach and what I've read about performance seems at least reasonable.
I'm wondering how feasible it is to write this library in F# and then invoke/consume it from an otherwise native (probably Swift) application on iOS.
You can use Fable to compile your library and then write your app in React Native to consume it as a native app in iOS. Here are some interesting things you can do with Fable. http://www.navision-blog.de/blog/2016/08/14/fable-sudoku-creating-a-sudoku-solver-app-with-f/
If you don't want React Native, then your other option is to call the generated JS code directly from your native code, but that's a bunch of boilerplate and casting for each function call. How to call JavaScript Function in objective C
The solution I think you're hoping for is to be able to compile to Xamarin and use the library from an iOS app like a native library, however that's not possible.

combining flex UI with native objective c into single ios application

I am running out of time can anyone suggest me a good solution for my problem
Problem:
I am working in a ios project in which they have a UI designed already in flex a year ago..Now I have done all the backend coding with objective-c using apple native (IDE) xcode ,Now i dont know how I am going to combine the flex UI with the backend Objective c coding to integrate into a single application.
With Adobe Native Extensions you can do it, but I warn you, it'll be a hard game to get it start. http://www.adobe.com/devnet/air/articles/building-ane-ios-android-pt1.html

Using Protocol buffers in PhoneGap - iOS

I have used the c++ google protobuf classes in iOS using the native app approach, i.e. using Xcode, objective c, cocoa etc.
Now, I want to migrate to hybrid apps and I have explored the options on web, and according to my requirements i'm down to PhoneGap and Titanium. That will require me to use JavaScirpt, HTML5 (JavaScript only in Titanium as per my understanding) jQuery etc.
My question is, HOW am i supposed to access the my c++ protobuf classes from javascript. (i have no expertise in JavaScript).
I am also open to opinions on which hybrid-app framework to use.
Lords of web-dev....guide me.
With PhoneGap, if there is a phone feature that the PhoneGap APIs do not currently expose, or if you have some specialised native algorithm / function that you wish to access, then you need to write a plugin.
PhoneGap plugins provide a standardised mechanism for packing native code and accessing its functionality via JavaScript. See the PhoneGap Plugin Development Guide.
Personally I think PhoneGap is the best hybrid framework, it had been around for a while, is well documented, and has a healthy community.
This is an old question, but you can always use the 100% JavaScript implementation of ProtoBuf in your JavaScript code. It works well, and you can even precompile the .proto file if you want.
In Cordova it would be better to create a plug-in, but if you don't have time or skill to do that, the linked code works well.

Resources