rahul0x24 / swiftframeworktemplate Goto Github PK
View Code? Open in Web Editor NEWA template for new Swift iOS / macOS / tvOS / watchOS Framework project ready with travis-ci, cocoapods, Carthage, SwiftPM and a Readme file
License: MIT License
A template for new Swift iOS / macOS / tvOS / watchOS Framework project ready with travis-ci, cocoapods, Carthage, SwiftPM and a Readme file
License: MIT License
Obtaining the personal access token and a secure version of it, and how to edit the Travis script accordingly
Lucass-MacBook-Air:documents lucasfarah$ cookiecutter https://github.com/cookiecutter-swift/FrameworkTemplate
name [Framework]: Test
summary [cookiecutter bootstrap template for swift framework]: Will test cookiecutter
bundle_identifier [me.rahulkatariya]: com.test.cookiecutter.llf
full_name [Rahul Katariya]: Lucas Farah
email [rahulkatariya@me.com]: lucas.farah@me.com
organization_name [cookiecutter-swift]: Awesome Labs
homepage [http://rahulkatariya.me]: lucasfarah.me
version [0.0.1]: 0.0.1
twitter [rahulkatariya91]: 7farah7
Initialized empty Git repository in /Users/lucasfarah/Documents/Test/.git/
scripts/bootstrap: line 1: carthage: command not found
ERROR: Stopping generation because post_gen_project hook script didn't exit successfully
Hook script failed (exit status: 127)
Awesome stuff!
It would be simpler if we use xcconfigs for the configuration.
I am curious about what is a good practice to add a Framework dependency in this Template, for example AlamoFire. For more details, I posted a question about that in SO.
Hi!
As currently is, it seems that the framework version is hardcoded to 0.0.1 in the podspec and Info.plist files, and to 3.0.0 in the README file. Is it possible to make it customizable during setup? If not, then we could perhaps at least edit it to be the same number in all files.
Thanks!
Hi, Rahul! I have a stupid simple question. I want to create own template for Xcode project. And I've tried to create project with default name and replace it by {{ cookiecutter.name }}
key. How you did it?
Hi! I noticed each build stage on Travis was rebuilding every dependency on Cartfile from scratch, leading each build stage to take around 25 minutes in my framework.
I was outdated myself with the integration between Carthage and Travis, but then I found that it is already possible to use the cache successfully: travis-ci/travis-ci#6348
Notice that what's suggested there is very close to what we have in this template, the only difference being that they run the Carthage command before_install
rather than before_script
. I made that change and it worked great for me - it takes around 5 minutes now.
edit: I must say my 2 first build stages took around 5 minutes, but the 3rd one is rebuilding all dependencies again. Maybe because yesterday I cancelled after the first 2 and it is creating individual caches per stage?
While this was a great improvement for my case, I don't know what were the reasons behind doing it on before_script
, so I'm not sure if moving to before_install
will be a good change. Let me know if I can open a PR!
Thanks! :D
When adding an example Project, I can't seem to get it to recognize classes the Framework provides.
import MyFramework
works, but I get no type names 'SomeType' in module MyFramework
when I try to use the framework (for example, MyFramework.Something
)
I've tried to copy how Restofire is setup, but had no luck.
My Example project has the framework added to Embedded Binaries and
Linked Frameworks and Libraries` in Xcode.
I'm wondering if somehow the .framework isn't including my source files? They're in the Compile Sources
build phase - so I'm not sure where to look.
Also, is the bridging header for Objective-C compatibility, or should I remove it if I have a 100% Swift project?
The Package.swift
template has Restofire
hard-coded under the filename
The meaning of “tags: true” in the Travis config and example of tags that are valid according to the regex (for non-regex experts)
@RahulKatariya I can grab this one too but I have a question: if I push —tags then only the tag is pushed, which will run the deployment scripts but won’t update my master branch. If I push master then it won’t deploy because it’s not a tagged build... so my newbie solution was to push —tags, then push master and cancel the master build (because 2 builds are triggered, one for the tag and another for the branch). What is a more appropriate way to do this? Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.