How to run a titanium module using Titanium 3.2.2 - ios

I am currently using Titanium 3.2.2 and Xcode 5.1.
I am following this documentation to create a module for my xcode project: https://wiki.appcelerator.org/display/guides/iOS+Module+Development+Guide
But this documentation is quite old and run command isn't excutable in this titanium.
Also how can I run titanium module using titanium application and not through command-line.

Try this link, much more up to date:
http://docs.appcelerator.com/titanium/3.0/#!/guide/iOS_Module_Development_Guide
Mostly you have to build the module and then drop the zip that is created into the correct folder, then add the Module in the Titanium tiapp.xml

See here for using legacy command line command
http://docs.appcelerator.com/titanium/3.0/#!/guide/Legacy_Command-Line_Interface-section-29004835_LegacyCommand-LineInterface-OSX
In short:
alias titanium.py="/Library/Application\ Support/Titanium/mobilesdk/osx/<VERSION>/titanium.py"
alias ios_builder="/Library/Application\ Support/Titanium/mobilesdk/osx/<VERSION>/iphone/builder.py"
or
alias titanium.py="$HOME/Library/Application\ Support/Titanium/mobilesdk/osx/<VERSION>/titanium.py"
alias ios_builder="$HOME/Library/Application\ Support/Titanium/mobilesdk/osx/<VERSION>/iphone/builder.py"
And please use titanium.py to create module project. Module projects created by titanium CLI cannot be run by titantium.py
I have created a ticket here: https://jira.appcelerator.org/browse/TC-4722
I think this may be a bug or incompatibility of titanium.py, but the project structure may be more appropriate than titanium.py (separate android and ios spaces in one module project), so for now, I just use ti to create a project structure, and copy assets, example and documentation to iphone directory and add .gitignore to ignore them.

Gulp #FTW
"gulpfile.js for Titanium Module Project"
https://github.com/yomybaby/gulpfile-timodule

Related

Recreate Flutter's ios and android folder with Swift and Kotlin

Hi I just found out that it is possible to create Flutter project with Swift and Kotlin. However, I'm already invested in my current projects and want to recreate the ios and android as Swift and Kotlin (currently they are default to Java and ObjC).
Thanks.
use -i and -a to create new project, like this:
flutter create -i swift -a kotlin project_name
see also:https://docs.flutter.dev/development/platform-integration/platform-channels#example-project
then replace with lib folder from old project.
update 2020.01.13
swift and kotlin are default now. you can use those command to update exist project:
cd project
flutter create .
this command will update your project. then you can merge you old code into new project, and remove old code.
make sure you backup your project before run it, and you know what are you exactly doing
You can also run flutter create -i swift . inside your app folder, to regenerate ios folder.
I've not tested android, but I guess the same should work for it too - flutter create -a kotlin .
I just deleted default ios and android folder in my flutter project.
now in order to generate these default folder again you can use this below command :
flutter create .
Note : "." is also part of command , also make sure that your project folder name should not contain spaces or special characters which are invalid for package name.

libGDX RoboVM fork iOS build error

