I am calling an import in the PCH file:
Prefix.pch....
#import <RestKit.h>
Pod File......
platform :ios, :deployment_target => '7.0'
pod 'RestKit', '~> 0.23.3'
It says 'RestKit.h' not found
The pch file contains...:
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#import <SystemConfiguration/SystemConfiguration.h>
#import <MobileCoreServices/MobileCoreServices.h>
#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
#import <RestKit.h>
I am running cocoapods 0.37.1, and I verified the 'Link Binary With Libraries' match in the tutorial.
Related
I have a Unity app which uses Vuforia. I'm trying to embed this Unity app within a Swift Project. I am following the guide given here Integrating Unity Project into Xcode Swift Project. However when I build the project I get this error:
<unknown>:0: error: generate-pch command failed with exit code 1 (use -v to see invocation)
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1
This is my Bridging-Header.h file
#import <Foundation/Foundation.h>
#ifndef BRIDGING_HEADER
#define BRIDGING_HEADER
#import <UIKit/UIKit.h>
#import "UnityUtils.h"
#import "UnityAppController.h"
#import "UnityInterface.h"
#endif /* BRIDGING_HEADER */
This is my project structure:
My xcode Version is 9.2 and Unity Version is 2017.3.1f1
Any suggestions on what I am doing wrong?
I have this pod on my project:
Podfile:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'AFNetworking'
pod 'Parse'
pod 'Fabric'
pod 'Crashlytics'
pod 'MagicalRecord'
pod 'Socket.IO-Client-Swift'
pod 'SDWebImage'
pod 'MBProgressHUD'
pod 'HexColors'
pod 'SWTableViewCell'
pod 'AKPickerView'
pod 'CRToast'
pod 'MTDates'
pod 'JazzHands'
Project-Bridging-Header
#import <JazzHands/IFTTTJazzHands.h>
#import <MTDates/NSDate+MTDates.h>
#import <MTDates/NSDateComponents+MTDates.h>
I can use any MTDates function at any Objective-C or Swift file.
And I can use any JazzHands function/class at any Objective-C file, but when I try to use it on Swift like this:
import UIKit
class GICalendarViewController: UIViewController{
var separatorFrameAnimation: IFTTTFrameAnimation!
I've got this error:
Use of undeclared type 'IFTTTFrameAnimation'
I've tried to add #objc tag on this class, and this doesn't work.
Any ideas why this is happening?
You use these libraries as frameworks (use_frameworks!). So you have to add
import JazzHands
in your source files. The same you do with Cocoa's frameworks like UIKit.
I'm developing an iOS App using XCode 7.0 beta 4 (7A165t) and Swift 2.0 that use Parse, Facebook and Google Maps. This is my Podfile:
platform :ios, '8.0'
use_frameworks!
inhibit_all_warnings!
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'FBSDKShareKit'
pod 'GoogleMaps'
pod 'Parse'
pod 'ParseFacebookUtilsV4'
pod 'SWRevealViewController'
I tried to follow the Parse guide (https://parse.com/docs/ios/guide#users-log-in-amp-sign-up) but I receive this error
error: use of unresolved identifier 'PFFacebookUtils'
This is my Bridging Header
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#import <FBSDKLoginKit/FBSDKLoginKit.h>
#import <FBSDKShareKit/FBSDKShareKit.h>
#import <SWRevealViewController/SWRevealViewController.h>
#import <ParseFacebookUtilsV4/PFFacebookUtils.h>
#import <Parse/Parse.h>
#import <Bolts/Bolts.h>
Any suggestion?
Just import ParseFacebookUtilsV4 in your code
import ParseFacebookUtilsV4
this worked for me
Under your project's build settings, make sure that in Swift Compiler - Code Generation, your Objective-C Bridging Header path is set to yourProjectName/nameOfYourBridgingHeader.h
Project getting build in xcode 5.0.1 but not in xcode5.1.1. I have tried to remove arm64 from valid architecture and build architecture but I am getting same error.
I have referred lots of post on stackoverflow but no one help on this issue.
Can anyone help me on this?
EDIT: Here is the screenshot of error message.
Project -> Build Phases -> Link Binary With Librairies -> add (+) Foundation.framework.
Your project-Prefix.pch should look like:
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif
Or, if you have Enable Modules in Build Settings:
#ifdef __OBJC__
#import UIKit;
#import Foundation;
#endif
Else, have you tried to re-install Xcode?
I have my prefix pch file but I don't know why its giving me this error. Please help.
clang: error: no such file or directory: '/Users/djtakeuchi/Documents/Xcode Projects/Xcode Supplied Source Code/BirthdayReminder/BirthdayReminder/user-interface/view-controllers/../../BRBirthdayEditViewController.m'
clang: error: no input files
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1
prefix.pch file:
//
// Prefix header for all source files of the 'BirthdayReminder' target in the 'BirthdayReminder' project
//
#import <Availability.h>
#ifndef __IPHONE_5_0
#warning "This project uses features only available in iOS SDK 5.0 and later."
#endif
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif