Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Help needed with Sencha touch 2.1.1 iOS native packaging not working on sencha cmd

  1. #1

    Default Help needed with Sencha touch 2.1.1 iOS native packaging not working on sencha cmd

    I searched in this forum and found somebody posted the similar error before, anyway I have valid certificate and provision, I don't know what I have missed.
    To reproduce, no code is needed, just run two commands. It generated MyApp package, but it failed to install on device. Can you please help?

    thank you!

    sencha -sdk /path/to/sdk generate app MyApp /path/to/MyApp
    sencha app build native
    Cmd v3.0.2



    [INF] Packaging your application as a native app to /Applications/MAMP/htdocs/MyApp/build/MyApp/native ...
    [ERR] failed running native packager
    [ERR] Assertion failed: (type_ == stringValue), function asCString, file src/json_value.cpp, line 679.
    The application was successfully packaged


    [ERR]
    [ERR] BUILD FAILED
    [ERR] com.sencha.exceptions.BasicException: The following error occurred while executing this line:

    The setting of package.json:
    {


    "applicationName":"My Application",
    "applicationId":"com.erprules.myAppID",
    "bundleSeedId":"73F33ZW49D",
    "versionString":"1.0",
    "versionCode":"1",
    "icon": {
    "57":"resources/icons/Icon.png",
    "72":"resources/icons/Icon~ipad.png",
    "114":"resources/icons/[email protected]",
    "144":"resources/icons/[email protected]"
    },
    "inputPath":"./",
    "outputPath":"../build/",
    "configuration":"Debug",
    "platform":"iOS",
    "deviceType":"iPhone",
    "certificatePath":"ios_development.cer",
    "certificatePassword":"",
    "provisionProfile":"Yuan_dev-3.mobileprovision",
    "permissions":[
    "INTERNET",
    "ACCESS_NETWORK_STATE",
    //"CAMERA",
    //"VIBRATE",
    "ACCESS_FINE_LOCATION",
    "ACCESS_COARSE_LOCATION",
    "CALL_PHONE"],


    "orientations": [
    "portrait",
    "landscapeLeft",
    "landscapeRight",
    "portraitUpsideDown"
    ]
    }

  2. #2
    Sencha User
    Join Date
    Apr 2012
    Location
    Brisbane
    Posts
    12

    Default

    Looking at you package.json your missing a p12 file in the doc under native packing it explains how this can be done. If your building on a mac you need to supply the certificateAlias instead.
    The setting of package.json:
    {


    "applicationName":"My Application",
    "applicationId":"com.erprules.myAppID",
    "bundleSeedId":"73F33ZW49D",
    "versionString":"1.0",
    "versionCode":"1",
    "icon": {
    "57":"resources/icons/Icon.png",
    "72":"resources/icons/Icon~ipad.png",
    "114":"resources/icons/[email protected]",
    "144":"resources/icons/[email protected]"
    },
    "inputPath":"./",
    "outputPath":"../build/",
    "configuration":"Debug",
    "platform":"iOS",
    "deviceType":"iPhone",
    "certificatePath":"ios_development.cer", <- must be a p12
    "certificatePassword":"",
    "provisionProfile":"Yuan_dev-3.mobileprovision",
    "permissions":[
    "INTERNET",
    "ACCESS_NETWORK_STATE",
    //"CAMERA",
    //"VIBRATE",
    "ACCESS_FINE_LOCATION",
    "ACCESS_COARSE_LOCATION",
    "CALL_PHONE"],


    "orientations": [
    "portrait",
    "landscapeLeft",
    "landscapeRight",
    "portraitUpsideDown"
    ]
    }

  3. #3

    Default

    After changing, I got the same error. Is the command correct to build iOS native package: sencha app build native

    thank you very much!
    thanks,

    Bill Yuan

  4. #4
    Sencha User
    Join Date
    Apr 2012
    Location
    Brisbane
    Posts
    12

    Default

    Can you copy the error in here?

  5. #5

    Default

    <code>
    [INF]
    [INF] -before-sass:
    [INF]
    [INF] -sass:
    [INF] [shellscript] identical ../css/app.css
    [INF]
    [INF] -after-sass:
    [INF]
    [INF] page:
    [INF]
    [INF] -before-page:
    [INF]
    [INF] -page:
    [INF] building application
    [INF] Deploying your application to /Applications/MAMP/htdocs/MyApp/build/MyApp/package
    [INF] Copied /Applications/MAMP/htdocs/MyApp/./app.js to /Applications/MAMP/htdocs/MyApp/build/MyApp/package/app.js
    [INF] Copied /Applications/MAMP/htdocs/MyApp/./resources/css/app.css to /Applications/MAMP/htdocs/MyApp/build/MyApp/package/resources/css/app.css
    [WRN] File or folder /Applications/MAMP/htdocs/MyApp/./resources/images not found
    [INF] Copied /Applications/MAMP/htdocs/MyApp/./resources/icons
    [INF] Copied /Applications/MAMP/htdocs/MyApp/./resources/startup
    [INF] Resolving your application dependencies (file:////Applications/MAMP/htdocs/MyApp/./index.html)
    [INF] Compiling app.js and dependencies
    [INF] Processing classPath entry : /Applications/MAMP/htdocs/MyApp/sencha-compile-temp-dir
    [INF] Processing classPath entry : /Applications/MAMP/htdocs/MyApp/touch/src
    [INF] Processing classPath entry : /Applications/MAMP/htdocs/MyApp/app.js
    [INF] Processing classPath entry : /Applications/MAMP/htdocs/MyApp/app
    [INF] Processing class inheritance graph
    [INF] Processing instantiation refereces to classes and aliases
    [INF] Processing source dependencies
    [INF] Concatenating output to file /Applications/MAMP/htdocs/MyApp/build/MyApp/package/app.js
    [INF] Completed compilation.
    [INF] Processed remote file touch/sencha-touch.js
    [INF] Processed local file app.js
    [INF] Minified app.js
    [INF] Minified resources/css/app.css
    [INF] Generated app.json
    [INF] Embedded microloader into index.html
    [INF] Generating native package
    [INF] Packaging your application as a native app to /Applications/MAMP/htdocs/MyApp/build/MyApp/native ...
    [ERR] failed running native packager
    [ERR] Assertion failed: (type_ == stringValue), function asCString, file src/json_value.cpp, line 679.
    The application was successfully packaged


    [ERR]
    [ERR] BUILD FAILED
    [ERR] com.sencha.exceptions.BasicException: The following error occurred while executing this line:
    [ERR] /Applications/MAMP/htdocs/MyApp/.sencha/app/build-impl.xml:137: com.sencha.exceptions.ExScript: Wrapped com.sencha.exceptions.ExBuild: failed running native packager (x-app-build#489)
    [ERR] [anonymous] (x-app-build:489)
    [ERR] each (/Users/billwyuan/bin/Sencha/Cmd/3.0.2.288/ant/ant-util.js:462)
    [ERR] runAppBuild (x-app-build:286)
    [ERR] [anonymous] (x-app-build:545)
    [ERR] x_app_build (x-app-build:543)
    [ERR] <script> (anonymous:1)
    [ERR] at com.sencha.exceptions.BasicException.wrap(BasicException.java:43)
    [ERR] at com.sencha.cli.Command.dispatch(Command.java:104)
    [ERR] at com.sencha.cli.Commands.dispatch(Commands.java:49)
    [ERR] at com.sencha.cli.AbstractCommand.dispatch(AbstractCommand.java:182)
    [ERR] at com.sencha.ant.SenchaCommandTask.doExecute(SenchaCommandTask.java:69)
    [ERR] at com.sencha.ant.BaseAntTask.execute(BaseAntTask.java:22)
    [ERR] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
    [ERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [ERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [ERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [ERR] at java.lang.reflect.Method.invoke(Method.java:597)
    [ERR] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    [ERR] at org.apache.tools.ant.Task.perform(Task.java:348)
    [ERR] at org.apache.tools.ant.Target.execute(Target.java:392)
    [ERR] at org.apache.tools.ant.Target.performTasks(Target.java:413)
    [ERR] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
    [ERR] at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
    [ERR] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    [ERR] at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
    [ERR] at com.sencha.ant.AntRunner.run(AntRunner.java:156)
    [ERR] at com.sencha.ant.AntRunner.run(AntRunner.java:72)
    [ERR] at com.sencha.command.BasePluginCommands$BasePluginCommand.run(BasePluginCommands.java:94)
    [ERR] at com.sencha.command.BasePluginCommands$BasePluginCommand.run(BasePluginCommands.java:98)
    [ERR] at com.sencha.command.BasePluginCommands$BaseNamePathCommand.run(BasePluginCommands.java:142)
    [ERR] at com.sencha.command.app.AppCommands$BuildCommand.execute(AppCommands.java:116)
    [ERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [ERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [ERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [ERR] at java.lang.reflect.Method.invoke(Method.java:597)
    [ERR] at com.sencha.cli.Command.dispatch(Command.java:78)
    [ERR] at com.sencha.cli.Commands.dispatch(Commands.java:49)
    [ERR] at com.sencha.cli.Commands.dispatch(Commands.java:49)
    [ERR] at com.sencha.command.Sencha.main(Sencha.java:71)
    [ERR] Caused by: /Applications/MAMP/htdocs/MyApp/.sencha/app/build-impl.xml:144: The following error occurred while executing this line:
    [ERR] /Applications/MAMP/htdocs/MyApp/.sencha/app/build-impl.xml:137: com.sencha.exceptions.ExScript: Wrapped com.sencha.exceptions.ExBuild: failed running native packager (x-app-build#489)
    [ERR] [anonymous] (x-app-build:489)
    [ERR] each (/Users/billwyuan/bin/Sencha/Cmd/3.0.2.288/ant/ant-util.js:462)
    [ERR] runAppBuild (x-app-build:286)
    [ERR] [anonymous] (x-app-build:545)
    [ERR] x_app_build (x-app-build:543)
    [ERR] <script> (anonymous:1)
    [ERR] at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:551)
    [ERR] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:444)
    [ERR] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
    [ERR] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
    [ERR] at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
    [ERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [ERR] at java.lang.reflect.Method.invoke(Method.java:597)
    [ERR] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    [ERR] at org.apache.tools.ant.Task.perform(Task.java:348)
    [ERR] at org.apache.tools.ant.Target.execute(Target.java:392)
    [ERR] at org.apache.tools.ant.Target.performTasks(Target.java:413)
    [ERR] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
    [ERR] at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
    [ERR] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    [ERR] at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
    [ERR] at com.sencha.ant.AntRunner.run(AntRunner.java:156)
    [ERR] at com.sencha.ant.AntRunner.run(AntRunner.java:80)
    [ERR] at com.sencha.command.ant.AntCommand.execute(AntCommand.java:75)
    [ERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [ERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [ERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [ERR] at java.lang.reflect.Method.invoke(Method.java:597)
    [ERR] at com.sencha.cli.Command.dispatch(Command.java:78)
    [ERR] ... 31 more
    [ERR] Caused by: /Applications/MAMP/htdocs/MyApp/.sencha/app/build-impl.xml:137: com.sencha.exceptions.ExScript: Wrapped com.sencha.exceptions.ExBuild: failed running native packager (x-app-build#489)
    [ERR] [anonymous] (x-app-build:489)
    [ERR] each (/Users/billwyuan/bin/Sencha/Cmd/3.0.2.288/ant/ant-util.js:462)
    [ERR] runAppBuild (x-app-build:286)
    [ERR] [anonymous] (x-app-build:545)
    [ERR] x_app_build (x-app-build:543)
    [ERR] <script> (anonymous:1)
    [ERR] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:116)
    [ERR] at org.apache.tools.ant.Task.perform(Task.java:348)
    [ERR] at org.apache.tools.ant.Target.execute(Target.java:392)
    [ERR] at org.apache.tools.ant.Target.performTasks(Target.java:413)
    [ERR] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
    [ERR] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
    [ERR] at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
    [ERR] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
    [ERR] ... 52 more
    [ERR] Caused by: com.sencha.exceptions.ExScript: Wrapped com.sencha.exceptions.ExBuild: failed running native packager (x-app-build#489)
    [ERR] [anonymous] (x-app-build:489)
    [ERR] each (/Users/billwyuan/bin/Sencha/Cmd/3.0.2.288/ant/ant-util.js:462)
    [ERR] runAppBuild (x-app-build:286)
    [ERR] [anonymous] (x-app-build:545)
    [ERR] x_app_build (x-app-build:543)
    [ERR] <script> (anonymous:1)
    [ERR] at com.sencha.util.JavaScriptHost.eval(JavaScriptHost.java:74)
    [ERR] at com.sencha.ant.ScriptTask.executeScript(ScriptTask.java:92)
    [ERR] at org.apache.tools.ant.taskdefs.optional.script.ScriptDefBase.execute(ScriptDefBase.java:50)
    [ERR] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
    [ERR] at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
    [ERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [ERR] at java.lang.reflect.Method.invoke(Method.java:597)
    [ERR] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    [ERR] ... 59 more
    [ERR] Caused by: org.mozilla.javascript.WrappedException: Wrapped com.sencha.exceptions.ExBuild: failed running native packager (x-app-build#489)
    [ERR] at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1786)
    [ERR] at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:183)
    [ERR] at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:247)
    [ERR] at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1701)
    [ERR] at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854)
    [ERR] at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
    [ERR] at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)
    [ERR] at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3178)
    [ERR] at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175)
    [ERR] at org.mozilla.javascript.Context.evaluateString(Context.java:1111)
    [ERR] at com.sencha.util.JavaScriptHost.eval(JavaScriptHost.java:67)
    [ERR] ... 66 more
    [ERR] Caused by: com.sencha.exceptions.ExBuild: failed running native packager
    [ERR] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    [ERR] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    [ERR] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    [ERR] at java.lang.reflect.Const
    [ERR] ructor.newInstance(Constructor.java:513)
    [ERR] at org.mozilla.javascript.MemberBox.newInstance(MemberBox.java:194)
    [ERR] at org.mozilla.javascript.NativeJavaClass.constructSpecific(NativeJavaClass.java:284)
    [ERR] at org.mozilla.javascript.NativeJavaClass.construct(NativeJavaClass.java:202)
    [ERR] at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1747)
    [ERR] ... 73 more
    [ERR]
    [ERR] Total time: 35 seconds
    [ERR] com.sencha.exceptions.BasicException: The following error occurred while executing this line:
    /Applications/MAMP/htdocs/MyApp/.sencha/app/build-impl.xml:137: com.sencha.exceptions.ExScript: Wrapped com.sencha.exceptions.ExBuild: failed running native packager (x-app-build#489)
    [anonymous] (x-app-build:489)
    each (/Users/billwyuan/bin/Sencha/Cmd/3.0.2.288/ant/ant-util.js:462)
    runAppBuild (x-app-build:286)
    [anonymous] (x-app-build:545)
    x_app_build (x-app-build:543)
    <script> (anonymous:1)
    </code>
    thanks,

    Bill Yuan

  6. #6
    Sencha User
    Join Date
    Mar 2013
    Posts
    2

    Default

    Same problem here. Three days I'm trying to figure it out! I managed to run the app on iOSSimulator but everytime I try to use the command: sencha app build native, I have the same problem of you.
    I did the provisioning as required, and here's my packager.json file contents

    {
    "applicationName":"justaname",
    "applicationId":"com.dominio.justaname",
    "bundleSeedId":"J32MP7F1GS",
    "versionString":"1.0",
    "versionCode":"1",
    "icon": {
    "57":"resources/icons/Icon.png",
    "72":"resources/icons/Icon~ipad.png",
    "114":"resources/icons/[email protected]",
    "144":"resources/icons/[email protected]"
    },
    "inputPath":"/Users/SERX/TEST_APPS/justaname/build/justaname/package",
    "outputPath":"/Users/SERX/TEST_APPS/justaname/build/justaname/ilmioiphone/",
    "configuration":"Debug",
    "platform":"iOS",
    "deviceType":"Universal",
    "certificatePath":"Certificates.p12",
    "certificatePassword":"pippo",
    "provisionProfile":"Justaname.mobileprovision",
    "sdkPath":"/path/to/android-sdk",
    "androidAPILevel":"8",
    "permissions":[
    "INTERNET",
    "ACCESS_NETWORK_STATE",
    "CAMERA",
    "VIBRATE",
    "ACCESS_FINE_LOCATION",
    "ACCESS_COARSE_LOCATION",
    "CALL_PHONE"],
    "orientations": [
    "portrait",
    "landscapeLeft",
    "landscapeRight",
    "portraitUpsideDown"
    ]
    }

  7. #7
    Sencha User
    Join Date
    Jun 2012
    Location
    England
    Posts
    17

    Default

    I have the same problem and for me i am sure its not within my app code because its compile and worked perfectly for Android.

    I guess somewhere in the certification and profiles is the error but i did not know how to fix it nor find out what actually is the problem. Please some expert or experience help here!!

  8. #8
    Sencha User
    Join Date
    Jan 2012
    Location
    Mumbai
    Posts
    9

    Default

    I've had the similar issues.....
    One solution to it is that you need to resign the app using Entitlements.plist on mac.....try this on your terminal ...

    codesign -f -dvvv -s "iPhone Distribution/Developer: ***hidden***" --entitlements "/path/to/Entitlements.plist" "***hidden***.app"

    On windows, you cannot codesign the ios app.....

  9. #9
    Sencha User
    Join Date
    Jun 2012
    Location
    England
    Posts
    17

    Default

    Hi aakash,

    When i compile my app, the compilation itself is not success, so i have a doubt whether the app will be compile correctly let alone the resign.

    So is there any way to fix this before compiling the app.? My detail problem is posted here: http://www.sencha.com/forum/showthre...g-for-iOS-Fail

    Thanks for the tip, I'll try it out if the compilation is fine and the app is having resign problem.

  10. #10
    Sencha User
    Join Date
    Jan 2012
    Location
    Mumbai
    Posts
    9

    Default

    Can you tell me what folder is it generating after your error....?

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •