我正在使用visual studio开发cordova应用程序.
如果我使用Xcode8将我的应用程序上传到商店,我会收到以下错误邮件.
Missing Info.plist key - This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSPhotoLibraryUsageDescription key with a string value explaining to the user how the app uses this data.
基于另一个stackoverflow问题,我添加了插件https://github.com/leecrossley/cordova-plugin-transport-security并修改了plugin.xml:
<platform name="ios">
<config-file target="*-Info.plist" parent="NSAppTransportSecurity">
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSPhotoLibraryUsageDescription</key>
<string>This app requires access to the photo library.</string>
<key>NSMicrophoneUsageDescription</key>
<string>This app does not require access to the microphone.</string>
<key>NSCameraUsageDescription</key>
<string>This app requires access to the camera.</string>
</dict>
</config-file> …
我试图在目标->构建设置-> Objective C 桥接标头中提供桥接标头
我可以使用Xcode 9创建的项目来做到这一点
但我在Xcode 9.1中找不到Objective C Bridging 标头。在 Xcode 9.1 中创建的项目中缺少它,如下所示。
我正在尝试将时间戳转换为日期.但它返回错误的日期.
我有时间戳
1524637838000.0
根据此在线转换器返回25-04-2018 12:00
但是在使用我的代码进行转换时,我的日期错误
let date = Date(timeIntervalSince1970:1524637838000.0)
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "dd-MM-yyyy hh:mm"
let myDate = dateFormatter.string(from: date)
print("Date is = ",myDate)
Run Code Online (Sandbox Code Playgroud)
我明白了
07-11-50283 12:03
结果.我的代码有什么问题吗?