Code Monkey home page Code Monkey logo

Loading .dylib has failed, This is likely because Swift code being injected references a function using a default argument or a member with access control that is too restrictive or perhaps an XCTest that depends on code not normally linked into your application. Rebuilding and re-running your project (without a build clean) can resolve this. about hotreloading HOT 8 CLOSED

zerocc2014 avatar zerocc2014 commented on June 5, 2024
Loading .dylib has failed, This is likely because Swift code being injected references a function using a default argument or a member with access control that is too restrictive or perhaps an XCTest that depends on code not normally linked into your application. Rebuilding and re-running your project (without a build clean) can resolve this.

from hotreloading.

Comments (8)

johnno1962 avatar johnno1962 commented on June 5, 2024

Hi, Is this Swift or Objective-C? Can you tell me the name of the symbol that is not defined?

from hotreloading.

zerocc2014 avatar zerocc2014 commented on June 5, 2024

Hi, Is this Swift or Objective-C? Can you tell me the name of the symbol that is not defined?

my project Swift and Objective-C,symbol not found in flat namespace '_xxx';

`
typedef NSString *URLConstString;

extern a URLConstString xxx;

URLConstString const xxx = @"yyyyy";
`

from hotreloading.

zerocc2014 avatar zerocc2014 commented on June 5, 2024

Hi, Is this Swift or Objective-C? Can you tell me the name of the symbol that is not defined?

dlopen(/..path/tmp/eval101.dylib, 0x0002): symbol not found in flat namespace '_xxx'

from hotreloading.

johnno1962 avatar johnno1962 commented on June 5, 2024

Strange, can you remove the "const"?

from hotreloading.

zerocc2014 avatar zerocc2014 commented on June 5, 2024

Strange
above i write error,original like this
typedef NSString *URLConstString;

extern URLConstString const xxx;

URLConstString const xxx = @"yyyyy";

from hotreloading.

johnno1962 avatar johnno1962 commented on June 5, 2024

I'm not sure what the problem is. If you can't inject files that refer to this definition you could consider creating a class method to access the variable.

from hotreloading.

zerocc2014 avatar zerocc2014 commented on June 5, 2024

I'm not sure what the problem is. If you can't inject files that refer to this definition you could consider creating a class method to access the variable.

thx, I use demo test inject success,but company project is fail.

from hotreloading.

johnno1962 avatar johnno1962 commented on June 5, 2024

Not much more I can say here. When referring to a particular symbol gives you problems dynamically loading you have to explore ways to avoid referring to that symbol directly in the file being inject for example by using a class method.

from hotreloading.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.