I recently created a project from a basic Xcode project with cocoapods installed, and when I import a project into AppCode 3.1 I don’t get autocomplete for my fast frameworks installed through CocoaPods
Here is my subfile
# Uncomment this line to define a global platform for your project platform :osx, '10.10' use_frameworks! target 'Main' do pod "SwiftyJSON", ">= 2.1.3" pod 'BrightFutures', '~> 1.0.0-beta.3' end target 'MainTests' do end
As you can see, I have 2 pods (one is SwiftyJson and one is BrightFutures). Both of these containers are set as Swift Framework (hence use_frameworks! ).
Everything seems to be imported and works correctly for AppCode (I have two projects, one of them is the main project and the other is Pods, which is exactly the same as in Xcode), however, it seems like AppCode doesn't index any of the Pod frameworks, so I don’t get autocomplete status when using these frameworks at all. For example, in the following code
import Cocoa import BrightFutures @NSApplicationMain class AppDelegate: NSObject, NSApplicationDelegate { func applicationDidFinishLaunching(aNotification: NSNotification) { let f = future { 5 }.map{f in f + 7} f.onSuccess{callback in println(callback)}
I do not get autocomplete following
import BrightFutures (importing anything else that isn’t from CocoaPods works fine)- Auto completion of something on this line
let f = future { 5 }.map{f in f + 7} or this f.onSuccess{callback in println(callback)}
Autocomplete works fine on any other (i.e. aNotification ), which is an argument to the applicationDidFinishLaunching function
Are there any settings in AppCode that I am missing, or is this something else not yet implemented? In Xcode, autocomplete works completely correctly.
EDIT: I also noticed that .framework files are in red in AppCode (not sure if this means something?)