Thanksfor your answer. To be precise, I wanted to convert this library GitHub - shpakovski/MASShortcut: Modern framework for managing global keyboard shortcuts compatible with Mac App Store. More details: into a swift package so that I could use it in my swift project. Can I do it?
I added the Package.swift file like this: MASShortcut/Package.swift at master rampatra/MASShortcut GitHub and I successfully imported it into my swift project. However, when I try to run it, I get the below errors:
Thanks a million for such an expounded answer. With the help of this, I am now able to successfully compile the library and run my project. I had to add #import to all the files as most of the files were throwing errors while compiling.
Having said that, the library didn't work as expected. The custom key shortcut view in the library behaved weirdly and I have no clue why. Let me share the link to this page to the library maintainers and see what they have to say.
The XXX string you mentioned in the issue is comming from here. It looks like it is being used to detect when localization failed (by displaying it instead of falling back to the dictionary key). I suspect changing this line to pass key instead as a workaround will allow you to use the unlocalized English keys directly until resources can be done with SwiftPM.
Also, there was another issue. The Masshortcut view distorted all other views on the view controller. It doesn't happen if I import via cocoapods but it does happen if I do it via SPM. So, I have to investigate that and then I think I would be able to finally use the library.
Sorry to butt in here, but is there any way to get something like this to work without an include folder? I really, really don't want to pollute repos with that just to get SPM to work. And would there be any difference for tools version 5.0 or 5.1?
When the Swift Package Manager was announced back in 2018 at the Apple WWDC, it lacked basic features that made it cumbersome for many developers. But after several years, Apple and the Swift Community have continuously improved, making the Swift Package Manager the most reliable, integrated and easy-to-use dependency manager for the Apple Platforms. Only now, after a few years since its release, we can confidently say that the Swift Package Manager is mature enough to be a viable alternative.
Nevertheless, it is the only first-class option in the Apple developer ecosystem. It is also widely supported by most libraries. For example, the omnipresent Firebase SDK for iOS recently added Swift Package Manager support.
Binary frameworks can be distributed as Swift Packages. To do that, we simply need to define a binaryTarget and expose it as a product in the Swift Package. This would be our Swift Package manifest file Package.swift:
For the above, we need to have the XCFramework of our FleksyKeyboardSDK compressed as a zip file. We then need to have it stored in a remote host, accessible to our clients. Also, note the checksum field of the binaryTarget, which contains a hash of the XCFramework. When our clients add the package to their project, Xcode uses the checksum to validate the XCFramework it downloads.
In the case of iOS, our clients also need to link their app against the Engine XCFramework because, in fact, our FleksyKeyboardSDK depends on it. It goes without saying that we also want to distribute the Engine via Swift Package Manager.
The last thing you want is a client adding a version of the dependencies that is not compatible with each other! Avoiding these kinds of issues is why we decided to use Swift Package Manager in the first place!
You can notice how this solution allows us to specify the exact version of the dependencies. In the example above, we require version 3.5.4 of the Engine. This is the required version by the version 4.0.0 of the FleksyKeyboardSDK. As a consequence, any developer that uses the FleksySDK Swift Package does not have to worry about the version compatibility between dependencies in our SDK.
Perhaps the most straightforward approach would be to commit the binaries of the Swift Packages in the same git repository as the Package itself. Then, by restricting the access to that git repository to our clients only, we would achieve our goal. However, this presents a couple of issues:
Swift Package Manager takes care of downloading and validating the zip archive of the binary, as we mentioned above. In fact, the binaries hosted on a server do not need to be publicly available. Swift Package Manager supports basic authentication for packages whose binaries are stored in a private server.
Obviously, the Swift Package Manager still has limitations. Nevertheless, as we have seen above, some workarounds are possible. Moreover, it also offers some advanced features such as supporting basic authentication for binaries hosted remotely.
CocoaPods and Carthage have filled the dependency management gap and the Apple developer Community should be grateful of them. In fact, both solutions have served as models for the development of the Swift Package Manager. Over time, the official solution provided by Apple has grown greatly, which certainly makes its alternatives become less and less relevant.
Here at Fleksy, we aim to deliver the best possible service solutions for our clients. In terms of distributing an iOS library, we think the best, most straightforward and official solution is the Swift Package Manager.
I use Windows 10 on my laptop and Android 11 with Microsoft Swiftkey on my smartphone. I do not have Windows clipboard history enabled on my laptop (but if I do activate it any copied passwords remain visible until manually cleared or overwritten when the clipboard reaches capacity) but I cannot find a way of preventing Android/Microsoft Swiftkey from retaining multiple clipboard items, including any passwords that may have been copied from BW.
I suspect the response to this will be to avoid using copy/paste for login credentials and instead rely on autofill or typed entry, which is fine, but I guess my overriding question is why is copy/paste available as an option when it seems to be inherently insecure?
I am a Linux User and I also have the same concerns and issues. I have enabled BW to clear the clipboard after 30 seconds, and of course it does not. Same exact issue. I keep clipman (clip manager for linux) running as a taskbar icon and I can quickly clear the clip board history.
Also here is quick bit warden article on using auto fill for passwords that avoid the copy paste shuffle, but only seems to be if your using the browser plug in or phone app.
-fill-browser/#keyboard-shortcuts-hot-keys
In the end I will admit I have not found a reasonable solution myself. For me though, at some point I have to make a choice and run with it. Since I am a Linux user I am conditioned by default to less then polished perfect software and have adapted to work around minor issues of inconvenience. I am also an ardent believer in Open Source software so for me Bit Warden get my vote.
While the copy/paste clipboard thing is a minor issue, I have faith in my desktops security and in google chrome security. If I can manually copy paste a password, I can just as quickly clear it from the clip board.
With all that said, I do implore Bit Warden to clean up the code in regards to clearing the clip board. If you have a setting that claims to clear the clipboard then make that happen. Otherwise it looks like software that is released without actual functionality, so lets make it happen!
The Clear Clipboard feature seems to work as intended for me, and I cannot seem to replicate this issue in any Bitwarden app/client on Windows, MacOS, Linux, or Android. Can someone provide specific clients, OS, steps, etc. to replicate the issue?
Noe that if you have installed an app that records your clip history, Bitwarden does not claim to clear that, nor could it. Swiftkey on Android is a good example of this - you must disable the Remember Copied Items feature to prevent it from storing items.
No problem, Danny - I wondered if some posts in this thread were about clearing the clipboard history (in apps or opt-in features, such as the Windows clipboard history applet) rather than clearing the current clipboard contents. Obviously, these are different things, and Bitwarden only takes care of the latter.
A workaround I developed on Android involves using macrodroid pushing a random string of characters to the clipboard every X minutes. I also put in a repeat loop so that it pushes 20 times to make sure the entire clipboard has dummy data in it.
On macOS, Enpass copies data to clipboard with a flag (org.nspasteboard.TransientType ) that the data should not be recorded in pasteboard history due to sensitive nature of data. Only the clipboard managers that are not supporting this flag or configured to ignore this will save data to its history.
While developing iOS apps, we often run into issues where the iPhone keyboard slides up and covers the UITextField/UITextView. IQKeyboardManager allows you to prevent this issue of keyboard sliding up and covering UITextField/UITextView without needing you to write any code or make any additional setup. To use IQKeyboardManager you simply need to add source files to your project.
IQKeyboardManager works on all orientations, and with the toolbar. It also has nice optional features allowing you to customize the distance from the text field, behaviour of previous, next and done buttons in the keyboard toolbar, play sound when the user navigates through the form and more.
Run carthage to build the frameworks and drag the appropriate framework (IQKeyboardManager.framework or IQKeyboardManagerSwift.framework) into your Xcode project based on your need. Make sure to add only one framework and not both.
Swift Package Manager(SPM) is Apple's dependency manager tool. It is now supported in Xcode 11. So it can be used in all appleOS types of projects. It can be used alongside other tools like CocoaPods and Carthage as well.
3a8082e126