ios - 如何使用 Swift 4.2 创建应用商店应用更新通知机制?
问题描述
我的场景,我正在尝试notification
为我的应用程序实施应用程序更新。我试过Siren
Pod 但它正在显示no module found
。请给我一个解决方案或替代想法。
警笛吊舱
在这里,我No Module Found
也正在安装 pod。
Import Siren // No module found
解决方案
你打开你的.xcworkspace
或.xcodeproj
?如果您不小心打开了.xcodeproj
.
按照 cocoapods 的Siren 安装说明,您将在“终端”窗口中执行以下操作。具体来说,如果您尚未创建Podfile
:
$ cd MyApp
$ pod init
你可以编辑你的Podfile
,比如:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'MyApp' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for MyApp
pod 'Siren'
end
然后你可以从“终端”安装你的 Cocoapods:
$ pod install
Analyzing dependencies
Downloading dependencies
Installing Siren (4.2.1)
Generating Pods project
Integrating client project
[!] Please close any current Xcode sessions and use `MyApp.xcworkspace` for this project from now on.
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.
[!] Automatically assigning platform `ios` with version `12.1` on target `MyApp` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
注意警告:
请关闭所有当前的 Xcode 会话并
MyApp.xcworkspace
从现在开始用于此项目。
现在打开工作区,而不是.xcodeproj
:
$ open MyApp.xcworkspace
推荐阅读
- python-3.x - python打印前n行字符串
- kotlin - 带有`final`修饰符的`val`属性的目的是什么?
- excel - Excel VBA - Application.Match 方法找不到匹配项
- angular - 自动完成标签角度在 iphone 中不起作用
- excel - Excel VBA属性使用无效
- c++ - 在 AVX 通道中随机播放的最佳方法是什么?
- laravel - 如何使用(Lighthouse 包)在 Laravel 中发送测试突变
- ckeditor4.x - Adblocker 禁用 CKEditor 4 文本区域,因此无法写入
- python - 获取http状态码
- c# - 没有名为 xlsxwriter.workbook -Ironpython 的模块