GJZ
GJZ

Reputation: 2542

Error with Parse integration into Swift app

I am trying to integrate Parse into a Swift app. I downloaded the SDK, set the app id and added the dependencies, but when I try to import Parse, it says 'No such module - Parse'.

Upvotes: 0

Views: 118

Answers (3)

GJZ
GJZ

Reputation: 2542

My problem appears to have been in the naming of the application: I included a number.

Once I corrected this, the error disappeared. Perhaps the name prevents the import of certain frameworks.

Upvotes: 0

Bojan Dimovski
Bojan Dimovski

Reputation: 1216

Check that the Parse framework has been copied to your project folder to wherever you keep your 3rd party dependencies (e.g. Vendor).

Then, add the path to the Parse framework to the Framework Search Paths (FRAMEWORK_SEARCH_PATHS) for your build target.

It should look something like this:

$(inherited)
$(PROJECT_DIR)/Vendor/Parse

I'd clean up the DerivedData folder and rebuild.

Upvotes: 2

Bierbarbar
Bierbarbar

Reputation: 1479

I think this link should be solve your Problem: Set up new Parseproject or here ist explained it for a existing project please check this

Edit after i saw the Code. At first please do not post api keys here this are your private api keys.

second i think the code should look like:

func application(application: UIApplication, didFinishLaunchingWithOptions   launchOptions: [NSObject: AnyObject]?) -> Bool {
    Parse.enableLocalDatastore()

    // Initialize Parse.
    Parse.setApplicationId("appID",
        clientKey: "Key")

    // [Optional] Track statistics around application opens.
    PFAnalytics.trackAppOpenedWithLaunchOptions(launchOptions)

  //end parse


    // Override point for customization after application launch.
    let splitViewController = self.window!.rootViewController as! UISplitViewController
    let navigationController = splitViewController.viewControllers[splitViewController.viewControllers.count-1] as! UINavigationController
    navigationController.topViewController.navigationItem.leftBarButtonItem = splitViewController.displayModeButtonItem()
    splitViewController.delegate = self

    let masterNavigationController = splitViewController.viewControllers[0] as! UINavigationController
    let controller = masterNavigationController.topViewController as! MasterViewController
    controller.managedObjectContext = self.managedObjectContext
    return true
 }

you have to put in your Key i corrected the method for you

Upvotes: 0

Related Questions