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
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
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
//add to info.plist - "Privacy - Tracking Usage Description" | |
// "Allow tracking now to stop seeing irrelevant ads. We never rent or sell your data." | |
//pod 'FBAudienceNetwork' | |
import FBAudienceNetwork | |
import AppTrackingTransparency | |
fileprivate func requestTrackingPermission(completion: @escaping (() -> ())) { | |
AnalyticsManager.logEvent(type: .requestTrackingPermission, parameters: ["ios": UIDevice.current.systemVersion ]) |
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
pod deintegrate | |
pod cache clean --all | |
pod install | |
rm Podfile | |
Если вы пытаетесь переустановить только его, попробуйте только pod deintegrate, не трогая файл модуля и кеш. За ним следует pod install. Если это не сработает, используйте все три приведенные выше команды и начните с начала. | |
Возможно, вам придется установить pod deintegrate и pod clean, если вы еще этого не сделали. Для этого запустите sudo gem install cocoapods-deintegrate cocoapods-clean. |
NewerOlder