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
import StoreKit | |
import SwiftyStoreKit | |
typealias PurchaseHandler = (_ transactionId: String?, _ success: Bool, _ error: Error?) -> () | |
final class SubscriptionManager: ObservableObject { | |
static let shared = SubscriptionManager() | |
@Published var hasActiveSubscription = false |
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| | |
# installer.pods_project.targets.each do |target| | |
# flutter_additional_ios_build_settings(target) | |
# end | |
installer.generated_projects.each do |project| | |
project.targets.each do |target| | |
target.build_configurations.each do |config| | |
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0' | |
end |
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
extension PHAsset { | |
// MARK: - Public methods | |
func getAssetThumbnail(size: CGSize) -> UIImage { | |
let manager = PHImageManager.default() | |
let option = PHImageRequestOptions() | |
var thumbnail = UIImage() | |
option.isSynchronous = true | |
manager.requestImage(for: self, targetSize: size, contentMode: .aspectFill, options: option, resultHandler: {(result, info)->Void in |
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| | |
installer.generated_projects.each do |project| | |
project.targets.each do |target| | |
target.build_configurations.each do |config| | |
config.build_settings["DEVELOPMENT_TEAM"] = "Your Team ID" | |
end | |
end | |
end | |
end |
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
@State var selectedView = 0 | |
var position: CGFloat = 2 | |
var nTab: CGFloat = 4 | |
var body: some View { | |
GeometryReader { geometry in | |
ZStack(alignment: .bottomLeading) { | |
TabView(selection: self.$selectedView) { | |
HomeView() |
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
if(defined('CURL_HTTP_VERSION_2_0')){ | |
$device_token = '...'; | |
$pem_file = 'path to your pem file'; | |
$pem_secret = 'your pem secret'; | |
$apns_topic = 'your apns topic. Can be your app bundle ID'; | |
$sample_alert = '{"aps":{"alert":"hi","sound":"default"}}'; | |
$url = "https://api.development.push.apple.com/3/device/$device_token"; |
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
поиск файлов по содержащимуся тексту | |
grep -rnw '/путь/к/папке/с/файлами' -e "шаблон" | |
чтение фала | |
cat /home/john/RESULTS.txt - маленький | |
less /home/john/RESULTS.txt - большой |
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
Xcode -> Window -> Devices and Simulators | |
-> Right click on your device -> Show Provisioning Profiles... | |
-> Select Provisioning Profile -> - Remove selected profiles | |
rm -rf ~/Library/Developer/Xcode/DerivedData/ && rm -rf ~/Library/Caches/org.swift.swiftpm/ |
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
# Xcode | |
# | |
build/ | |
*.pbxuser | |
!default.pbxuser | |
*.mode1v3 | |
!default.mode1v3 | |
*.mode2v3 | |
!default.mode2v3 | |
*.perspectivev3 |
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
fileprivate func requestReview() { | |
if #available(iOS 10.3, *) { | |
//let isShow = CONFIG_MANAGER.getBool(.ifNeedRequestReview) | |
//if isShow == true { | |
if let scene = UIApplication.shared.connectedScenes.first(where: { $0.activationState == .foregroundActive }) as? UIWindowScene { | |
SKStoreReviewController.requestReview(in: scene) | |
} | |
//} | |
} | |
} |
NewerOlder