I have a Titanium application and I want to put few UI screens which have been developed using iPhone SDK (native) inside it.
Titanium app starts and at some point it calls the native UI classes and the the native classes cotinue the navigation.
I need to switch back and forth accordingly as well.
Obviously I need to pass patameters between them.
Can these requirements be developed using iOS Module Development which can be found at iOS Module Development- Titanium
Or is there a better way?
Creating a custom module is the only way to do this besides re-writing your Obj-C code in Titanium.
Modules are really not that difficult! The link you provided is a great starting point, also I would check the moddevguide example module which is chock full of examples of passing data back and forth. Also, the paint module is a great example of subclassing UIView to roll your own titanium component.
Related
Confused as any newbie would be!
I am a React Native newbie. Following a tutorial I created a project. I can use XCode to open the native iOS project in /iOS. What do I use for the javascript files in the root folder? Should I use a second editor for js - i.e. one of the standard js editors (Atom, vi etc). What is the best-practice workflow? Or can I accomplish everything with one editor. Advice, recommendations would be most appreciated.
CLARIFICATIOINS:
To clarify my question, take the following sample project:
I want to write a react native app which opens to a table view i.e. list screen with multiple items in a list screen. When you pick one item in the list the app navigates to a details screen. Suppose the list screen is React Native and the details screen is Native iOS. I can code up the list screen using VSCode in React Native js. And then I can code the native details screen in XCode. So for the native part I can open XCode and create a fresh project. What kind of project should this be? Should it be an IOS App or am IOS framework/library? Perhaps a main app as the AppDelegate and a test harness, and a framework/library for the one View Controller screen I will need to import into my React Native project? And then how do I run this to test and debug it out end to end in the simulator? I can possibly correct and live reload the React native portion, but suppose I want to update the iOS portion, what step do I need to go back to? etc.
It's not very common to do your coding work directly inside XCode. XCode is more of a place to organize your project/environment/builds/signing etc...
Instead you should be writing all of your code inside the editor of your choice. The standard workflow would be:
Create project on command line
Use your editor of choice for coding. I use VSCode.
in your editor, open your project folder that you just created
use XCode for running the ios emulator and super specific iOS tasks
All Android specific work can easily be done in VSCode (you don't ever actually need to use Android Studio)
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
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.
I have an existing iOS (Swift- and storyboard-based) app and I'd like to use cross-platform OpenFrameworks code in just one UIViewController. However, I notice that the demo OF projects take over the iOS application lifecycle up to the application delegate class and even contain a customised main.mm file. Has anyone managed to create a storyboards-based iOS project where use of OF is restricted to a single view controller?
Is there a way to use native ui components except delivered by react native (ListView, Text, etc) in js file?
For example, I have application created by react native and I want to use MWPhotoBrowser in it.
Yes. If you take a look at this section of the docs, under the title "Extensibility", then there's a bit that says "Custom iOS views can be exposed by subclassing RCTViewManager". This should get you started and then you can look at the React Native source code for examples of view classes that subclass RCTViewManager.