Coder Social home page Coder Social logo

Comments (5)

netbe avatar netbe commented on May 21, 2024

In my opinion, you should not have OHHTTPStubs code in you real app, only in the tests target, check where your headers are included.

from ohhttpstubs.

jcole avatar jcole commented on May 21, 2024

Thanks -- I thought I did follow the instructions on the wiki for only adding it to the Test target, but it's certainly possible I screwed that up.

from ohhttpstubs.

AliSoftware avatar AliSoftware commented on May 21, 2024

Yes that's not really an issue because you should only use OHHTTPStubs in your tests & debug code, not in production (and normally if you don't use the OHHTTPStubs symbols anywhere in your code, the code won't be included by the linker to reduce the final binary size, except if you used -all_load).

You should only need to use stubs in your tests & debug code, it doesn't have any sense to use it in production code.
I'll probably add something in the README about this anyway.

If you guys have any idea if it is possible to detect if an application is being compiled with a production certificate using #if directives (I hardly doubt it, except if the Xcode compile adds -D flags automatically in such cases but it's doubtful) so I can add a #warning or #error in such case to prevent the compilation/linking with OHHTTPStubs in production code?

from ohhttpstubs.

aceysmith avatar aceysmith commented on May 21, 2024

Is this still an issue? It appears that the mentioned initializer isn't used anymore. Is there any other private API use with this library? I'd like to switch to including OHHTTPStubs via cocoapods, but cocoapods doesn't have conditional linking based on build configurations quite yet.

from ohhttpstubs.

AliSoftware avatar AliSoftware commented on May 21, 2024

Nope every use of any private API have been removed since this issue and no new private API have been introduced since the numerous new versions since.

So this lib won't make your app being rejected from AppStore submission.

Note that I still recommend to remove it before submitting, not because it would be rejected but because it had little sense to keep a lib in a release version of your app if you don't use it (you rarely stub requests in your final app 😉) and it will make your app size lighter.

Also note that the conditional linking based on build configurations has been recently added to the master branch of CocoaPods and will thus be available in the next release of CocoaPods !

from ohhttpstubs.

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.