Cordova 2.1.0 not getting included in the project after install - objective-c

I am creating an IOS app with cordova 2.1.0.
I installed cordova 2.1.0, by following the steps mentioned in http://docs.phonegap.com/en/2.1.0/guide_getting-started_ios_index.md.html#Getting%20Started%20with%20iO
Now i made changes to files like AppDelegate.m, AppDelegate.h, etc. and www folder. When i see the physical folder structure in the project, the CordovaLib.xcodeproj does'nt get included in the project. Why is this happening? Why is it not getting included in the project. Every user will not download cordova and follow the steps.
Any help will be appreciated.
Thanks.

What do you mean by "user will not download". The developer (you) have to downlod it nd create the app. Cordova is packaged within your *.ip file.
If the cordov project is not oincluded, you will be unabvle to build. If you cn build it, it is included.
If you don't want to handle the complete xcode project stuff, use build.phonegap.com

Related

Missing fonts when building/running Appcelerator app from XCode

I've recently updated from Titanium w/3.5.0.GA SDK to Appcelerator Studio w/5.2.0SDK and can no longer build and run the appc (5.1.0 CLI) generated projects in XCode (7.2.1) without losing the ability to display my custom font resources (app/assets/fonts).
When building a project for iOS in studio (latest 4.4.0) and deploying to connected iPhone 6 (running 9.2) all fonts appear correctly in app. However when building and running the <projectname>.xcodeproject that is generated by appc during this process the same fonts do not show?
Is this related to https://jira.appcelerator.org/browse/TIMOB-19818 ? Is there any fix on the horizon if so?
I have always relied on modifying the generated projects to include other asset catalogs and manually alter the build and version numbers prior to appstore submission so am very curious to find a solution to this issue - all help much appreciated!
FYI - for reference, I've tried to build the same project generated in Titanium studio w/3.5.0.GA within the Latest XCode (7.2.1) as above and the fonts still work correctly so this issue seems to be with Appcelerator Studio with CLI 5.1.0 and SDK 5.2.0 combination.
You can follow this below two steps. This is a workaround, might work for you.
Step 1: Grab resource files from debug ipa:
a. Build a debug version for your iPhone device.
b. After the app has successfully launched on your iPhone, navigate to the ipa file in the debug build folder. Click right on the file (or cmd-click) and choose to uncompress the file
c. In the extracted archive find the payload file. Also right click on the file (or cmd-click) and choose to show its contents.
d. You should now see your resource files and folders. Select all the required files and folders and copy them in some new folder.
Step 2: Add files to XCode project
a. Open the build XCode project with XCode
b. In the left column right click (or cmd-click) on your project
c. Choose "Add Files to [project name]"
d. In the file dialog multiselect your files and folders you copied from the debug ipa in step 1
e. That's it. Now archive your product and submit it.

