4

I'm developing iPad application in Flash Builder 4.6. My application stop working on device when I load data from amfphp gateway. There are about 30 value objects in server response. When server responses with fewer data - app works fine.

So I guess problem in parsing AMF response. Is this iPad related policy? Can I add modifiers while packaging to avoid such problem?

Stan

Stan Reshetnyk
  • 1,986
  • 1
  • 13
  • 31
  • 1
    Does it hang on your development platform? Windows or Mac, when you test it? – ShaunOReilly Jan 27 '12 at 07:04
  • It works fine in dev env on my Windows 7. Problem is on device iPad1. I was also able to load and parse 200KB xml on device. But described problem is probably related to AMF, RemoteObject, amf class mapping. – Stan Reshetnyk Jan 27 '12 at 13:27
  • 1
    If it works with fewer objects, maybe memory is an issue here. Did you check the profiler for any memory leaks and overall memory consumption? – AlBirdie Feb 22 '12 at 18:51
  • 1
    As far as I know, AMF is not the problem. In fact there is a library for AMF on ipad called Cocoa-amf https://github.com/nesium/cocoa-amf – keyle Feb 22 '12 at 23:19
  • Thanks for looking. I disabled half of project and was able to move forward. – Stan Reshetnyk Feb 23 '12 at 09:31

1 Answers1

1

Problem already gone/solved. AMF works fine.

  1. Application id must start with correct string, defined in provision profile!

  2. Turn off debug mode. In both mxmlc and provision get-task-allow.

I think next affects as well:

  1. There should be no classes market [RemoteClass] and with arguments in constructor (even with default values).

  2. I had code where NetConnection.connect called very often. Increased interval.

Stan Reshetnyk
  • 1,986
  • 1
  • 13
  • 31
  • Same probleme here, could you please elaborate more on your answer? Should I explictly add the application-identifier and get-task-allow elements as entitlements in the air app descriptor? – Cosma Colanicchia Nov 22 '12 at 10:57
  • I don't remember what I've dealed with id. But I clearly remember another 2 issues: 1) value objects that went through de-serialization should have empty constructor. WITHOUT any even default arguments; 2) sometimes it hangs on accessing SharedObjects, but sometimes it doesn't (depending on prop). But pretty stable behavior. – Stan Reshetnyk Nov 22 '12 at 12:15
  • Thank you for the answer.. I'm struggling with an app that works fine in Android (debug or packaged) and in iOS debug/run/fast/standard modes from Flash Builder, but hangs on 2nd or 3rd call to a remote service when ad-hoc packaged.. server-side the requests is corrently managed, but the ipp hangs when it receives the data, before dispatching any result or fault event.. – Cosma Colanicchia Nov 22 '12 at 12:21
  • OK. Sounds similar to issue 1) in my comment. Try to remove arguments from objects constructor. – Stan Reshetnyk Nov 22 '12 at 18:00
  • 1
    Found the problem. Note that constructor arguments are okay if a default value is provided (verified it). In my case, the problem was related to a bug in a setter method of a deserialized object that was producing a stack overflow error (e.g. the setter method calls itself instead of its storage variable).. the emulator and the Android app at runtime simply give up without hanging (in debug, it will log the error in the console), while on iOS the entire application stops responding (no call stack limit check on transcoded app?). Thank you anyway! – Cosma Colanicchia Nov 23 '12 at 13:27