Comments (5)
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.
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.
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.
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.
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)
- Mocktail support HOT 2
- pod 'AFNetworking', '~> 3.0'
- Incorrect example for onStubActivation on Usage Examples page
- [wiki] OHHTTPStubsResponse to HTTPStubsResponse with Swift HOT 4
- Module 'OHHTTPStubs' has no member named 'removeAllStubs' in 9.0.0 HOT 2
- Xcode Analyze: Logic error
- N HOT 1
- Travis CI has seemed to be moved. HOT 3
- How to use in a UITest HOT 9
- OHHTTPStubs with SPM in Xcode 12.5 HOT 1
- Fluent API for stubbing
- how do i use it HOT 1
- Liscense HOT 1
- 4 da world HOT 1
- - [ ] Submitting a maybeaplle @mtodd []()![image](https://user-images.githubusercontent.com/122186144/230750410-f43c3ffb-f6a7-4bd4-9970-8b065670ea28.jpeg)@craystyle1212
- Won't build with Carthage and Xcode 14.3 HOT 7
- App Crashes on Device When OHHTTPStubsSwift Added to iOS Framework via Swift Package Manager HOT 1
- FEATURE REQUEST: Ability to control response stream
- `canInitWithRequest` not called in Xcode 15 preventing stubbing being setup correctly
- Request to provide Privacy Manifest file for OHHTTPStubs SDK HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ohhttpstubs.