include dojo toolkit in appcelerator titanium - dojo

I want to use dojoToolkit in my project. But when I include it with Ti.include('dojo/dojo/dojo.js') I have got a error message "defineAlreadyDefined". Titanium has method called define in global namespace and there is method with similar name in dojo. Also there are some other methods with similar names (for example, required). How can I use it?
P.S. I build my project for web

Dojo as is will not work in Titanium. Dojo is a browser toolkit, not a mobile toolkit, it accesses things that are only for the web.
But, this guy ported it over to work with titanium, try it instead.

Related

I want to add Appium (Script)Recording & Playback Functionality in Project is it possible

as we know Appium has functionality to generate script for Mobile Testing. actually I want to to add this functionality in project. is it possible using java.
You have to implement the functionality by yourself, probably build a full app.
Appium-Desktop is s Node.js application, if you are familiar with js you can get idea for implementation from source code

Titanium Module (is there any module or support of App dynamics for titanium appcelrator)

We have Some question Related about app dynamics module in Appcelerator.
How to use the iOS libraries in the appcelerator module which supports the framework of appdynmics. Is it possible to add a iOS native library in appcelerator titanium ?
Is there any support for appdynmics in appcelerator Titanium ?
Is there any module for the appdynmics in appcelerator?
1.: Yes, you can extend Titanium by creating modules or using Hyperloop. The best option currently is to create a module. Some documentation is available at:
* https://devblog.axway.com/mobile-apps/write-titanium-ios-native-modules-swift/
* https://wiki.appcelerator.org/display/guides2/iOS+Module+Development+Guide
the 2nd link also has an Android section if you are interested in that too.
Appdynamics SDK documentation can be found here: https://docs.appdynamics.com/display/PRO45/Instrument+iOS+Applications
2. / 3. No (at least not on github). There is a page at http://gitt.io/search?q=appdynamics where you can search for modules on github
So you can either create one yourself or make a offer in the Ti-Slack Job section (ti-slack.slack.com/). Perhaps you'll find someone who will create one for you.

Why do react-native packages use native SDKs and not JS/web versions?

Purely informational question, not really a problem but:
I remember following the instructions and seeing that there were some steps to get the react-native-fbsdk working. These steps involved messing with my android build.gradle and adding the iOS SDK and the info.plist and whatnot. That aside, why doesn't Facebook utilize the javascript SDK? Is it not possible? If so, why is it not possible for Facebook to do this? If it is possible, why did they opt to utilize the both the android and iOS SDK?
One value prop of React Native is that it's not just an HTML 5 website embedded in a native wrapper. It literally uses the native APIs/components, and the same goes for SDKs. Technically, a pure JS SDK could be optimized for a browser experience, rely on window or document, and while the functionality might be able to be executed natively, the polyfills provided in RN might not be enough to cover the implementation. The way it makes API calls are probably different too. The views are different too (no DOM in RN), so that would apply for any SDK views (button?).
I just finished converting an iOS SDK to a React Native package and I feel that the implementation will be more inline with how the original iOS SDK was designed, since it's using those methods under the covers instead of pure JS. JS is just invoking the native methods, not taking over the methods.
Just my $0.02...

Android code using Titanium

How can I access the Android Java code, created by the Titanium as a result of the Titanium development?
You don't have such a possibility since all the javascript code in Titanium is interpreted by a JavaScript engine internally and .class files are generated.
Follow this link for further explanation.
If you are referring to the interpretation of your javascript code, then you can't. Everything is turned into symbols for Titanium to interpret, but you can find this at your /build folder
Titanium use javascript code, Modules let you write code in a platform's native language (Java for Android), Titanium can use java native code in module and java code run in v8 。

Getting sproutcore application files to use them in a native app via Appcelerator Titanium

I would like build a app using sproucore framework, but i also want to integrate it with Titanium to have some desktop capability like file system, packaging, offline working etc...
I know that with sproutcore 2 this would be pretty easy since it allows to use the framework like a normal javascript library. But the project is still in beta and the docs are patchy at most (I consider patchy even the 1.x docs, actually).
So, I want to ask, which would be the best way to go to integrate sproutcore and Titanium API?
Titanium's main mission is to use JavaScript to build native apps, not to provide a OS-access layer for web apps. It would be hard to mix native and SproutCore UI elements.
That being said, here's some information that might help you:
Titanium has reversed it's application model starting with version 1.0:
http://developer.appcelerator.com/question/71/what-happened-to-html--css
The main app doesn't run in a web view anymore, instead it runs directly in JavaScriptCore and creates only native UI elements. One of the native UI elements is a web view
(http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI.WebView-object)
and it's possible to make that full screen and run your SproutCore app inside of the web view. From there, you can call out to Titanium to call Titanium methods for file system access and the like.
Also, if you only target the desktop, you could even access the JavaScript context object of a webview and use it directly in JavaScriptCore.
Johannes