injectionforxcode icon indicating copy to clipboard operation
injectionforxcode copied to clipboard

One of the two will be used. Which one is undefined.

Open lee-eve opened this issue 7 years ago • 8 comments

Hi,I have some problem When I use Injection III(AppStore Version),I have loaded it in Appdelate and implemented the injected method.

  • Device:Simulator iPhoneX
  • Xcode Version :Version 9.3

Injection connected, watching /Users/rouslee/Desktop/zuolin/zuolin_ResourceReservation_3.5/client_base_ios/** *** Compiling /Users/rouslee/Desktop/zuolin/zuolin_ResourceReservation_3.5/client_base_ios/EHProject/ResourceReservation/ViewCtl/ReservationMainViewCtl/EHResourceReservationMainViewCtl.m *** Loading .dylib - Ignore any duplicate class warning... objc[36655]: Class EHResourceReservationMainViewCtl is implemented in both /Users/rouslee/Library/Developer/CoreSimulator/Devices/5C07D31F-85DA-4889-8103-3E986942A5FC/data/Containers/Bundle/Application/D544CEB1-AD46-4B86-B19F-18B2D1443D5F/Techpark.app/Techpark (0x10ae39fd0) and /Users/rouslee/Library/Containers/com.johnholdsworth.InjectionIII/Data/eval101.dylib (0x13101d0a0). One of the two will be used. Which one is undefined.

The following questions , How can I fix it?

lee-eve avatar Jun 30 '18 02:06 lee-eve

You can ignore this message. It’s a warning.

johnno1962 avatar Jun 30 '18 03:06 johnno1962

But it don‘t work!

lee-eve avatar Jun 30 '18 03:06 lee-eve

This could be for all sorts of reasons. Have you tried the “GettingStarted.zip” example? Can you post the code you’re trying to inject?

johnno1962 avatar Jun 30 '18 10:06 johnno1962

How do you mean?

johnno1962 avatar Jul 04 '18 16:07 johnno1962

Sorry, I didn't respond in time. I tried to change the background color simply in a view demo, but when I want to use it in a real project, the view is more complicated and it can't work.

// Code inside AppDelegate didFinishLaunchingWithOptions method
#if DEBUG
    NSBundle *bundle = [[NSBundle alloc] initWithPath:@"/Applications/InjectionIII.app/Contents/Resources/iOSInjection.bundle"];
    [bundle load];

#endif
 
// Code inside MyViewController 

- (void)injected {
    NSLog(@"injected Some thing....");
    [self viewDidLoad];
}
 

lee-eve avatar Jul 05 '18 02:07 lee-eve

Have you solved the problem?

Chance-Cheng avatar Aug 23 '18 07:08 Chance-Cheng

Hello I have the same problem.

-(void)injected{ self.nameLabel.backgroundColor = UIColor.greenColor; }

💉 *** Compiling /Users/ZLJFaceCollectCell.m *** 💉 Loading .dylib - Ignore any duplicate class warning... objc[13410]: Class ZLJFaceCollectCell is implemented in both /Users/xxx (0x10544e328) and /Users/xxx/eval102.dylib (0x1331c8510). One of the two will be used. Which one is undefined. 💉 Loaded .dylib - Ignore any duplicate class warning...

TomLongJoy avatar Feb 18 '19 09:02 TomLongJoy

I got same error

bluelabeldeveloper1 avatar Mar 04 '19 14:03 bluelabeldeveloper1