I have some problems when i am run any projects in Xcode 5 it gives error like
Duplicate interface definition for class 'ViewController'
it is happen in most of situations if i download any project from git hub or from other sources.
But if i run that project in earlier version of Xcode than its working fine.
I have tried to run it Xcode 4.6 .
here is sample code that i run in Xcode 5 and gives error.
So whats problem with Xcode 5 ??
Solved:
By some Mistake i have Change System Header file from UIKIT > UITableViewController.h to
NS_CLASS_AVAILABLE_IOS(2_0) #interface ViewController : UIViewController <UITableViewDelegate, UITableViewDataSource>
SO in any project if there is a viewcontroller named ViewController it gives this error,
So i have look in old xcode and changed it to
NS_CLASS_AVAILABLE_IOS(2_0) #interface UITableViewController : UIViewController <UITableViewDelegate, UITableViewDataSource>
Related
I am using XCode 10.1 and I have installed pod 'BraintreeDropIn' for PayPal integration. But getting Parse issue as 'Expected a type' in 'BTAppSwitch.h' file as shown in the below screenshot.
Can you please someone explain to me why I get this error.
#import <UIKit/UIKit.h>
#protocol BTAppSwitchHandler
NS_ASSUME_NONNULL_BEGIN
#pragma mark - BTAppSwitch
#interface BTAppSwitch : NSObject
I have just upgraded from MacOS Sierra to Mojave and from Xcode 10.1 to 10.2
Exactly same app (given in a zip) builds on a MacOS Mohave machine in Xcode 10.2 but it doesn't build on mine machine.
I tried restart, removing derived data etc:
#import "ViewController.h"
#import "MyFrameworkSDK/MyFrameworkSDK-Swift.h"
#interface ViewController ()
#end
#implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
NSString *applicationId = [[NSString alloc] init];
applicationId = [MyFrameworkSDK exposedMethod]; // here the error is triggered: Use of undeclared identifier 'MyFrameworkSDK'
printf("%s", applicationId);
// Do any additional setup after loading the view.
}
#end
Framework has been imported correctly, included in Linked frameworks and libraries, Bitcode is set to No, Frameworks path set etc, I repeat: it's exactly same project that on another machine works.
I tried even a re-install of Xcode. It didn't work.
Question:
What can be the cause of this? Other local cache, Xcode issues, any privacy set for framework not to be public?
I lost about 1 day with this issue.
Any help would be greatly appreciated.
Update:
It seems there might be some privacy limitations set for framework, the person that is able to access it is in the development team of the framework. If he changes Xcode team to none or another team same error shows up on that machine too.
When trying to build my custom framework on simulator, I get this error
No type or protocol named 'NSURLSessionDelegate'
But it's working fine on devices
I added x86_64 and i386 to the valid architecture but still get this error
this this the header file where the error appears:
#import <Foundation/Foundation.h>
#interface CustomManger: NSObject <NSURLSessionDelegate,NSURLSessionTaskDelegate, NSURLSessionDataDelegate,NSURLSessionDownloadDelegate>
#end
I am trying to create a connected app with Salesforce IOS SDK and Swift and followed the steps mentioned in the https://www.youtube.com/watch?v=9Mt02DzsOBo but as try to attach the "Appname-Swift.h"file in the AppDelegate.m file I am getting an error.Please help what can be done next.
1)I have created the native connected app as per Salesforce IOS
Description
2)Created the bridge for Swift
"MySampleApp-Bridging-Header.h"
3)Added SFRestDelegate to RootVC.Swift
4)Imported the important header files to
"mySampleApp-bridging-Header.h" that is
#import <UIKit/UIKit.h>
#import "SFRestAPI.h"
5)As soon I am trying to import #import "MySampleApp-Swift.h" I am getting the error
I am using OSX mavericks with XCode-6(4beta)
I don't think in the video or in the sample code repository there is a file named MySampleApp-Swift.h
I'm developing in Xcode6 Beta 6 for iOS 8.
I am encountering an code error on an imported LastFM Cocoa Pod:
when I try to compile, but I can't seem to figure out what's causing the error. (Using all the code from the example)
I keep getting the following error in my AppDelegate.m file :
Property 'cacheDelegate' not found on object of type 'LastFm *'
I have however ensured to have the following code in my LastFm.h file :
#interface LastFm : NSObject
#property (unsafe_unretained, nonatomic) id <LastFmCache> cacheDelegate;
Any thought why it would claim I have not set the property in LastFM ? Not sure if this is an iOS 8 issue, or simply an error on my part?
Thanks for any suggestions.