Getting error while packaging the code for ipad device using flashbuilder - flash-builder

This is vengatesh. I am developing mobile application for android devices and apple ipad, using flashbuilder 4.5 premium.After the completion of code , I can easily create apk file for android devices but I couldn't be able to create ipa file for APPLE devices.While packaging , I got some java exception error like
"Exception in threa "main" java.lang.NullPointerException"
Please guide me on this issue . I am in urgency to complete my project for ipad devices
i used the my indexedarray as
for( var j:int = 0; j<controlsXML.length(); j++)
{
if(sectionXML[i].#Name == controlsXML[j].#SectionName)
{
indexedArray.push({controlName:controlsXML[j].#Name,Horder:controlsXML[j].#HOrder,Vorder:controlsXML[j].#VOrder});
}
}
indexedArray.sortOn(["Horder","Vorder"],[Array.NUMERIC,Array.NUMERIC]);

Try these links will helpful for you:
http://va.lent.in/blog/2011/03/25/air2-6-app-for-ios/
http://www.adobe.com/devnet/air/articles/packaging-air-apps-android.html
http://tv.adobe.com/.../build-your-first-mobile-application-in-flash-builder-45/
http://help.adobe.com/en_US/as3/iphone/WS789ea67d3e73a8b2-48bca492124b39ac5e2-7ffb.html
http://help.adobe.com/en_US/air/build/WSfffb011ac560372f2fea1812938a6e463-8000.html
http://www.riagora.com/2010/12/tips-for-flex-mobile-apps/
http://www.adobe.com/devnet/flex/articles/mobile_development_hero_burrito.html
http://tv.adobe.com/watch/adc-presents/flex-mobile-part-2-navigation-and-lists/
http://www.yeahbutisitflash.com/?p=986
http://www.instructables.com/id/How-to-use-Adobes-iPhone-Packager-without-an-Appl/
Are you following all the steps of packaging correctly?

Related

react-native-sound does not work on ios emulator

the below code works fine on android and the sound is played....however on ios simulator it does not.
Ive added my sound file to Xcode project, and no error is caught.....when I step through code, it runs this.sound.play() successfully and callback function is called...however you dont hear any sound.
import Sound from 'react-native-sound';
sound = new Sound('sound.mp3');
try {
this.sound.setCategory('Playback');
this.sound.play(() => {
this.sound.stop();
this.sound.release();
});
} catch (e) {
console.log('cannot play the sound file', e);
}
If you have the newest Xcode 11.6, did you try messing around with the settings in
Simulator > I/O > Audio Output
(if it's an older xcode, maybe Simulator > Hardware > Audio Output)?
Where you have put the sound file, please note that the sound clip files should be placed under the directory android/app/src/main/res/raw for android and For iOS, Add your sounds to Resources in Xcode project

Upload Instant App problem: The configuration APKs in your Instant App APKs should have targeting information

I am developing an instant app and have an issue with uploading to play console internal track.
I successfully built bundle with ./gradlew bundleRelease command, than generated apks with bundletool with mode instant enabled and launched instant app locally with ia tool.
But when I try upload apks.zip to play console I've got an error "The configuration APKs in your Instant App APKs should have targeting information."
What does mean this message? Can it be connected with bundletool? Or could you advise how correctly upload instant app apks.zip to play console?
Add the below line in manifest tag in your manifext file
android:targetSandboxVersion="2"
The problem was in Configuration APKs. They didn't have targetSdk information. I fixed it by adding this to build.gradle
bundle {
language {
enableSplit = false
}
density {
enableSplit = false
}
abi {
enableSplit = false
}
}

Worklight - EncryptedCache open fails with error status 10

I am having some problems with EncryptedCache on my HTC One Android phone.
The same code works on another phone and in the browser simulator but fails on my HTC One android phone with an unusual error code.
I am using: Worklight 6.2
Failing on: HTC one, android 4.4.2 (Cyanogenmod)
Working on: Samsung I9100 Galaxy S II
Working on: browser simulator
WL.EncryptedCache.open fails on my phone and return status 10..
(* WL.EncryptedCache.write fails on my phone and return status 6..)
I have also run the sample app from developerworks as-is on my HTC One phone with the same results and error code.
Sample app link
Logcat log:
Captured from Sample app
1) Destroyed cache
2) Entered a new key
3) Opened cache
4) Got alert error message
Full log can be downloaded from here
My code is:
function wlCommonInit(){
var STORAGE_ID = 'todos';
WL.EncryptedCache.open(STORAGE_ID, true,
function(){ //success
console.log('--> cache opened');
console.log("--> Loading Angular");
angular.element(document).ready(function() {
angular.bootstrap(document, ['todomvc']);
//location.hash = "/";
});
},
function(status){ //fail
console.log("WL.EncryptedCache open error status: " + status);
switch(status){
case WL.EncryptedCache.ERROR_KEY_CREATION_IN_PROGRESS:
alert("ERROR: KEY CREATION IN PROGRESS");
break;
case WL.EncryptedCache.ERROR_LOCAL_STORAGE_NOT_SUPPORTED:
alert("ERROR: LOCAL STORAGE NOT SUPPORTED");
break;
case WL.EncryptedCache.ERROR_NO_EOC:
alert("ERROR: NO EOC");
break;
case WL.EncryptedCache.ERROR_COULD_NOT_GENERATE_KEY:
alert("ERROR: COULD NOT GENERATE KEY");
break;
case WL.EncryptedCache.ERROR_CREDENTIALS_MISMATCH:
alert("ERROR: CREDENTIALS MISMATCH");
break;
default:
alert("AN ERROR HAS OCCURED. STATUS :: " + status);
}
});
}
Sorry to say I cannot currently reproduce this.
Installed Worklight Studio 6.2 from the Eclipse marketplace into a fresh copy of Eclipse and a new workspace
Downloaded the Encrypted Offline Cache sample project > import to Eclipse
Added the Android environment and > Run As > Run on Worklight Development Server
Installed on device (Nexus 5, Android 4.4)
Opened a cache, encrypted some value, closed cache, quit app, re-open, re-open cache, decrypt key, etc etc... all operations seem to pass.
Could you please use Wireshark while you use the app and provide the trace log from there?
In addition, if you could also try the above steps.
I too was getting the same error. My steps were open cache, write, close. Then open again and read.
The issue was close and open again. I kept the cache open for the entire session and it worked fine.
Looks like when you destroy cache, you might have to close it and open again to write a new entry.
Hope it helps.

