can I automate integrating packages/frameworks in xcode? - ios

For implementing our unity3d project into iOS, we need to manually select/tune a long list of tweaks in xcode build menu every time we build the project to test it (mainly to use appodeal framework).
Is there an easy way this task can be automated?
for example, in android builds, I reuse the same manifest file for the project and everything works just fine. Is there a similar way for xcode?

This is Andrew from Appodeal support. In the last release of Unity plugin (0.4.9) we have post build function which can help to resolve this issue.
You can download it here: Download_link

Related

xCode - how to link dynamic framework from workspace

What is the proper way to link a dynamic framework which lives in the same workspace like the app?
I have a problem when adding the framework from the products folder to the App's "Embedded Binaries" section - because the added framework may be built for simulator and the app builds against iphoneos. I can not add both, can I?
I want to achieve that when my app builds, the framework is built too and I can work the changes immediately instead of doing some cumbersome update via Carthage or something link that.
EDIT: http://netsplit.com/xcode-two-apps-with-a-shared-private-framework-in-a-workspace This blog post describes exactly what i want to do - but this does not work since i want to develop on simulator and iphone (it would require a fat framework). Or did I miss something.
Although is possible to develop main app and framework and doing integration test in the same time from many workspaces, at same point becomes a slow-ish and not scalable development process.
So I suggest you to make a sample app in the workspace of your framework and develop and test your features directly from there. Once your framework is quite stable you release it and you integrate it with your main app.

How to add unity project in a currently existing ios project?

I have searched a lot about this. But all the answers suggest that, it is possible to add new files into unity(xcode) project but vice versa is not possible. Actually, my target is to create sdk which will be used in a cordova plugin. What should I do?
To create an iOS sdk for unity you can create a library project in xCode and import the build to unity's Assets/Plugins/iOS folder. everything in here will automatically get included in xCode project generated by Unity.
And yes, it's very hard to include unity build in your own xcode project. There have been people begging for enlightenment to integrate Unity in another app but every time the threads are stranded beyond hope. Gibberish-gibberish... It's not possible.
It's extremely frustrating but it is possible. It requires a lot of changes to the build settings and compiler settings as well as customizing the launch of Unity components.
Best place to start is to import the Classes, Libraries, and Data folders (if applicable). Data as a folder reference and not a group. I'm also assuming your Unity project output is similar to what I've been given. We've modified our main.m file to be a C++ file (main.mm) and added in the Unity initialization code. We also updated the UnityAppController.mm file to not run startUnity on launch.
If this is still something you're working on please feel free to contact me on Twitter (#Ruprect) and I can help troubleshoot.
In this repo: https://github.com/jiulongw/swift-unity you can find how to integrate Unity Project into Xcode Swift Project.

Unity-iOS: Separating Unity iOS project into any existing iOS Xcode project

I have developed Unity iOS project. I am using some 3ds max model files in it with some animation. When I create project through Unity, it does creating it automatically and installing it on the iPad. Now, I want to include this unity based functionality into my existing iOS project. How can i separate this unity project and integrate into my existing iOS Xcode project? I see lot of dependancies in Unity created project. I don't know the steps how can we separate this and integrate into any existing iOS Xcode project?
Please advise!
Here's how we did it using Unity 5.2.2f1, Xcode 7.1 and Swift 2.1.
The steps outlined in the link below seem like a lot, but honestly, aside from the Import/Cleanup of some of the unity files, it takes < 5 min once you know the steps.
https://github.com/blitzagency/ios-unity5
Actually thats not THAT hard to do. But honestly i would recommend not to try to integrate the generated project into your own, but start with the generated project and integrate yours. Since usually your part of the project will have a lot less changes in the build settings and dependencies.
Once you done the integration, you can update from a new export by simply copying the Classes and Libraries Folder from the generated project to the integrated one.
I explain how we integrated Unity into our iOS App in more detail here: http://www.markuszancolo.at/2014/05/integrating-unity-into-a-native-ios-app
regards

Can I export my xcode project game to Unity?

I need your help where I want to export my game that is exported from Unity 3d now after making some changes in the xcode project, I want to export it again as Unity package that can be opened in Unity SDK.
Help and suggestions would be highly appreciated.
If you added some files to Xcode project than the simplest way will be to use Post Process pipeline. You can modify Xcode project with help of mod-pbxproj script. It is written in Python (yep, one more language to learn :). But it is quite simple and straightforward.
If you modified some Unity-generated Objective-C files then you are in trouble because no one can guarantee that Unity guys will not make some changes that will ruin your code. So you should be very careful there. But you still can automate this exciting process by using Makefiles. The main thing Unity does is generates Data and Library folders for Xcode. So you can create Xcode project, store it somewhere near Unity files and then write Makefile or some script that will do the following:
Export Unity project to Xcode by using Unity batch mode (you'll need Pro license to do it)
Copy Data and Library folders from exported project to your target project
Delete exported project
This all is not fun at all but it can solve your problems.

xCode can't find header files in Unity3D project

I'm building an iOS app using unity3D. Everything goes ok until I try to build the solution. Unity builds the xCode project with 0 problems but then, when I try to build with xCode, I get several, all of them the same: "*.h not found".
The problem in this is that the headers don't exist in the project folder, but in the original-unity project folder they do exist.
I've seen a lot of similar problems around the web, but most of them relate to independent xCode projects, being the solution messing with the paths and so on... But with a project built by unity is it supposed to change that? When I go check them, they seem correct...
I've also seen that unity had a problem and by reinstalling it would fix the problem. Unfortunately it didn't...
Does anyone know what kind of problem is this? Should I change the build paths even though unity set them some way? Is it unity's fault?
Thank in advance
Native plugins need to be stored in special folder Plugins, for iOS it is Assets/Plugins/iOS. Citing from Unity - Building Plugins for iOS:
Automated plugin integration
Unity iOS supports automated plugin integration in a limited way. All files with extensions .a,.m,.mm,.c,.cpp located in the Assets/Plugins/iOS folder will be merged into the generated Xcode project automatically. However, merging is done by symlinking files from Assets/Plugins/iOS to the final destination, which might affect some workflows. The .h files are not included in the Xcode project tree, but they appear on the destination file system, thus allowing compilation of .m/.mm/.c/.cpp files.
Note: subfolders are currently not supported.
I marked the subfolders statement bold as I ran into trouble with this some time ago :)

Resources