Sencha touch build error when native packaging for ios !AMDeviceSecureInstallApplication - extjs

When i try to package my application natively for IOS in Sencha Touch 2.1 it gives me this error:
Sencha Cmd v3.0.0.250
[ERR]
!AMDeviceSecureInstallApplication
The application was successfully packaged
The application was successfuly signed
[ERR] stbuild exited with non-zero code : 1
It's not working with Xcode please any help will be appreciated.
This is my packager.json
{
"applicationName":"Demoedifarm",
"applicationId":"com.palapa.demoedifarm",
"bundleSeedId":"S5583Y6VFB",
"versionString":"1.0",
//"versionCode":"1",
"icon": {
"57":"resources/icons/Icon.png",
"72":"resources/icons/Icon~ipad.png",
"114":"resources/icons/Icon#2x.png",
"144":"resources/icons/Icon~ipad#2x.png"
},
"inputPath":"./",
"outputPath":"../build/",
"configuration":"Debug",
"platform":"iOS",
"deviceType":"iPad",
"certificateAlias":"iPhone Developer",
//"certificatePassword":"",
"provisionProfile":"/Users/palapa1/Library/MobileDevice/Provisioning Profiles/CA412FD2-60D6-407E-B7AD-A34637A8FF55.mobileprovision",
//"sdkPath":"/path/to/android-sdk",
//"sdkPath":"/path/to/android-sdk",
//"androidAPILevel":"8",
/*"permissions":[
"INTERNET",
"ACCESS_NETWORK_STATE",
"CAMERA",
"VIBRATE",
"ACCESS_FINE_LOCATION",
"ACCESS_COARSE_LOCATION",
"CALL_PHONE"],*/
"minOSVersion": "4.2.1",
"orientations": [
"landscapeLeft",
"landscapeRight"
]
}

I'm running a more recent version of Sencha Cmd (3.1), and I believe the command syntax has changed slightly, but I hit this same error so I figured I'd put an answer out just in case it helps someone.
If I run the following command:
sencha app package run myConfigFile.json
Then it fails with the same error, and I don't know what the problem is. However if I change the config file so it is targeting the iOS Simulator (the 'platform' property) then it works fine (the simulator opens automatically).
If I run this command instead:
sencha app package build myConfigFile.json
Then it completes successfully, and I end up with a MyApp.app file in the output folder.
If I have the XCode Organizer window open, I can then drag this file onto the 'Applications' folder underneath my attached phone and it will deploy/install the app for me.

If you use a provisioning profile you need to set
"configuration":"Release"
instead of Debug in packager.json. That's a bug in the docs.
Also, see this post for a good tutorial: http://frightanic.com/software-development/sencha-touch-native-packaging-for-ios-done-right/

Related

android "open with" not listing chrome

I have a short python program running on Android 6.0.1 (Nexus 7 tablet)
It tells the OS to open up an html file.
Unfortunately, when I get the "Open with" dialog box, Chrome is not one of the options. If I pick Firefox, everything works, but I want Chrome.
Here is the python code:
import android
droid=android.Android()
file_name = "file:///storage/emulated/0/Temp/Newspaper/Comics.html"
intent = droid.makeIntent('android.intent.action.VIEW', file_name, "text/html").result
droid.startActivityIntent(intent)
Thanks!! That was the answer.
I was using SL4A to run the python program, so I'm guessing that the error is in their code. If I install ASTRO file manager and switch my python code to say:
file_name = "content://com.metago.astro.filecontent/file/storage/emulated/0/Temp/Newspaper/Comics.html"
It lets me pick Chrome and everything works.

Sencha cmd "app watch" fails

I'm using Sencha Touch 2.3.1
Sencha Cmd v5.0.0.160
After I generated sencha application using the command:
sencha generate app -name Stam -path ../StamApp
I tried run sencha app watch using:
sencha app watch
And the error I got is:
C:\sencha\StamApp\.sencha\app\build-impl.xml:242: The following error occurred while executing this line:
C:\sencha\StamApp\.sencha\app\watch-impl.xml:60: The following error occurred while executing this line:
C:\sencha\StamApp\.sencha\app\watch-impl.xml:40: Unknown attribute [refname]
Line 40 in watch-impl.xml:
<x-run-compass-watch directory="${app.sass.dir}" refName="compass-watch"/>
Note that I installed sass and compass, and it still doesn't work.
What am I missing?
For people like me:
look at rootdir/.sencha/app/watch-impl.xml
here find line with and replace :
<x-run-compass-watch directory="${app.sass.dir}" refName="compass-watch"/>
with
<x-run-compass-watch directory="${app.sass.dir}" /> <!--refName="compass-watch"-->
Start sencha app watch again and it runs.
This is a known bug, quoting an ExtJS Team Leader:
"Thanks all - that is the work around for this issue. We have it fixed for 5.0.1 and that is all it needed (removing "refName" from x-run-compass-watch call)"
I have tested it and I get the same error. It seems to be a bug, most likely in Sencha Cmd 5. Report it please on Sencha Forums.