IBM Worklight - AppCenter app missing Plugin 'com.ibm.mobile.InstallerPlugin'

I'm having the same problem as this user. I've built the IBM Worklight AppCenter client application using eclipse (AppCenter -> Run As -> Build All Environments) opened it in xcode (iphone -> Run As -> Xcode project) and run the app in the iphone emulator via xcode.
After I enter my Worklight server credentials in the app (username, password, server, port, context) a "Loading" message is displayed and the app ceases functioning.
I've debugged through the app's javascript and traced the problem to the app trying to execute a call to a Cordova native plugin:
cordova.exec(pSuccessCallback, // Success callback from the plugin
function(e){
console.log("Error connecting to server [code, msg, status] = "
+ e.errorCode + ", "
+ e.errorMsg + ", "
+ e.httpCode);
pFailureCallback(e);
},
'com.ibm.mobile.InstallerPlugin', // Tell cordova to run "com.ibm.mobile.InstallerPlugin" Plugin
'updateConnection', // Tell plugin, which action we want to perform
[pUsername, pPassword, pServerURL]); // Passing list of args to the plugin
This error message is displayed in xcode: IBMAppCenter[2315:70b] ERROR: Method 'updateConnection:' not defined in Plugin 'com.ibm.mobile.InstallerPlugin'
The native libraries implementing this plugin are in their expected locations but don't appear to seen by the application - IBMAppCenter/apps/AppCenter/iphone/native/appCenterLib:
Debug-iphoneos/libAppCenterInstallerLib.a
Release-iphoneos/libAppCenterInstallerLib.a
Debug-iphonesimulator/libAppCenterInstallerLib.a
Release-iphonesimulator/libAppCenterInstallerLib.a
Are there any additional steps required to include the native libraries in the application?
Any help would be greatly appreciated.
The method "updateConnection" is defined in the InstallerPlugin. I think it is simply the first method to be called of the InstallerPlugin, hence the problem might be that you accidentally removed the installer plugin.
The directory IBMAppCenter/apps/AppCenter/iphone/native/appCenterLib must contain the different versions of libAppCenterInstallerLib.a:
Debug-iphoneos/libAppCenterInstallerLib.a
Release-iphoneos/libAppCenterInstallerLib.a
Debug-iphonesimulator/libAppCenterInstallerLib.a
Release-iphonesimulator/libAppCenterInstallerLib.a
The method updateConnection is contained in libAppCenterInstallerLib.a.
If those libs are missing, you can copy them from the original installation directory of IBM Worklight.
Please never delete the native directories of IBMAppCenter/apps/AppCenter before regenerating the iphone or Android environment. If you delete the native directories, you delete those required libraries, and then the AppCenter client is not functional.
I managed to fix this by upgrading to Worklight 6.1.
In recent versions of Cordova, the Plugin method signature has changed.
Verify this by extracting the libAppCenterInstallerlib.a with:
ar -x libAppCenterInstallerlib.a
then run:
nm IBMAppCenterPlugin.o
look for the initInfo or updateConnection methods. If they have :withDict in the method signature, then this is deprecated in recent versions of Cordova.
Using the AppCenter project from Worklight 6.1, I no longer see this issue.

