johnno1962 / injectionforxcode

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

ld: framework not found GoogleMapsBase for architecture x86_64 #162

Closed jyliang closed 7 years ago

jyliang commented 7 years ago

injection.zip

Please see attached project for demonstration of the problem. Injection on FirstViewController will result in error.

Env: XCode 7.3

To Repo:

  1. pod install
  2. inject on FirstViewController and notice the error
  3. comment out: import GoogleMaps
  4. inject again and notice the injection is successful

what seems to be the problem here?

johnno1962 commented 7 years ago

Most likely this is because it is not finding the framework. You should see a message about this in the injection console. You may need to adjust your Framework search path in injection’s “bundle project”.

jyliang commented 7 years ago

Thanks the for the fast response! Solved! Solution: Add this to the Framework Search Paths in the InjectionBundle project: $(PROJECT_DIR)/.. (this goes back up to the original project folder) and marked it recursive