- Home /
Include IOS frameworks in unity instead of xcode
Hello everyone,
I have delevoped a game in unity and have Facebook integration, inapp purchase, splash adds ...and others , done with native code, being succesfull to comunicate unity C# with Ocjective-C ...
But the process seems ungly in 1 aspect, so whenever I need to move a button 1 pixel, I have to import my custom frameworks all over in xcode, which is a time consuming process and doing the same task all over again.
There must be a way to import them directly to unity, and being free to modify anything in unity..
Any ideas or alternatives? Thanks in advance
Don't you just use the Append option when you make the build? That should update the XCode project with the Unity changes.
honestly no, i'm familiar enough to unity but new to integrating native code with unity. I will try that, Does it have a similar process with eclipse for androind as well?
Answer by kumarc123 · Sep 18, 2013 at 07:27 AM
Whenever you're building your plugins make sure that all of your code is working properly.
Once you're sure enough, just copy those files in Unity's Assets/Plugins/iOS/ folder. If there is no folder just create it.
if you copy all your files to ios plugins folder then even after replacing your build you won't loose your plugins and you don't have to copy each time you build.
As mentioned in one comment, you can also skip copying to ios plugins folder. But make sure to create all classes or whatever which is native to Classes folder of your Xcode project. Then you can use Append while building your project.
To Append build just press CMD+B it will append automatically
One more thing to mention, To make plugins for Facebook you don't have to write your native code now. Facebook itself provides you all things needed for iOS, Android and Web Player as I know. I am using Facebook-Unity plugin only.
What are you talking about? I don't think you're supposed to copy internal iOS frameworks into your Unity project's Assets folder. If that's what you meant.
I forgot to mention. In Unity you can write one postprocess build script which creates / updates references to iOS frameworks.
For some reason when I append the build it drops my reference to CoreLocation.framework even though it preserves libsqlite3.tbd