ClassNotFoundException on app startup (on device)

I have been able to run my app exactly ONCE on the device (N8). Since then I always get a ClassNotFoundException when I launch it. It goes like this:
ClassNotFoundException:
com.greencod.pinball.nokia.PinballMIDLet
at java.lang.Class.forName at
...rtCldc.loadApplicationClass at
...rt.jvm.loadApplicationClass at ...
Invoker.handleStarRequest at
...l.rt.midp.MidleInvoker.run at
java.lang.Thread.run
Note that the app runs fine on the emulator. Also, the first time that it ran was througth the debugger in eclipse. Now the debugger or a plain install doesn't produce an app that can run. I am new to Nokia development, so I must be doing something stupid, I just don't know what :) I am using the Symbian^3 SDK 0.9.
To get the application on the phone, I click 'create package' from the manifest view, which build the jar/jad files for 2 targets: SymbianEmulator and SymbianDevice, which I installed by scanning the SDK folder. After I have tried uploading the file to the device by dropping it in the Install folder, by using the debuger in eclipse and with the Ovi program on my computer. The phone itself is configured to accept unsigned application.
I am quite lost and any help is welcome.
Additional Info
Eclipse is building the jad for me, so I'm not sure that is the problem. Here is the jad file:
MIDlet-1: Pinball Deluxe,,com.greencod.pinball.nokia.PinballMIDLet
MIDlet-Jar-Size: 1882
MIDlet-Jar-URL: Pinball-MIDLet.jar
MIDlet-Name: Pinball Deluxe MIDLet
MIDlet-Vendor: GreenCod
MIDlet-Version: 0.1.0
MicroEdition-Configuration: CLDC-1.1
MicroEdition-Profile: MIDP-2.1
Navi-Key-Hidden: true
Nokia-MIDlet-App-Orientation: portrait
Nokia-MIDlet-On-Screen-Keypad: no
And here is my class declaration:
package com.greencod.pinball.nokia;
import javax.microedition.lcdui.Display;
import javax.microedition.midlet.MIDlet;
public class PinballMIDLet extends MIDlet { ... }
It has been solved: nokia forums. Basically the problem was that the build.properties of the project were messed up.