Appcelerator Studio new project alternatives - appcelerator

I am new to Appcelerator Studio and a bit confused over the different alternatives when starting a new project.
I started two projects, one with menu
"New - Mobile App Project - (Project Template) Default Project", and the second with
"New - Mobile App Project (Project Template) Single Window Application".
Both projects have, Titanium SDK version 5.2.0.GA, Deployment Targets: iPhone, Mobile Web, and Unchecked Enable Appcelerator Platform Services.
Please see image link below from Studio Project Explorer on how these two projects look like:
The first project (DefaultProject) makes a single window with two tabs. The second project (SingleWindowApplication) just makes a single window.
Why are the structure of these to projects/apps that different?
In the first, the window creation etc. are done in app.js.
In the second, the code has been moved around to directories like common, handheld and tablet.
What should be the right questions to ask (for an app making beginner) in order to choose between those two "template" projects?
In the second project, why do I get the android and tablet directories? I did specify targets iPhone and Mobile Web.
Why is directory i18n present in the second project but not in the first?

At first, if you start learning Ti, I would start with an Alloy project and straight learn this route. Helps you to be more organized in your projects (MVC structure).
The projects you've created are classis Ti projects (works fine too). The different folders are just a way to organize your projects. You can create them in the first example if you like to. E.g. the i18n is just not part of the first template but if you start to create a multilanguage project you would just add it.
The targets you define are used during compiling. So if you compile it for iphone it won't add the android assets in there, so just ignore those folders (the template creates them). If you create a empty project from the command line ti create select app and android it will just create the android folder in the Resources directory. But if you run alloy new to create an Alloy project inside this directory it will automatically create all other asset folders (again, ignore them, they won't be used)

Related

Add target to iOS/macOS Multi-Platform Project (Xcode 12)

Xcode 12 (Beta) introduced the new multi-platform project template for iOS/macOS apps. If I add a new target (File -> New -> Target... -> Watch App), Xcode adds a new app project to the existing one.
My preference is, that the watchOS-Project uses the shared folder, like the iOS and macOS app.
My question is, how to integrate another app project, like watchOS or tvOS, to an existing multi-platform project? As a reference, I found a GitHub-Project, which integrated watchOS and tvOS in a multi-platform project: https://github.com/jordansinger/SwiftUI-Kit
I also struggled adding an new target for an additional platform. I ended up doing it like this:
Create new project for iOS platform and name it "iOS"
Rename project (first file in the file list) to your product name. Xcode will ask you if you want to rename all other project files -> click on "Don't rename"
While the project file is still selected, you see a column with the targets. Click on the "+" on the bottom and select the app template for an other platform (e.g. tvOS). Set the product name to "tvOS" and click on "Finish".
Add more platforms if needed.
Go through all targets and change the Bundle Identifier for each of them to the correct product name.
Create the following folders by right-clicking on the project file and choosing "New Group": Shared, Shared Tests, Shared UITests.
Now you move the files you want to share between all platforms from one of the platform folders to the "Shared" folder (e.g. ContentView.swift). Delete all those files from the other platforms folders.
Go through all the files in the "Shared" folder and select the other platforms under "Target Membership":
9. Do the same for the Tests und UITests
It's cumbersome, but it works. Maybe somebody else finds a better way...

The project structure is not shown correctly in the 'Project Tool Window'

The Situation:
Suddednly, one of projects I work with, is seen in a very shorten way in the Project tool window :
.hgignore
.hgtags
External libraries
Those are all visible things in the Project tool window. On the main frame the file I worked with is shown. And all its path is seen in the navigation bar. From the navigation bar I can reach to all folders of the project. (It is a VERY large utility project, containing all static pages, images and things for many usual projects). Naturally, I would like to work normally, using Projects tool window. But there, as you can see, all folders are invisible.
Opening/closing of project tool window, IntelliJ restart or cach invalidate and restart won't help - the picture remains the same.
If I am adding a module to the project, it IS seen. If I am adding a folder to the project, it is NOT seen. All existing inner structure in the project is in folders, not modules.
The Possible Reasons of the broke:
All changes that I had made to the project by hand, is adding an image file. But from TortoiseHg I had made some updates. For other projects. That very project is not even in the Tortoise list of repositories. But as I had loaded the project from repository sometimes, it is known by hg. All other team members see the project normally.
Target:
I would like to see the project back in all its beauty.

Create new single view application for iOS using command-line tools

Is it possible to create a new single view application for iOS using Xcodeproj?
https://github.com/CocoaPods/Xcodeproj/issues/304#event-418686970
Thanks.
"Single View Application" in Xcode is just a template.
Even in Xcode GUI, you could always create an empty project (not based on any particular template) and add the necessary new classes to it + configure the Info.plist appropriately so you'll end up with the same result as a project created using the template.
An Xcode template is just to make your project creation easy by allowing to create pre-configured projects, but doesn't do anything you couldn't do yourself manually.
So creating such a project using Xcodeproj is definitely possible, you just have to configure everything right to match what you have in the "Simple View Application" template (especially adding an properly configured Info.plist, an ApoDelegate and a ViewController to your project and maybe adjust its Build Settings — which are all possible using the Xcodeproj gem)
You could also be interested in liftoff, which is a tool that actually uses Xcodeproj to make your new Xcode projects creation from the command line easy.

Xcode Projects linking

I needed to make a project bundle with which has several small projects. When I try to add them into resources I get several errors. dont know where I am going wrong
The feature is called workspaces. You have to create an Xcode workspace (there’s a special command in the File menu for it) and then you can drag other projects into the left project sidebar. I suggest that you google for some Xcode workspace tutorial to walk you through.

Command line tool to add resources to an Xcode project

I've got an Xcode project that creates a standard application that can be branded in multiple ways and contain some custom content. At the moment I have a Resource "Resources > Tour Packages" with the custom files under this. At the moment every time I want to brand the app a different way I have to delete the old files from this resource and then manually add the new versions via the XCode UI. I can't post and image but it is here - http://img.skitch.com/20100121-xub48r6e1p857c84hdrgg25dw6.jpg).
My Question: Is there a command line tool that performs the same operation?
You'd probably be better off just creating multiple targets in your Xcode project, and associating the resources for each branded version of the app with one target.
To do this, just right-click on your target and select Duplicate. You should then remove the custom resources from the Copy bundle resources build phase. You can then add a new set of resources to the Copy bundle resources build phase that are specific to the new target. You can then build any target you like by selecting it from the Active Target popup in the Xcode toolbar or by selecting it in the Project > Set Active Target menu.
This way, you can easily build different versions of your app without having complete duplicates of all your source, difference Xcode projects etc.
Yes, the xcodeproj ruby gem allows you to add resources. https://rubygems.org/gems/xcodeproj/versions/0.28.2

Resources