Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

fix for import as cocoa touch framework as module to a swift only project #2206

Merged
merged 1 commit into from Aug 12, 2014

Conversation

krusche
Copy link
Contributor

@krusche krusche commented Jul 22, 2014

This change resolves issue #2205

With the change you can create a Cocoa Touch Framework with Xcode 6 for AFNetworking and import the AFNetworking Framework into a Swift only Xcode Project without compiler errors.
You just need to make all headers public in the Build Phases section of the Cocoa Touch Framework.

…ject

Signed-off-by: Stephan Krusche <krusche@in.tum.de>
@kylef
Copy link
Contributor

kylef commented Jul 23, 2014

👍

mattt added a commit that referenced this pull request Aug 12, 2014
fix for import as cocoa touch framework as module to a swift only project
@mattt mattt merged commit 61b7a9b into AFNetworking:master Aug 12, 2014
@mattt
Copy link
Contributor

mattt commented Aug 12, 2014

Thanks, @krusche—much appreciated!

@Maxwell2022
Copy link

Is it possible to have a detailed documentation about this? Some kind of tutorial? Do I still need a <Project>-Bridging-Header.h file? How to expose the headers publically in the build phase? Thanks

@krusche
Copy link
Contributor Author

krusche commented Dec 31, 2014

@Maxwell2022 I did that on my own. I created a new iOS8 framework via Xcode and included the AFNetworking sources by myself. Then you can drag and drop the Xcode project file of the iOS 8 framework into your application and reference it as target dependency. When you use an AFNetworking class in your Swift code and you Cmd+Klick on the class name, you see the header in its Swift representation. A bridging header is not required, because the iOS8 framework cares about it. You can expose framework headers as usually by declaring them in the Build Phases --> Headers --> Public section

If you are interested, have a look at my example project which includes AFNetworking as iOS8 framework: https://dl.dropboxusercontent.com/u/14076666/example.zip
(However the version of AFNetworking I used is about 6 months old)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants