Cocoapod podspec to reference iOS and OSX projects - ios

Are there any examples or suggestions on how to make a CocoaPod podspec that is used by both an iOS project and OSX project within a workspace? I'm working on a pod that uses bluetooth and I'm sure many will want both their OSX project and iOS project living in the same workspace referencing the same Pod.
There are several things I'm unsure about, such as changing the Base SDK between iOS and OSX, and how to make the project reference either an iOS or OSX target.
Anyways, any suggestions are welcome. Thanks in advance.

Thanks Keith. The correct answer is in the comments above. To see a sample go to github.com/PunchThrough/Bean-iOS-OSX-SDK/wiki

Related

How to migrate manually added iOS thirdpart sdk to pod version

We have two years old iOS app that needs to update recently.
There is an old SDK (2.0) that manually added to project. Now this SDK have 4.0 version on cocoapods and we really like to move this SDK to pod.
What is the best way to do it? just delete the library from Build Phase and pod install?
Changing the old code to support new SDK is not problem for me.
just delete the library from Build Phase and pod install?
Yes this would be the easiest way to go about it.
Also make sure you remove it from your local files inside the project so that Xcode cannot get confused, make sure you remove all remains of the pod (except the code ofcourse).

How can I use ` use_frameworks!` to a specific cocoapods pod?

I know if you are using Cocoapods, you should use all pods as framework or static libraries. It's not possible specify some pods using framework and the others using static library. But I just want to have a try to ask or discussion about this problem. Maybe there will be some tricky solutions. ^_^
I am working on a iOS project, Objective-C as the main development language. Now I want to import a swift framework using Cocoapods, I didn't use use_frameworks!, some problems occurs as expected. The Cocoapods version is 1.5.3, Swift 5.0, is there a way or a new version to solve this problem? How about Carthage?
Any discussion is appreciate!
CocoaPods 1.9.0 is adding support for specifying linkage on individual pods. Until then, the only option is Podfile hacks like this one.

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.

cannot build project with xcode 8 beta 6

I am getting following error after I add a library via carthage -
library name compiled with older version of Swift language (2.0)
than previous files (3.0) for architecture x86_64
I have tried it with Argo library. (https://github.com/thoughtbot/Argo)
I have selected the correct xcode version using xcode-select utility.
What could be the problem? Any help is greatly appreciated
Thanks!
From what I learned, looks like you can't have libraries written in different versions of Swift.
In my Obj-C project I had 2 libs installed with CocoaPods
I updated the first one using the swift3 branch on github, and I converted the second one with Xcode.
Everything is building properly now!
This is happening as you've included another library (via cocoa pods or by linking the library directly etc...) which is compiled (or being compiled) in swift 2.
I've seen this a lot with Cocoapods (and Carthage)

XCode how to know SDK Version Used to create older project

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

Resources