Powered by
Jason Lu
  • About Me
  • Portfolio
  • Game Projects
    • Indie Games
    • Unity Games: Client
    • Unity Games: BVW
    • Computer Graphics
    • Games - Undergraduate
  • Resume
  • Contact

Unity4: Test Unity iOS plug-in on iOS simulator

4/21/2014

2 Comments

 
It's relatively slow to build on real iOS device compare to simulator. Running on simulator can save me a lots of time when testing the iOS plug-in I wrote. Here are the steps we need to do to make the plug-in works on simulator properly:

How?

Move void mono_dl_register_symbol (const char* name, void *addr);
out of
#if !(TARGET_IPHONE_SIMULATOR)
#endif // !(TARGET_IPHONE_SIMULATOR)
Picture
In void RegisterMonoModules()
Move your "Extern methods" out of
#if !(TARGET_IPHONE_SIMULATOR)
#endif // !(TARGET_IPHONE_SIMULATOR)
block
Picture
Result: my iAd plug-in runs on simulator.
Picture


Reference:

Building Plugins for iOS
https://docs.unity3d.com/Documentation/Manual/PluginsForIOS.html
Using the Xcode Simulator with a Unity 3 Native iOS Plug-In
http://tech.enekochan.com/2012/05/28/using-the-xcode-simulator-with-a-unity-3-native-ios-plug-in/
2 Comments
Tuan Anh
10/21/2014 07:07:38 pm

Thank you so much

Reply
Wallas
1/7/2015 09:34:24 pm

Thank you! You saved my day.

Reply



Leave a Reply.

    Author

    Tzu-Hsun (Jason) Lu
    Game Programmer

    View my profile on LinkedIn

    Archives

    April 2014
    March 2014
    February 2014
    December 2013
    December 2012

    Categories

    All
    A*
    BVW
    Finite State Machine
    IAd
    IOS
    NGUI
    Towercraft
    Unity
    XML

Powered by Create your own unique website with customizable templates.