Incorrect loading containers made with fast

I am trying to import Bond and import ConvenienceKit. I have included in my podfile

pod 'Bond', '~> 3.7'
pod 'ConvenienceKit'
use_frameworks!
end

      

It is installed correctly and opens the file as a workspace. However, I cannot import it. If I can see my file structure, I can see that pod_appname.framework is red. Thank.

+3


source to share


3 answers


Xcode does not currently provide autocomplete functionality for the import statement in swift.

So, you just need to make sure you import the file with the specified name into the framework.

Follow these steps and you can import any quick file from "Pods"



1) Clean up the project

2) Make sure all of your "Pods"> "Build Settings"> "Build Active Architecture Only" are set to "NONE".

3) Don't run, just build your project.

4) Now import any file from "Pods" to any quick file

E.g.: import Bond

5) Again, build the project and it will work as expected. Finally, you can access the properties

6) Similarly, you can import different files

import Bond+UIImageView

      

Hope this helps!

+4


source


When using Swfit, you need to create a header header for importing pod frames.

The easiest way is to add a new objective c file to the project. To do this go to Xcode menu file> new> file. Under iOS, select Source> Cocoa Touch Class and go to the next. Be sure to select the language "Objective C". It will then ask you if you want to add a bridge header at this point. Select to add it.

You can now remove the dummy C object files. Inside the bridge header file, import the pod working frame #import "someframework.h"

. Then you can use the frame in your files Swift

.

Add title manually



Go to the Xcode menu, File> New> File, under section iOS

choose Source> Title. Name your file something like YourAppName-Bridging-Header

(just to be visible in the future). Be sure to choose a target for your application. Then create it.

You can remove all lines of code inside the header file. And then import as #import "someframework.h"

.

Then go to your project, select a target and select Build Settings. In the search box search for "objective-c bridging header" and enter the name of your header file, for exampleYourAppName-Bridging-Header.h

0


source


use_frameworks!

should be at the top, for example:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
inhibit_all_warnings!

target 'ParseRealmSync' do
    pod 'RealmSwift'
    pod 'Parse'
end

      

0


source







All Articles