This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
post_install do |installer| | |
project_path = "Bower.xcodeproj" | |
project = Xcodeproj::Project.open(project_path) | |
project.targets.each do |target| | |
shell_script_path = "Pods/Target Support Files/Pods-Bower/Pods-"+target.name+"-frameworks.sh" | |
shell_script_input_lines = File.readlines(shell_script_path) | |
shell_script_output_lines = shell_script_input_lines.map { |line| line.sub("source=\"$(readlink \"${source}\")\"", "source=\"$(readlink -f \"${source}\")\"") } | |
File.open(shell_script_path, 'w') do |f| | |
shell_script_output_lines.each do |line| | |
f.write line |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Full recipe at https://swiftuirecipes.com/blog/play-video-in-swiftui | |
import SwiftUI | |
import AVKit | |
import Foundation | |
struct EnhancedVideoPlayer<VideoOverlay: View>: View { | |
@StateObject private var viewModel: ViewModel | |
@ViewBuilder var videoOverlay: () -> VideoOverlay | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// full recipe at https://swiftuirecipes.com/blog/hyperlinks-in-swiftui-text | |
import SwiftUI | |
import SwiftUIFlowLayout | |
import MarkdownKit | |
struct HyperlinkTest: View { | |
var body: some View { | |
VStack { | |
HyperlinkText(html: "To <b>learn more</b>, <i>please</i> feel free to visit <a href=\"https://swiftuirecipes.com\">SwiftUIRecipes</a> for details, or check the <code>source code</code> at <a href=\"https://github.com/globulus\">Github page</a>.") | |
HyperlinkText(markdown: "To **learn more**, *please* feel free visit [SwiftUIRecipes](https://swiftuirecipes.com) for details, or check the `source code` at [Github page](https://github.com/globulus).") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The trick is to link the DeviceSupport folder from the beta to the stable version. | |
# sudo needed if you run the Mac App Store version. Always download the dmg instead... you'll thank me later :) | |
# Support iOS 15 devices (Xcode 13.0) with Xcode 12.5: | |
sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/15.0 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport | |
# Then restart Xcode and reconnect your devices. You will need to do that for every beta of future iOS versions | |
# (A similar approach works for older versions too, just change the version number after DeviceSupport) |