playMaker

Author Topic: IOS publishing notes  (Read 39808 times)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
IOS publishing notes
« on: February 09, 2013, 02:35:34 AM »
Hi Everyone,

Publishing for IOS can be tricky sometimes. This is especially true if you are using "Get Property" and "Set Property" as it uses reflections and this cause problems depending on your IOS publish settings.

General IOS publishing settings:

Script call optimization
IN ALL CASES: do check the publish option "Script call optimization" to  "Slow and Safe" when you tests your games, because if you get an error, the app will less likely crash, and you will be able to have more logs to pin point the problem in xCode console. Only select the option "Fast but no Exception" when you have a game that runs without any errors in Xcode console.

Symlink
Check "SymLink" on. This feature is not very well documented, so I am not sure myself what it exactly do, but if I don't check it, all attempt fails when I use "Get Property" and "Set Property" actions.

Stripping
Stripping is a one way to optimize your final application size:
http://docs.unity3d.com/Documentation/Manual/iphone-playerSizeOptimization.html

And depending on your stripping option you may not be able to compile or have errors when you play leading to crash or bugs.

DO NOT select the "micro mscorlib", it's too optimized when using "Get property" and "Set property" actions.

link.xml
There is way to explicitly define what class not to strip so that reflection work, but so far I failed to find proper documentation as to how to fill that link.xml for a monobehaviour. There is a Wizard that will help you setup this link.xml without any effort on your end.


This post is very much a work in progress. Don't hesitate to share your knowledge, expertise, findings and thoughts to make this guideline as accurate and helpful as possible.

Bye,

 Jean
« Last Edit: September 10, 2015, 12:29:23 PM by jeanfabre »

julius

  • Playmaker Newbie
  • *
  • Posts: 15
Re: IOS publishing notes
« Reply #1 on: February 11, 2013, 11:22:06 PM »
Just a few things,

Symlink Unity libraries means that Xcode project generated by Unity will directly reference Unity iOS runtime library from Unity Editor install location. It saves your disk space (runtime lib is ~300 MB) and Unity Editor can faster generate Xcode project, because it does not need to copy additional 300 MB.

You should not use it when:
a) you are exporting Xcode project which you are going to share with somebody else
b) you are exporting Xcode project to make final build and you want to archive it for backup purposes.

As for why you are getting errors with useing "Get Property" and "Set Property" actions when its unchecked is quite strange, re-install unity perhaps to get a clean  iOS runtime library.


As for the micro mscorlib what do you mean by it's too optimized? Does it generate errors or cause actions/scripts to be run out of order?
« Last Edit: February 11, 2013, 11:28:21 PM by julius »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: IOS publishing notes
« Reply #2 on: February 12, 2013, 12:18:47 AM »
Hi,

 Yes, this is very odd. People are also helping me on UnityAnswers, but I fear this issue is twisted...

http://answers.unity3d.com/questions/397136/linkxml-for-a-monobehaviour.html

yes, Simlink  is odd. The problem is no one seems to host a definite clear answer, and I seem to have to trial and error all this, where really some definite step should be there. On UnityAnswer they seem to say link.xml is not required, but without simlink, it just doesn't even compile to begin with...

I really doubt reinstalling Unity would solve the problem. but I will upgrade anyway, so we'll see.

Hopefully, this is just because of my ignorance. Have you tried to compile the photon demo yourself?


bye,

 Jean

julius

  • Playmaker Newbie
  • *
  • Posts: 15
Re: IOS publishing notes
« Reply #3 on: February 12, 2013, 10:19:31 PM »
Quote
Have you tried to compile the photon demo yourself?

Nope I haven't yet but I'll grab it and let you know my findings.

Tochas

  • Playmaker Newbie
  • *
  • Posts: 5
Re: IOS publishing notes
« Reply #4 on: February 21, 2013, 11:02:35 PM »
Hi

Any considerations for performance under iOS? may be something like:
limit the number of active FSMs?
limit the number of states within a FSM?
limit the number of actions within a state?
use InvokeMethod instead of a series of actions? insted of SendMessage?

escpodgames

  • Hero Member
  • *****
  • Posts: 687
    • Assets
Re: IOS publishing notes
« Reply #5 on: February 21, 2013, 11:13:06 PM »
Why would you want limits ... makes no sense to me.

doppelmonster

  • Full Member
  • ***
  • Posts: 157
    • Grinder Games
Re: IOS publishing notes
« Reply #6 on: September 09, 2013, 05:08:03 AM »
I use a ton of get/set properties and didnt have a problem yet. I tested my game on about 10 different devices without a problem. My game is now in review and i hope i dont get in trouble when its going public....

I have another strange issue: My game is only 16MB on Android but inflates to 32 MB on iOS. I already checked my texture overrides but there is no difference. Has someone an idea why that is happening?

gecko

  • Junior Playmaker
  • **
  • Posts: 52
Re: IOS publishing notes
« Reply #7 on: October 19, 2013, 04:01:37 PM »
I am having trouble getting Set/Get Property to work on iOS. I've set everything as advised above, but it's still not working. My FSM actions change the externalAcceleration and randomAccleration on an Interactive Cloth. Is there another way to do that, or any other tips to get this to work?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: IOS publishing notes
« Reply #8 on: October 21, 2013, 02:48:19 AM »
Hi,

 The other way is to create custom actions to control what you need.

Could you share a repro scene with a interactive cloth? I'll work on adding access to the externalAcceleration and random accelration. Also, you can file a bug on this, I'll follow within this bug ticket ( it will help being organized).

bye,

 Jean

gecko

  • Junior Playmaker
  • **
  • Posts: 52
Re: IOS publishing notes
« Reply #9 on: October 21, 2013, 11:49:26 AM »
I'll file a bug, and here is a test scene: http://www.eduweb-labs.net/FlagTestScene.zip

thanks much!
Dave

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: IOS publishing notes
« Reply #10 on: October 22, 2013, 03:33:26 AM »
Hi,

 Can you export this as a Unity package, I can't open this zip file in Unity.

 Bye,

 Jean

gecko

  • Junior Playmaker
  • **
  • Posts: 52
Re: IOS publishing notes
« Reply #11 on: October 22, 2013, 09:50:38 AM »
Oh, sorry. Here is the unity package: http://www.eduweb-labs.net/FlagTestScene.unitypackage

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: IOS publishing notes
« Reply #12 on: October 23, 2013, 03:41:40 AM »
Hi,

 it runs fine actually, maybe I am not looking at the right thing? but get and set property do not cause any trouble or produce errors.

Can you define what you mean by "not working"?


bye,

 Jean

gecko

  • Junior Playmaker
  • **
  • Posts: 52
Re: IOS publishing notes
« Reply #13 on: October 23, 2013, 09:26:17 AM »
It works fine in the editor, but in an iOS build, on the device, the flag acceleration properties do not changes -- they always stay at the initial settings. (Sorry, I never said that explicitly, but I thought that was the premise of this thread.) You can only see the problem in a build.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: IOS publishing notes
« Reply #14 on: October 24, 2013, 05:45:44 AM »
Hi,

 It works fine, I double check doing the following:

 I set to 0 all acceleration on the component itself, so external acceleration and random acceleration are both 0,0,0

then I don't do anything in the "start low" state, I wait for 5 sec and then set big values and it works.


Bye,

 Jean