johnno1962 / injectionforxcode

Runtime Code Injection for Objective-C & Swift
MIT License
6.55k stars 565 forks source link

BundleInjection.h Redefinition of 'file' as different kind of symbol #104

Closed yilongmd closed 8 years ago

yilongmd commented 8 years ago

If it is a new project to use InjectionI is very perfect;

Unit price to join their own framework code on the problem;

Is it because my project is NoARC?


In the following attached to the process, please help;

1.my project

johnno1962 commented 8 years ago

you must have a symbol “file” in your main.m?? Or should you be including BundleInterface.h if it is a bridging header?

yilongmd commented 8 years ago

I am uploading the image file

yilongmd commented 8 years ago

Image of 1

johnno1962 commented 8 years ago

Find out where BundleInjection.h is included (probably your main.m) and locate where the symbol is duplicated (or are you including BundleInjection.h twice?) file is defined in BundleInjection.h

yilongmd commented 8 years ago

https://github.com/yilongmd/Temp/ look here.

yilongmd commented 8 years ago

I uploaded my project.

yilongmd commented 8 years ago

https://github.com/yilongmd/InjectAndBeeBugTest

johnno1962 commented 8 years ago

Look for another definition of symbol “file” in AppDelegate.h or a file included by AppDelegate.h

yilongmd commented 8 years ago

My AppDelegate Be packaged
Is this a problem?

yilongmd commented 8 years ago

import "Bee.h"

pragma mark -

@interface AppDelegate : BeeUIApplication @end

.m

import "AppDelegate.h"

import "AppBoard_iPhone.h"

import "AppBoard_iPad.h"

pragma mark -

@implementation AppDelegate

}

@end

johnno1962 commented 8 years ago

Look in Bee.h

johnno1962 commented 8 years ago

Easiest thing to do is replace #import “AppDelegate.h” in main.m with @class AppDelegate;

yilongmd commented 8 years ago

Thank you. I'll try.

orta commented 8 years ago

Closing due to wrapped up :+1: