我最近将我的 xcode 更新为 Xcode12 的测试版,以便我可以看到我的应用程序将如何在即将发布的 IOS 14 版本上运行
尝试运行 TNS RUN IOS 时,出现以下错误:
Saving metadata generation's stderr stream to: /Users/USER/Desktop/Projects/APP/platforms/ios/build/Debug-iphonesimulator/metadata-generation-stderr-x86_64.txt
~/Desktop/Projects/APP/platforms/ios
ld: building for iOS Simulator, but linking in dylib built for iOS, file '/Users/USER/Desktop/Projects/APP/platforms/ios/internal//NativeScript.framework/NativeScript' for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
note: Using new build system
note: Building targets in parallel
note: Using codesigning identity override:
note: Planning build
note: Using build description from disk
warning: The iOS Simulator …Run Code Online (Sandbox Code Playgroud) ios nativescript angular2-nativescript nativescript-plugin xcode12
默认情况下,ListPicker会占用大量屏幕空间。有没有办法让它<select>在移动设备上显示时像 HTML 的隐喻一样?
我之前使用过这个 React Native 插件,它正是我想要的隐喻,但是对于 NativeScript。
通过 NativeScript 可以轻松做到这一点吗?我想利用特定于平台的选择隐喻,因此显示/隐藏ListPicker或放入ListPicker模式不是我想要的。
另外,我将有一个相当长的列表,因此操作对话框对我不起作用。
更新:我知道nativescript-drop-down,但是它不使用 webviews 和React Native 插件所做的平台特定的“从选择列表中选择”小部件。
我所说的“从选择列表中选择特定于平台的小部件”是指(来自https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_select):
iOS(音符选择器在键盘所在的位置呈现,使用 rolodex 选择器):

Android(注意模式,带有滚动选项列表):

nativescript angular2-nativescript nativescript-telerik-ui nativescript-angular nativescript-plugin
我在android模拟器中遇到问题,我的svg / icon图层显示为黑色。有时这会影响高速公路/道路标记以及我的地图标记。该插件当前正在使用默认标记,但是我也提供了自己的png文件,它们都遇到了这个问题。
有时放大会修复它(如下面图片中的一个标记所示)
我尚未在任何其他设备上对此进行测试,并且仅使用了来自android studio的android模拟器。
一些额外的细节
我正在使用Angular(和TS)运行nativescript,我已经注释掉了添加标记等的任何无关代码,但仍然在高速公路数字标记上存在问题(下面的示例)。这是我的模板:
<StackLayout class="page">
<ContentView height="100%" width="100%">
<Mapbox
accessToken="token"
mapStyle="streets"
[latitude]=defaultLocation.latitude
[longitude]=defaultLocation.longitude
hideCompass="true"
zoomLevel="8"
showUserLocation="false"
disableZoom="false"
disableRotation="false"
disableScroll="false"
disableTilt="false"
(mapReady)="onMapReady($event)">
</Mapbox>
</ContentView>
</StackLayout>
Run Code Online (Sandbox Code Playgroud)
看来我可以使用以下代码调用removeMarkers和addMarkers来触发此操作:
updateUserMarker(loc) {
console.log("updating user location marker with loc: ", loc)
this.map.removeMarkers([this.userMarker.id]);
this.userMarker.lat = loc.latitude;
this.userMarker.lng = loc.longitude;
this.map.addMarkers([this.userMarker]);
}
Run Code Online (Sandbox Code Playgroud) 我正在尝试在适用于 iOS 和 Android 的NativeScript + Angular应用程序上使用图标。我尝试了不同的方式来设置图标,我使用了本教程,这个解决方案,我什至尝试使用材质插件和nativescript-ngx-fonticon。
所有这些方法都会给我这个错误:
插件 nativescript-fontawesome 不包含在设备 [device-id] 上的预览应用程序中,并且无法工作。
现在,这是我当前的代码:
我的组件.组件.html
<Button text="" class="fa" column="0"></Button>
应用程序.css
.fa {
font-family: 'FontAwesome', fontawesome-webfont;
}
Run Code Online (Sandbox Code Playgroud)
此外,我的app/fonts文件夹中有以下文件:
fontawesome-webfont.ttf
那么,出了什么问题呢?
谢谢
nativescript angular2-nativescript nativescript-angular angular nativescript-plugin
TNSFancyAlert.showSuccess(
"Success!",
"Fancy alerts are nice.",
"Yes they are!",
)
.then(() => {
console.log("success")
}).catch(err => {
console.log(err)
})
Run Code Online (Sandbox Code Playgroud)
错误响应是:[TypeError:cn.refactor.lib.colordialog.PromptDialog不是构造函数]
来自:https : //github.com/NathanWalker/nativescript-fancyalert
我做错什么了吗?
为了让我的NativeScript应用程序读取iOS上的联系人,我遇到了麻烦.我正在使用库nativescript-contacts来读取地址簿的所有条目和名为nativescript-permission的条目,以便询问用户是否有权阅读联系人.不幸的是,后者似乎只适用于Android,其中一切正常:出现弹出窗口要求用户允许阅读联系人,如果授予权限,则联系人显示在列表中.在iOS中,我无法请求联系人权限:没有弹出对话框,当我尝试使用nativescript-contacts的函数(例如getAllContacts())时,应用程序会冻结.
我试过搜索,但我唯一可以做的似乎是使用一些本机代码来获得这些权限......但我不知道如何.你可以帮我吗?
谢谢!
contacts user-permissions ios nativescript nativescript-plugin
在iOS中,当我放置marker和mapView位置时,地图不会居中显示,但是如果我将手机移至横向并再次旋转至纵向,则地图中心将显示正常。在Adnroid工作正常。
您可以在以下github问题中获得更多信息:https : //github.com/dapriett/nativescript-google-maps-sdk/issues/322
nativescript angular2-nativescript nativescript-telerik-ui nativescript-angular nativescript-plugin