Open bobrosoft opened 8 years ago
I think #99 never considered Swift dependencies, so your setup is currently not supported.
Mmm, ok. So, to summarize:
Correct? Or first is possible if no external Swift dependencies are used?
I think the first should be possible, as long as all dependencies are ObjC.
"packing of frameworks with Swift dependencies are not supported"
Any thoughts on if/when this will be supported? Not having this functionality is adding a good deal of extra work packaging up my library.
Personally, I cannot devote time for substantial feature work on cp-packager at the moment. I would happily provide assistance if you or someone else wants to work on a PR, though.
Can you elaborate a bit on what would be required to implement this feature? Are there reasons why it's especially difficult? For example, I know that name mangling is different and probably more difficult to deal with in Swift. I imagine that would come into play...
Some brief thoughts on what would need doing might help us decide if we should attempt this or not.
Dependencies would need to be build as dynamic frameworks, instead of static libs and the lipo
commands would likely need some adjusting.
What I am currently unsure about is how modules would behave, since there's an assumed 1-to-1 mapping between frameworks and modules, but each Swift-based Pod would be its own module. I would suggest to start by trying to vendor a very simple Swift framework into another one manually using lipo
and see how this would be to be done.
@neonichu I have made a Library ported to cocoapod and which has few third party frameworks included.. I am able to get those framework referenced when user install my pod. what I am achieving is to create a library from that cocoapod. I am getting this above error message when I try to package the cocoapod. I made the example/ source lib in Swift. Is that the cause of the problem, I can make Objective c code and attach to it with objective samples, will it resolve the issue or did you find any resolution to it without converting to Objective C code.
Any recent developments regarding this issue?
I have the same problem.
Same for me. Any status about this?
See this comment, unless someone from the community contributes a PR, this will remain unimplemented, unfortunately.
any news?
Same Problem.
Any update on this? I have the same problem
As Boris previously posted:
See this comment, unless someone from the community contributes a PR, this will remain unimplemented, unfortunately.
any volunteer?......no
since the packager doesn't support Swift framework, maybe you can try this solution: Hide implementation of swift framework when distributing
I don't have the time or the Ruby skills to look into this right now, but I'd like to add that I just came across the same error
I also lack the skill to implement something here, but while debugging, I noticed that the xcconfigs generated in the Pods project contained some bogus OTHER_CFLAGS and OTHER_SWIFT_FLAGS, namely around module map file locations that weren't correct:
OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/MyFramework/MyFramework.modulemap"
OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/MyFramework/MyFramework.modulemap" -import-underlying-module"
Removing them made the packaging pass for a simple one-file swift framework. However, after referencing UIKit classes, they started not being recognized:
/Users/xxx/Desktop/my-sdk-ios/MySDK/My.swift:92:57: error: use of undeclared type 'UIApplication'
public func registerForRemoteNotifications(for app: UIApplication) {
^~~~~~~~~~~~~
Hope this helps in getting the ball rolling
Hi there!
I recently installed cocoapods-packager and trying to pack my Swift Framework. If I correctly understand from https://github.com/CocoaPods/cocoapods-packager/issues/56 it's supported, right?
I'm getting this:
for that podspec
I don't understand about what Podfile is it talking about? It generates own Podfile to install all dependencies? My Podfile in my repo of course contain
use_frameworks!
inside it or I couldn't install Swift dependencies I need for develop.