Default app generated successfully but not working

I am new to Sencha Touch and Sencha Command. I downloaded the requisite tools to build a Sencha Touch app. When I use the following command in Sencha Command, the app is generated fine but when I try to access it using the browser I see only the loader.
sencha -sdk touch-2.3.1 generate app MyApp ./MyApp
When viewed on Firefox, it shows following errors in the console.
TypeError: Ext.Loader is undefined bootstrap.js: 7
TypeError: Ext.application is not a function app.js: 50
On some investigation, I found that it is looking for the above mentioned files in a directory named touch directly under http://localhost/. Whereas I have Sencha framework and my app under http://localhost/sencha/touch-2.3.1 and http://localhost/sencha/MyApp.
Some files under MyApp directory have the path mentioned to touch directory as ../../../../touch. If I copy the framework in http://localhost/touch it works fine.
Why should this happen? Shouldn't my app refer to http://localhost/sencha/touch-2.3.1 folder for dependencies?
I am using the default configuration to build a default application. Can someone guide me what I might be doing wrong?
Sencha Cmd assumes that your app runs at the root of the web server... so if you're running it from a subfolder, you might see problems like this.
You can set the correct paths manually to your resources in app.js
//at the very top, before Ext.appliction()
Ext.Loader.setConfig({
enabled: true,
paths: {
'Ext' : '../touch',
'My' : 'app' //or wherever
}
});
I think that should solve your problem, if I understand it correctly.

Sencha touch app remains on blue loading screen when viewing on Android device or emulator

I just created a basic sencha app by
sencha generate app --name AndroidDemo --path ../demo
and I viewed it in browser and everything is perfect.
I then followed the instructions here: http://www.sencha.com/blog/android-setup-for-sencha-touch/
and compiled the app with Sencha Cmd and when the emulator opens I only get a blue loading screen.
I also tried compiling/building the app with phonegap on phonegap build site and the build finishes successfully and after loading the app in my andoid device, again I only see the loading page and it stays on this page and the app does not launch.
I'm completely clueless. Need your help friends.
Thanks,
In your app code may be miner syntax error or other error so while app run in emulator check log cat or other option run or app in chrome and check console log. Because loading screen display in case of error as my expression with this.
i'm having the exact same problem..
(currently on windows, btw)
while it's not exactly a solution,
a workaround that i did (out of desperation to see the rest of my app on the emulator):
is to just install it directly to the emulator using the "adb" command.
haven't tried this on a mac, but i'm guessing it's almost the same thing?
after building the app using "sencha" cmd, open cmd/terminal to the build directory.
-assuming you did not change the output location, the apk will be created in your
project root folder under this folder:
"build\native-package-mobile\MYAPPNAME\packager.json\"
make sure the emulator is already running
run the following in command/terminal at the folder where the apk is located:
adb install -r MYAPPNAME.apk
wait for awhile and it should say successfully installed.
run the app in the emulator and hopefully it will go beyond the loading screen.
I don't know why this issue is happening though.
(only started tinkering with android dev/sencha yesterday and it seems to be doing all in it's power to prevent me from running my app. haha)
please share if you find the correct fix for this :)
This usually happens when you build your version and you did not imbed all needed components.
For example, when you use ...
Ext.Image
... in your code.
While running without ...
Sencha app build xxx
... Sencha will grab the component from the touch/src components folder.
But at the time you build the app, it cannot reference to that folder any longer and Sencha will stall.
Please open the console and look out for a warning like this:
[WARN][Anonymous] [Ext.Loader] Synchronously loading 'Ext.MessageBox';
consider adding 'Ext.MessageBox' explicitly as a require of the
corresponding class
You need to add these to the requires section of either App.js or a class where you use the item (here Ext.Messagebox).
Another way to find out what is happening is to run the build code inside the browser and look into the console (so instead of localhost/myapp/index.html you run localhost/myapp/build/{package}/{myapp}/index.html).
There is one other thing that might happen. It’s the scope of async operations.
Like this:
Ext.defer(function() {this.log(‘all good’);}, 500);
this is not the scope of your class.
You need to use:
Ext.defer(function() {this.log(‘all good’);}, 500, this);
Or you might even use ...
Ext.bind()
...to bind the scope to the function.

'CoreVideo/CoreVideo.h' file not found

When I run a iOS App on my device , This error will appear
'CoreVideo/CoreVideo.h' file not found
not matter what project even though create a new project , once run the app on my device this error will appear
but the Simulator will be OK~
and I can't find some frameworks in
Target--Build Phase--Link Binary With Librares--add
like AVFoundation.framework AudioToolBox.framework
Should i reinstall the xcode on my mac~???
Make certain you've added the CoreVideo framework to your project.
Here's how I do it in my own projects:
If you need help figuring out where it is (it's hidden within the XCode app package itself), let me know and I can show you.
Also, make certain "Target Membership" is checked for CoreVideo in the File Inspector of your project. It looks like this:

Resources