gpt4 book ai didi

ios - 在 Info.plist 上添加任意负载后,NativeScript 上的 Http 请求不起作用

转载 作者:塔克拉玛干 更新时间:2023-11-01 21:25:43 27 4
gpt4 key购买 nike

我正在开始使用 NativeScript,实际上我正在做快速入门。

我在一个类似的问题上读到,有必要启用来自 Info.plist 的 http 请求,这是文件的内容:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>Groceries</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiresFullScreen</key>
<true/>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSExceptionDomains</key>
<dict>
<key>api.everlive.com</key>
<string></string>
</dict>
</dict>
</dict>
</plist>

文件截图: enter image description here

但是当我运行该应用程序时,它无法在 iOS 平台上运行: enter image description here

这是控制台输出:

CONSOLE LOG file:///app/shared/user/user.service.ts:50:20: {"line":40,"column":37,"sourceURL":"file:///app/tns_modules/http/http-request.js"}

据推测,该应用程序应该与 Info.plist 上添加的行一起工作,关于我做错了什么的任何想法。

最佳答案

Looks like iOS doesn't support this kind of concatenation only Android does:

  • ${variable}/some-data

On the http request it's necessary do it in the classic way:

  • variable+'/some-data'

关于ios - 在 Info.plist 上添加任意负载后,NativeScript 上的 Http 请求不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41602686/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com