قالب وردپرس درنا توس
Home / IOS Development / API pollution in swift modules

API pollution in swift modules

When importing a fast code module,
You expect the result to be completely additive.
That is to say:
The potential for new functionality comes at no cost
(other than say a modest increase in the size of your app package).

Importer Natural Language rams,
and * boom * – your app can
determine the language of text;
import Core Motion ,
and – * whoosh * – your app can
respond to changes in device direction.

But it would be surprising if you say,
the ability to distinguish between French and Japanese
Disturbed your apps' ability to tell which way it was magnetic north.
And although this particular example is not real
(for the relief of frankophones in Hokkaido),
There are situations where a Swift addiction
can change how your app behaves ̵

even if you are not using it directly .

In this week's article,
We see in some ways that imported modules can
change the silence of existing code,
and suggest how to
prevent this from happening as an API provider
and reducing the effect of this as an API consumer.