Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Importing 3rd party framework in a Playground's "SupportCode.swift"

Is there a way to include a (non-Apple) framework in the "SupportCode.swift" file, in the Sources directory of a Playground?

While the framework is successfully imported when the import directive is placed in the Playground itself, I get a "No such module" error popping up when trying to import the same framework in SupportCode.swift.

I have my playground embedded in a workplace with the required frameworks added to it as well.

like image 628
insys Avatar asked Mar 18 '15 11:03

insys


1 Answers

It is a hack. if you have file like "Parse.framework", just copy it to Xcode's system frameworks folder at "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks"

Now you can import this framework in playground just like any other system framework.

like image 92
Aasveen Kaur Avatar answered Sep 28 '22 02:09

Aasveen Kaur