XCode how to know SDK Version Used to create older project - ios

Is there any way to find which SDK used to create the xcode project. Actually I have source code for the project but not aware which SDK used to create that project. The problem right now I am facing is using the latest SDK the xcode shows some reference error with an external library which is linked by the project. And these libraries are compiled at the time of the project created.
And I am thinking like, if I use the same SDK which is used to create the project at first time, the linking problem will not happen, and I can start working with the project. Please correct me if I am wrong.
Thanks and regards,
Haris

Related

Modifying Cordova iOS platform template -- linking frameworks?

I have been working on a Cordova project for both iOS and Android.
As part of the project as we will need to build a number of projects from a basic template.
I have done this by creating a template for the actual cordova project and also as part of it I pulled the cordova-ios-master code base for when we add the iOS platform. So we use our own cordova-ios-master due to some small modifications we needed to add.
With some of the plugins we have added / created we need to access SDK's / API's from some third party developers (this is mainly for some push notification services). Normally when we create the project and have added the platform we then need to add the linked frameworks using Xcode.
However I can see that within the cordova-ios-master there is the template Xcode project. I was hoping I could add the linked frameworks within this project so that they are already added when we first create the project and add the custom iOS platform.
What seems to be happening though is if I add the linked library into the template Xcode project and then save it. Once I then re-add that platform to the cordova project instead of the Xcode project being named after the cordova project name, it seems to have messed the re-naming of the Xcode project.
Below shows how the Xcode project normally appears when you add the libraries manually after adding the platform
So if i modify the Xcode template in cordova-ios-master, shown below....
You can see it already has a libCordova.a added.
I add one more and re-save the project.
But then when I add the platform to my project again from this source, i open the Xcode project for it and whilst my library is added, the project was named "myproject" but i can't choose to run it as the project selection seems to appear as "PROJECT_NAME" as opposed to being named and usable as "my project"....
Im fairly new to mac's and Xcode so maybe I'm doing something basic wrong.
Any suggestions or ideas would really help, I hope this post makes sense, it is a bit complex.
Thanks again
Rhys
Right I found a solution. I think I was looking at the problem the wrong way round. So if I need to add a framework for a particular plugin, rather than edit the Xcode project to add the framework. Cordova actually gives you the option to add certain frameworks from within the plugin.xml. Found this answer here....
How to copy a custom ios framework using plugin.xml on Phonegap 3
so I have added a required framework like so....
<framework src="src/ios/OtherLevels/OtherLevels.framework" custom="true" />
My bad!
-Rhys

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.

How to create custom cocoa touch framework with storyboard

I'm following this tutorial to create a custom framework. I have tried the source code as in that tutorial, excepts that when building the framework, I just select "Build Only Device>Generic iOS Device" and press Command+B, instead of using the build scripts introduced in that tutorial. It works fine for me with the source code copied from that tutorial.
After that, I tried to build my own framework with storyboard and build it like above, then try using it in a simple test app. The framework built successful but when I include it in the test app, it doesn't work. The error message is:
I am using the latest version of xcode and mac osx. My entire source code for both test application and simple framework is in this link. Please take a look and help me find what is going wrong. Thanks so much!
Solved
I just find out why. It seems like that is because I have opened both Test Application and the framework project in two workspaces. Closing the framework project before import it to the Test Application solve the problem.
Can you check target membership at right pane for this class?
Check all boxes if it is empty.

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

Xcode - debugging library built outside project

I have a C library whose code resides in say /repos1/clib. I build that from the command line using the latest iOS sdk to create clib.a (including a debug build for the simulator) which I copy to an iOS project say in /repos2/proj.
I have been using this setup for several years. The old C library very occasionally might require some debugging and I was pleased by the fact that Xcode simply stepped into the library code that was outside the project (inside repos1) without having to do any setup - it just worked.
But this was up until a few Xcode versions ago. I am not sure exactly when it changed - perhaps when they moved from gcc to llvm? - since I very seldom needed to debug the C code, but for a while now I only get dissasembly when I try to debug the C library from the iOS project (including at least references to the C file name & line number). For the few times I need to debug it is very inconvenient (I create a temp project that includes the C code).
So, any idea why it worked before and doesn't now? Where should I look? Could it be the way I build the C library, maybe there was a flag in gcc I was using that does not have an equivalent in llvm (I can find and post the old build command I was using if it is relevant)? Is the issue in Xcode and there is a way to tell it where to look for the sources?
Thanks!
Edit: To make it clear, I can add the C library either as the source or as a subproject in Xcode, however for reasons that are out of scope this is not helpful for this specific project. So, can it work like it used to with older Xcode versions? If not, it would still be interesting to know why not.
The recommended approach is to create a library project in Xcode, one for iOS (there is a template for it), then when you get that to build add that project to your app, make sure the lib is a dependency and gets linked. There are many tutorials on the web how to do this.
Then as iOS evolves and new architectures (armv7s) arrive you simply update both projects.
I was struggling with the same issue.
I tried resetting in library/application project all options related to symbol stripping and copy application project to same truecrypt drive as library project but it didn't help.
In my case it appeared it was an app project issue. Same library could be debugged in another app project with source code so that was a clue.
I had more than one version of the same library in app project and set only target membership to choose which should be used. Not sure if that could affect my app project somehow.
Nevertheless after deleting all libraries and copying them to app project again I was able to debug libraries with access to source code.

Resources