-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cocoapods distribution #57
Conversation
The project now is by default built into a (iOS 8+) framework The framework can run attached tests This framework is embedded into an application which acts as an example application Cocoapods spec is added
@smartdevicelink/ios please (git) checkout this branch and bring me your concerns. I don't want to run a full review on call when this branch isn't yet ready. I'm hoping to get it merged before 4.0. |
The example repo can be found here: https://github.com/smartdevicelink/sdl_ios_cocoapods_test Linting the spec (which tests the remote repo itself) is successful. |
Library files are now within the framework's folder Fix some warnings
3699f20
to
5c29191
Compare
@smartdevicelink/ios This is ready for review. |
Update scheme name
I have identified another task to be completed before this can be merged. The framework header doesn't import everything that the scheme believes to be a public header, and they should be equivalent. Will have to review all differences and decide whether to make them public to the framework header or to move them to project instead of public in the scheme. |
Add all public headers to SmartDeviceLink.h
Fix wrong folder for source files
b035252
to
f2b4cd3
Compare
Linted the spec again, everything is still good to go. |
I'm going to update the main body of this PR above, but I want to summarize the changes here. I have found proof that dynamic frameworks can, in fact, be run on iOS 7+ apps. The framework's target must be iOS 7, and the framework must be weakly linked to the iOS 7 project, the framework can then be imported and used normally. There will be a warning claiming Credit to this fellow's post for putting me on to the idea. I used his github project to test. I was able to pull out the runtime checks for class existence and the code still ran fine, no need to have the class return an |
a042d12
to
a0045cf
Compare
TCP and iAP connection view controllers, swap between them via the segmented control Preferences object to thread-safely read and write to user defaults
a0045cf
to
f4b7ad6
Compare
Also note that changes to the public / private -ness of header files means that this is a major version change. |
I have no idea why this says going into master. It will be merged into develop. No need to close this PR, since it will be merged manually and closed manually anyway. |
I added an overview presentation with some basic bullet points. Read the in depth section above for a more complete overview. |
Remove dev team
Merged to develop |
Ready to merge
Closes #5 & #6
Summary
This branch is intended to alter distribution methods for this repository.
See this presentation for an overview.
Disadvantages
This would remove the ability to build a "fake framework" target that we currently use for builds. This means that the only way to continue to get iOS 7 support is through Cocoapods (or manually adding the Library directory to their project). We could add an additional target to continue the fake framework support, if we wished, or stick with Cocoapods as the only iOS 7 support.Dynamic frameworks provide iOS 7 support! Weakly linking them means that despite a warning, everything should work fine in iOS 7 as long as the framework also targets iOS 7+.
In Depth
Build an iOS 7+ framework
iOS moves pretty quickly; dynamic frameworks are worlds better than static libraries and fake frameworks. This means that we should be working towards an implementation that can build proper dynamic frameworks. They're easy to import, and must be supported by cocoapods' current beta release.
Testing
Dynamic framework targets come with a test target automatically. This makes it much easier to implement tests on the library code. It also opens up continuous integration as a possibility.
Example App
Dynamic framework targets come with the ability to be embedded in app targets within the same project. This will make shipping an example app about a million times easier.
CocoaPods
CocoaPods is by far the largest / most comprehensive resource for importing open-source projects into Xcode. We really need to support it. Unfortunately, the current import setup does not work for either frameworks or cocoapods (which will be building frameworks when it can in their next release). This PR supplies a podspec which will need to be verified.
Verifying a podspec is usually pretty easy. You commit, tag, and run a
lint
command line command to test your repo is setup properly. If it isn't, you commit and tweak until it works. That cannot be done on this repository, unfortunately. We will have to create a test repository that we can tweak, figure out what works, and move that work back here.Note that unless we explicitly add back in a fake framework target / script, this will be the only way to get this library for sub iOS 8 targets (which is important, I'm just not sure if this is enough. I think it should be).
Carthage
Some developers prefer the Carthage distribution system. Carthage doesn't make changes to the project that's importing the libraries, because it only supports dynamic frameworks. It is virtually free to implement.
Major Version Change
This release also fixes a lot of issues forced into the open by actually building a dynamic framework. These issues are around the main public interface file not properly importing all public headers, and the project not properly hiding all private headers. These changes to scope on headers means that it is now a major version change.
TODOs
Podspec
pod spec lint
Example / Test App
Framework
Consider separating files into file system foldersCarthage