If you are building cross-platform frameworks, you can use macros in code to conditionally select the code you want to include depending on the platform. However, that's not possible with IB files. If you add a iOS Storyboard and you try to compile your framework for macOS, your framework won't compile. Thanks to this tool you can solve this issue. It'll copy and link only the .xib
and .storyboard
that match the platform you are building for.
- Install Swift if you didn't have it installed.
- Git clone the repository
git clone [email protected]:carambalabs/xpibtool.git
- Build it using
swift build
- Voila 🎉
- Files from John Sundell
- Commander from Kyle Fuller
- SwiftShell from Kare Morstol
This project is funded and maintained by Caramba. We 💛 open source software!
Check out our other open source projects, read our blog or say 👋 on twitter @carambalabs.
Contributions are welcome 🤘 We encourage developers like you to help us improve the projects we've shared with the community. Please see the Contributing Guide and the Code of Conduct.
The MIT License (MIT)
Copyright (c) <2017> Caramba
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.