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 #111

Closed yilongmd closed 8 years ago

yilongmd commented 8 years ago

I replaced a brand new AppDelegate But as long as I have the original project file will be wrong

main.m file :

import <UIKit/UIKit.h>

import "AppDelegate.h"

int main(int argc, const char * argv[]) { @autoreleasepool { return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); } }

// From here to end of file added by Injection Plugin //

ifdef DEBUG

static char _inMainFilePath[] = FILE; static const char *_inIPAddresses[] = {"192.168.1.5", "127.0.0.1", 0};

define INJECTION_ENABLED

import "/tmp/injectionforxcode/BundleInjection.h"

endif

johnno1962 commented 8 years ago

try this, before #ifdef DEBUG add the following:

define file not_file

orta commented 8 years ago

Closing as inactive.