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?
Related
This is the error -
In file included from
/Users/chetan/.pub-cache/hosted/pub.dartlang.org/webview_flutter-1.0.7/ios/Classes/JavaScriptChannelHandler.m:5:
/Users/chetan/.pub-cache/hosted/pub.dartlang.org/webview_flutter-1.0.7/ios/Classes/JavaScriptChannelHandler.h:5:9:
fatal error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
^~~~~~~~~~~~~~~~~~~
1 error generated.
In file included from /Users/chetan/.pub-cache/hosted/pub.dartlang.org/webview_flutter-1.0.7/ios/Classes/FlutterWebView.m:5:
/Users/chetan/.pub-cache/hosted/pub.dartlang.org/webview_flutter-1.0.7/ios/Classes/FlutterWebView.h:5:9:
fatal error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
^~~~~~~~~~~~~~~~~~~
1 error generated.
In file included from /Users/chetan/.pub-cache/hosted/pub.dartlang.org/webview_flutter-1.0.7/ios/Classes/FLTWebViewFlutterPlugin.m:5:
/Users/chetan/.pub-cache/hosted/pub.dartlang.org/webview_flutter-1.0.7/ios/Classes/FLTWebViewFlutterPlugin.h:5:9:
fatal error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
^~~~~~~~~~~~~~~~~~~ 1 error generated.
In file included from /Users/chetan/.pub-cache/hosted/pub.dartlang.org/webview_flutter-1.0.7/ios/Classes/FLTWKNavigationDelegate.m:5:
/Users/chetan/.pub-cache/hosted/pub.dartlang.org/webview_flutter-1.0.7/ios/Classes/FLTWKNavigationDelegate.h:5:9:
fatal error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
^~~~~~~~~~~~~~~~~~~
1 error generated.
In file included from /Users/chetan/.pub-cache/hosted/pub.dartlang.org/webview_flutter-1.0.7/ios/Classes/FLTCookieManager.m:5:
/Users/chetan/.pub-cache/hosted/pub.dartlang.org/webview_flutter-1.0.7/ios/Classes/FLTCookieManager.h:5:9:
fatal error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
^~~~~~~~~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
I get this error all the time! Usually when trying to build my iOS app.
Things that normally fix it are:
cd ~/ios/
rm -rf Pods
rm Podfile.lock
cd .. to (to get back to main flutter dir) flutter clean
If that doesn't work you can also try these afterwards
cd /ios/
pod deintegrate
pod install
If issues persist after those and this happens when trying to build your iOS app sometimes its a good idea to back up your iOS folder delete it and then run flutter create this will generate a new iOS folder so you have a fresh runner and can make a fresh pod file.
If none of my solutions worked for you can also check out this SO thread because this issue pops up a lot.
I am getting this issue after updating xcode 6.4 to 7.0.
I am using Objective C
ld: embedded dylibs/frameworks are only supported on iOS 8.0 and later (#rpath/AFNetworking.framework/AFNetworking) for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
How to fix this ?
I tried to add Prefix Header but i was unable to get LLVM 6.0 there i am getting LLVM 7.0”
I found this SO post that might have the solution. Keith Smiley suggested these import statements:
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <SystemConfiguration/SystemConfiguration.h>
#import <MobileCoreServices/MobileCoreServices.h>
#endif
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
i am adding a a swiper sdk in my application. when i run its test app it work fine but when i import my file to it .get error
ld: library not found for -lCardAnalyLib1
clang: error: linker command failed with exit code 1 (use -v to see invocation)
i searched for the error but dint get how to resolve. nd some time armv error
(null): Library not found for -lCardAnalyLib1 it is .a typefile
#import <UIKit/UIKit.h>
#import "AudioAnalyLib.h"
#import <QuartzCore/QuartzCore.h
these are pre imported file but if i import any other file get above error
You need to add the .a file to your target. Choose the Build Phases tab of the target in Xcode, open up the Link Binary With Libraries section, and add your library file.