dojo/_base/*js missing from worklight apk in wl 6.1

I have a hybrid app that was created with WL 6.1 that uses the included dojolib. Currently it is in production for iphone and we are adding the android flavor of it. When running the code from the mobile simulator on the console, both the android and iphone work fine. The ipa file works fine. When I run the hybrid on an android device (Samsung S4), the application throws errors in the log on app startup. I have the "provide dojo libraries" turned off. In the DDMS log I see statements like the following:
09-09 12:47:12.092: E/AndroidProtocolHandler(20324): Unable to open asset URL: file:///android_asset/www/default/dojo/_base/declare.js
09-09 12:47:12.263: E/AndroidProtocolHandler(20324): Unable to open asset URL: file:///android_asset/www/default/dojo/_base/connect.js
09-09 12:47:12.303: E/AndroidProtocolHandler(20324): Unable to open asset URL: file:///android_asset/www/default/dojo/_base/event.js
Looking out in the android project in eclipse, I see those files in the "assets/www/default/dojo/_base" directory. The issue is when I look in the APK file, the "_base" directory is not there. Any help as to understanding why it is missing?
Your application should be using the compiled version of the dojo files, it seem that its not.
i would check
These files : core-web-layer.js and mobile-ui-layer are in your www folder
That the wlCommonInit function includes below:
function wlCommonInit() {
require([ "layers/core-web-layer", "layers/mobile-ui-layer" ], dojoInit);
}
I've also found an alternative way to get around the android packaging bug. As I mentioned earlier one way is to use the DojoBuildFactory to create a new layer that would have the files imbedded in them. This is the same process that WL uses to create the core-web-layer and mobile-ui-layer. I have a team working on this, but the documentation is ... scant and it is a time consuming process.
While they were doing that, I found what I think is a cleaner way of addressing the issue. Effectively open up an unsigned apk, insert the files, and then sign the APK. Worked like a charm. Here are the steps I used:
Build from working pointing to the correct worklight server and with the provide missing dojo libraries turned off
Export as Android project as an unsigned apk
Open command prompt with right env settings pointing to JDK and ADT
Create keystore (if not already done)
Unpack into temp using jar
Copy dojo files over from android/native/www/default
Pack back into apk using jar
Sign the jar
Zipalign the jar
Now you have a working apk that includes the files/directories in asset that begin with a "_".

Apache Cordova (3.4.0) CLI install on Windows

I am trying to install cordova, I do excatly what is said in the CLI tutorial here.
After creating a new App
cordova create hello com.example.hello HelloWorld
I list all platforms and see following:
Where is other platforms liks ios? Moreover, when I try
cordova platform add android
I get following error:
What I am doing wrong or what is wrong with the Cordova?
To work, this cordova command needs to use some programs located into your sdk/tools directory. You need also have installed apache ant.
Then you must add these directories into your PATH system variable:
Background:
let's assume you have installed your Android SDK to the c:\sdk\android directory
you have installed you Apache ant to the c:\tools\apache-ant directory
Then you must create two system variables:
ANDROID_HOME with the c:\sdk\android value
ANT_HOME with the c:\tools\apache-ant value
Finally, you must modify the PATH variable and add those two to the end of the PATH' value:
;%PATH%\tools;%ANT_HOME%\bin;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools
NOTE: for those who uses Linux, the instruction differs a bit.
More documentation available here.

Appcelerator Titanium Module - Verification issue, unlicensed module(s)

I had found a module in the appcelerator marketplace to allow for the rotate gesture called gesture recogniser but unfortunately it's now been removed when i went to purchase but it looks like the developer has also released the module as a 'skeleton' version on github here:
https://github.com/atsusy/Gesture-Recognizer
Now i followed the instructions on the readme file and built the project which created the module for me, when putting this into an app though i get the following error message and red screen:
Verification issue
Unlicensed module(s) detected.
You must be a subscriber to use one or more of the modules included with this project
Is there something i have missed to get this and how to i go about resolving the issue? Sorry i have no clue when it comes to github and modules so apologies if i am trying to use this in my app when i shouldn't but if anyone can help explain how and if i am allowed to get this working?
p.s the original link for the marketplace link that is now not found is: https://marketplace.appcelerator.com/http-status/?1894758329
You need to follow steps as follows:
Open Terminal and run “uuidgen”
Copy the code you see on the terminal
Open tiapp.xml, replace what’s in the “guid” tag with the the code you copied.
In Titanium Studio, do Project –> Clean
Run
Concept is to change GUID of module which is mentioned in manifest.
If you have the source code, just go the the manifest file, change the guid in the manifest to a new one, and build the module again. Probably better to increase the version and include it in your project again. Clean and build and it will work.
I guess the Titanium studio checks if you have licence for the modules you use. In case a module is on the marketplace with the same guid and you have no licence for that, it triggers it as unlicensed module.

How do I use a new framework I have built?

I have had some issues with the AWS IOS SDK framekit, since it was not built to work with OSX apps. I found a modified version of the SDK that Brad Larson created.
The directory structure looks something like:
AWSiOSSDK.framework/
src/
--Amazon.Runtime/
--Amazon.S3/
..
--AWSCocoa/
----AWSCocoa_Prefix.pch
----AWSCocoa.xcodeproj
----etc
--include/
So if I go into the xcode project, and build AWSCocoa it compiles. But when I look at the timestamp on the AWSiOSSDK.framework, it hasn't changed. So I don't know what compiling this AWSCocoa gets me, or where I can find the files it creates. So assuming that building AWSCocoa.xcodeproj is supposed to build a new version of the framework compatible with OSX development, where do I find and link what I've built?
The AWSiOSSDK.framework bundle is a precompiled framework, probably left over from my earlier experiments in making a Mac version of this (since you can't use frameworks like this with iOS, only static libraries). Ignore that.
If you are using Xcode 4, your built framework will be created somewhere in your ~/Library/Developer/Xcode/DerivedData/ directory. To find where it lies, go to your project navigator in Xcode 4, expand the Products group, right click on AWSCocoa.framework, and select Show in Finder. This is no different from any other third-party framework you would compile.
Nominally, you'll want to add this framework as a target dependency in your application so that it is built alongside that. You'll also have to make sure that the framework is copied into the appropriate location within your application bundle so that it can be used by your application at runtime.