Where can I find new Cocoa Touch Framework project in XCode? - ios

I'm following a tutorial to learn to make a cocoapod. Unfortunately the tutorial instructs to create a "Cocoa Touch Framework" when that no longer exists in current XCode.
What's the current equivalent, that I can use for the purposes of this tutorial / to make a cocoapod?

The answer isn't too complicated: it's the "Framework" option.
A Static Library is pure object code (a.k.a. compiled code), and it cannot contain images, storyboards, etc. Pure object code also means you can't read the code files which makes it pretty much un-debuggable.
A Metal Library lets you develop using the Metal library, basically for 3D graphics and GPU stuff.
Framework is a cocoapod framework. Tried and tested and loved by all Apple Developers.

Related

iOS Plugin Unity

I am currently working on a augmented reality project. I would like to place some virtual objects on a human body. Therefore I created an iOS facetracking app(with openCV; C++) which I want to use as a plugin for Unity. Is there a way to build a framework from an existing iOS app? Or do I have to create a new Xcode project and create a cocoa touch framework and copy paste the code from the app into this framework? I am a little bit confused here. Will the framework have camera access?
My idea was to track the position of a face and to send the position to unity, so that I can place some objects on it. But I do not know how to do that. Can anybody help?
nice greets.
as far as I know you need to make your Unity project, and use assets like OpenCV, but it doesn´t allow you to track the human body (without markers).
About building a fremwork starting from an iOS app, first time I heard that!

Can't Use Swift-Generated Shared Framework in Objective-C

This is a variant of the old "dyld: Library not loaded: #rpath/libswiftCore.dylib" problem. I'm pretty sure I know what the issue is, but I don't have any ideas on how to fix it.
I'll reference the project I'm working on, so I don't clutter the question with huge blocks of code.
The project generates a dylib that can be thrown into another project, and abstract a huge block of coding for developers (a communication layer of a client/server system).
I want the framework to be as simple as possible to to use; even if that means making it a big fat pig. I just want people to be able to toss it into their project (Swift or ObjC), and not have to worry about playing around with different variants for things like simulators and devices.
I use a variant of the old Wenderlich script to lipo the executables for x86 and ARM together.
Note the commented-out section. There be draggones.
Works great. In Swift.
Objective-C, not so great. That's because of the various Swift frameworks that need to be carried into the Objective-C program.
I switched on the embed frameworks setting, and the target dutifully gives me all my frameworks.
The problem is that each architecture has frameworks for ONLY that architecture. They aren't "fat" frameworks, so my hand-built "fat" framework really is kinda skinny, because it will only work on certain architectures.
My question is whether or not there's a way to ensure that the Swift frameworks I embed can be made "fat," or if I just have to give up, and package different variants of the framework for Objective-C programmers.
Any ideas?
I'm giving up on this sucker.
You cain't git thar f'm here.
This library will be Swift-only.

Compiling only part of a library on iOS

I have a big library on iOS which is using a lot of other libraries.
It started well, but after a while I realised that sometimes I only need part of it for my project. And since the whole thing is pretty big I would like to make a sub-library that is only the selected classes + selected embeded libraries that I'd chose for a particular project.
For example:
My project has files a.m to z.m, and they all use independently libraries a.a to z.a
And I would like to compile b,c,j and r classes/lib to make my library.
I started reading about cocoa pods which should help, but I thought there would be other solutions. Is that possible and easy to do in another way?

How to use Cocos2d-Swift in existing project

I got an existing Objective-C project. Now I decided to rewrite some code and add Cocos2d to it. I know this framework for a long time and I recently discovered that they stopped the support for Cocos2d and created a new version called Cocos2d-x. There I found the Swift library and I asked me how to use the Cocos2d-Swift framework in my existing Objective-C project ? A step by step tutorial would be great. I searched a bit in the internet and found this:
Stackoverflow Link
But since the post is from 2011 it does not cover how to add the swift library, since Swift wasn't introduced at this moment.
Cocos2d-swift is a bit of a misnomer : it is currently written in objective-c. The software is now distributed with SpriteBuilder, that is why there is no 'install.sh' as there used to be. So integrating it into your project should not be too difficult. Use SpriteBuilder (from the AppStore) to create a 'blank' SB project, and see how cocos2d is integrated in there. Then, what you see is what you integrate !
caveat : Cocos2d is now ARC, so it is best your project defaults ARC. Otherwise you will have to do a lot of Xcode click-click-click to make the reference count strategy file specific.

Show unity 3D in xcode project

I have a question. Is it possible to load unity project from web, and show it in Xcode project? In some non-fullscreen view? Also, unity must handle touch events. Any ideas, suggestions, links or anything else?
Thanks for advice.
P.S. Sorry for my english.
P.P.S. Main project created in Xcode, without unity.
load unity project from web
What do you mean by that? If you mean a compiled unity webplayer application, forget it.
If you mean a standard non compiled Unity project, note that with the iOS plugin you can compile for mobile Apple hardware. This used to cost a lot of money but now they're giving it out for free (included in Unity free).
Also, unity must handle touch events.
The standard Input Unity class handles touch events with methods such as GetTouch() and variables like touchCount or touches.
Unity is a very big and complex package: integrating it into an existing project may be overwhelmingly difficult. I really don't think there are natives way to do so.
Rather, I'd advise you to port your current XCode project into Unity (which sounds a really strange thing to do if you ask me).
Unity and XCode are 2 completely different tools: the former is useful for Cocoa classes and iOS IDE while the latter is for managing 3d game assets in a real-time interactive environment. I don't see how you can possibly integrate the two things.
Manage your project in a single IDE, it will make things a lot simpler.

Resources