I always get the same strange error when I try to run the iOS version of my libGDX game. The error only shows this message: Error:com.android.tools.idea.gradle.util.Projects.lastGradleSyncFailed(Lcom/intellij/openapi/project/Project;)Z
I can sync gradle successfully but the error message stays the same. It was suggested to use the same android studio version as the RoboVM fork version, so I did that. Now I use version 2.3.0 for them both, but it wasn't fixed by doing this. To set up RoboVM I followed the instructions from the RoboVM fork website: http://robovm.mobidevelop.com/.
Does someone know how to fix this problem?
RoboVM having some incompatibly issue with Android Studio/IDEA, version 2.3.0.
Try to use MobiDevelop RoboVM 2.3.2-SNAPSHOT version that having fixes for the same.
There is a pull request for this problem in master branch, you can check that.
You can work-around this problem with Android Studio higher than 2.2 (I am using AS 3.0 Canary 3, which supports Java 8 features) by splitting your project into two separate projects, one for Android and one for iOS, sharing an imported module where all the common code is.
To set this up you will need to copy your iOS app module into a separate folder. I use this structure:
Toplevel
android
androidApp
lib
ios
iosApp
Each project should have a copy of the gradle.build, gradlew script and gradle folders - easiest way is just to duplicate the tree then remove androidApp from one and iosApp from the other.
Both the android and ios folders contain a top level build.gradle, and a settings.gradle file. The common code is in the lib directory, so the ios folder will need a settings.gradle like this
include ':iosApp', ':lib'
project(':lib').projectDir = new File('../android/lib')
while the android project settings.gradle looks like this:
include ':lib', ':androidApp'
Open each project in its own window in AS, you can now build and run them independently. You can test from the command line (often easier to debug gradle issues) by using
gradlew androidApp:assembleDebug
for the android project and
gradlew iosApp:assemble
for the ios version.
The only issue I currently have with AS 3 is an occasional null pointer error during the dexing phase in the android project. Building from the command line makes this go away for a while. You can of course use AS 2.3 which does not have this issue (but doesn't support Java 8 features like lambdas in Android.)

Yocto SDK with cmake toolchain file

I provide a Yocto SDK to cross-build an application for an embedded target. The application itself is built using CMake. The SDK setup script provides many necessary environment variables (like location of the cross-compiler, sysroot, etc.), which so far was enough to build the application.
However, since recently the application has a dependency to the Boost library (through the command find_package(Boost REQUIRED) in the CMakeLists.txt). Now CMake complains that it cannot find the library, even though it's installed in the SDK sysroot. But if I build the application directly in Yocto, it works fine.
After some research it turned out that Yocto generates a toolchain.cmake file which is added to the cmake call. In this file, the variable CMAKE_FIND_ROOT_PATH is set, which CMake needs to find libraries. Using such a toolchain file, I can also build using the SDK.
Now I'm wondering if Yocto provides any mechanism to export such a toolchain file with the SDK. Or alternatively if the SDK provides a script or something to automatically create a toolchain file directly on the SDK build host.
Or shall I just tell the users of the SDK to manually create a toolchain file and add it to their cmake call?
Assuming that you're using the image based SDK, i.e. building it with bitbake <image> -c populate_sdk, adding the following toimage.bb should fix it:
TOOLCHAIN_HOST_TASK += "nativesdk-cmake"
That should give you a OEToolchainConfig.cmake file in the SDK. After sourcing the SDK environment file, cmake will be an alias to cmake -DCMAKE_TOOLCHAIN_FILE=$OECORE_NATIVE_SYSROOT/usr/share/cmake/OEToolchainConfig.cmake to further help your developers.
I'd like to add to Anders answer that while it worked great for me to add nativesdk-cmake this way it did not work when I tried to add nativesdk-python3-numpy. After some googling I found this, suggesting that TOOLCHAIN_HOST_TASK has to be extended using _append instead of +=.

add new plugin to phonegap 3.4

I'm trying to add new plugin (https://github.com/xu-li/cordova-plugin-wechat) to my phonegap project. but I get stuck on the installation number 1.
For number 1, they said Add wechat lib to your project. Don't forget to add the "URL Type". but I don't know where should I put library files to? which folder? because I know that every time I use cordova build ios command, it will generate new project files in platforms/ios. Should I put library files after generated?
Thank you.
Make sure you have install the required SDK. use command $ cordova platform add ios. Now add the generated files in the project folder. See if this works. Add Cordova command script file if required.

Phonegap 2.1.0 Cordova/CDVViewController.h file not found

I have installed Xcode 4.5 (no previous phonegap version installed). I have downloaded,extracted and created project by Phonegap tutorial : http://docs.phonegap.com/en/2.1.0/guide_getting-started_ios_index.md.html#Getting%20Started%20with%20iOS
After the terminal command : ./create myproject ~/Desktop/myproject com.test.myproject I have successfly created structure.
Than i launch xcode and wanna Play this example project. Xcode build Fails and says:
Lexical or proccessor issue 'Cordova/CDVViewController.h' file not found
I tried to add this missing header in to classes folder, repaired the import syntax, but still same problem.
Does anybody solved this problem?/HOW?
After many attempts I decided to read Readme.md and solve the problem using ./update_cordova_subproject!
Create project using:
./create ~/Desktop/project com.example.project project
Update cordova subproject reference:
./update_cordova_subproject ~/Desktop/project/project.xcodeproj
Build successfull now!

Resources