eMdOS
eMdOS

Reputation: 1713

Xcode 7 - Error trying to integrate Parse using CocoaPods (Swift)

I'm using Xcode 7 beta, and I have been trying to integrate Parse iOS SDK using Cocoapods.

I already created the bridging-header.h, I alreade imported Parse #import <Parse/Parse.h>. I already called Parse in my AppDelegate.swift.

The error happends when I try to use any class/object related to Parse. Actually, I'm just calling Parse with: Parse.setApplicationId(ParseAPI.AppID, clientKey: ParseAPI.ClientKey)

I'm getting the following error:

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_Parse", referenced from:
      type metadata accessor for ObjectiveC.Parse in AppDelegate.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I have cleaned the project many times even a complete clean build.

Upvotes: 6

Views: 3486

Answers (3)

Kiko Lobo
Kiko Lobo

Reputation: 547

You need to add a bridging header to your workspace.

Parse is written in Objective-C, so it's not the same as using the direct framework like you have done it.

Here are some steps that might help: enter link description here

Upvotes: 0

Jack
Jack

Reputation: 61

Using Xcode 7 beta 4, I first migrated away from using the Objective C bridging header by removing all references to it in my XCode project.

Next, I updated my Podfile with a new line at the top:

use_frameworks!

Then I ran

pod outdated

Which told me newer versions of Parse and ParseCrashReporting were available (from 1.7.5 to 1.7.5.3).

I then ran

pod update

Opening my project in Xcode, the last step was to add import statements in files in which I was using Parse objects, so many files now included either

import Parse

or

import ParseCrashReporting

For more on use_frameworks, see http://www.innerexception.com/2015/05/cocoapods-useframeworks-means-bridging.html

Upvotes: 6

eMdOS
eMdOS

Reputation: 1713

Finally, I could not solve the issue using CocoaPods.

I'm using Xcode 7.2 beta.

What I did is, I imported Parse and Bolts manually following the steps described in Parse Doc.

Currently, I'm having other issue. Xcode 7 is not autocompleting anything from bridging-header, everything is working ok, but is not autocompleting.

I'm not the only one having this issue --> reference.

Upvotes: 1

Related Questions