我有一个离子应用程序,我正在尝试运行它:
ionic cordova build ios
Run Code Online (Sandbox Code Playgroud)
编译成功,但在它成功之前我看到了这些错误:
RegisterExecutionPolicyException /Users/moblizeit/Library/Developer/Xcode/DerivedData/Scan_Buddy-bgqkrrwvotqcxbgakwtfvdcnmkvx/Build/Intermediates.noindex/ArchiveIntermediates/Scan\ Buddy/InstallationBuildProductsLocation/Applications/Scan\ Buddy.app (in target 'Scan Buddy' from project 'Scan Buddy')
cd /Users/moblizeit/code-repo/apps/business-card-scanner/businesscardscanner/platforms/ios
builtin-RegisterExecutionPolicyException /Users/moblizeit/Library/Developer/Xcode/DerivedData/Scan_Buddy-bgqkrrwvotqcxbgakwtfvdcnmkvx/Build/Intermediates.noindex/ArchiveIntermediates/Scan\ Buddy/InstallationBuildProductsLocation/Applications/Scan\ Buddy.app
note: Execution policy exception registration failed and was skipped: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted" (in target 'Scan Buddy' from project 'Scan Buddy')
Run Code Online (Sandbox Code Playgroud)
关于什么是失败以及如何解决它的任何想法?
升级到xcode 10.2之后,我的ios版ionic停止使用以下命令构建
离子cordova build ios---buildFlag =“-UseModernBuildSystem = 0”
我试图升级cordova-ios@5.0.0并删除并阅读ios平台,但没有运气。
The “Swift Language Version” (SWIFT_VERSION) build setting must be set to a supported value for targets which use Swift. Supported values are: 4.0, 4.2, 5.0. This setting can be set in the build settings editor.
Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 12.2'
** ARCHIVE FAILED **
The following build commands failed:
Check dependencies
(1 failure)
xcodebuild: Command failed with exit code 65
[ERROR] …Run Code Online (Sandbox Code Playgroud) 我已经构建了这个应用程序https://cvirus.app并在浏览器上构建和部署。
在 android 手机上的 chrome 浏览器上,它呈现深色背景(因为默认情况下应用了深色主题)。
无论什么设备什么浏览器,我都想在任何地方强制使用浅色主题。我怎么做?
在 theme/variables.scss 中评论深色端口不起作用
我正在使用有角度的材料,但在主题化方面有点迷失。我正在使用我的styles.scss 中包含的预构建的靛蓝色粉红色主题,如下所示
@import "~@angular/material/prebuilt-themes/indigo-pink.css";
Run Code Online (Sandbox Code Playgroud)
根据文档,我创建了一个名为 theme.scss 的新文件,并将其包含在 angular.json 之后的 style.scss 中。theme.scss 如下所示
@import '~@angular/material/theming';
@include mat-core();
$sg-app-primary: mat-palette($mat-indigo);
$sg-app-accent: mat-palette($mat-pink, A200, A100, A400);
$sg-app-theme: mat-light-theme($sg-app-primary, $sg-app-accent);
@include angular-material-theme($sg-app-theme);
Run Code Online (Sandbox Code Playgroud)
我的要求 我只需要在所有地方将默认字体颜色更改为白色而不是黑色。我根本不需要改变任何其他东西。我只是从示例中复制了主要和重音调色板。所以感觉即使他们不需要改变。
我正在关注https://help.twitter.com/en/using-twitter/embed-twitter-feed在角度页面中嵌入时间线。只有按钮呈现,而不是实际的时间线。
该index.html的样子:
<body style="margin:0">
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<app-root></app-root>
</body>
Run Code Online (Sandbox Code Playgroud)
app.component.html如下所示:
<a class="twitter-timeline"
href="https://twitter.com/TwitterDev/lists/national-parks?ref_src=twsrc%5Etfw">
A Twitter List by TwitterDev
</a>
Run Code Online (Sandbox Code Playgroud)
还尝试了app.component.ts 之类的东西:
ngOnInit(){
if ((<any>window).twttr.ready())
(<any>window).twttr.widgets.load();
}
Run Code Online (Sandbox Code Playgroud)
但没有运气
node.js single-page-application typescript ecmascript-6 angular
我希望存储一些儿童活动的数据,其中每个活动都适合特定年龄范围。假设 A 幕适合 2 - 5 岁的孩子。行为 B 适合 0 -1 岁。
在客户端,有一组固定的选择,例如:0 - 1 年、1 - 3 年、4 - 5 年、6 - 13 年
现在的要求是活动 A 应该出现在选择 1 - 3 和 4 -5 年中,因为 2 - 5 与这两个范围重叠。
存储活动数据然后有效地查询它的好方法是什么?
我正在尝试为我的离子应用程序使用 Angular 12 和 Firebase 最新的模块化 SDK。我正在使用实时数据库,很难找到我需要在数据处理部分进行的更改。
下面是我的新 app.module.ts
import { AngularFireModule } from '@angular/fire/compat';
import { AngularFireDatabaseModule, AngularFireDatabase } from '@angular/fire/compat/database';
imports: [
AngularFireModule.initializeApp(firebaseConfig),
AngularFireDatabaseModule,
]
Run Code Online (Sandbox Code Playgroud)
数据服务文件如下所示
import { AngularFireDatabase } from '@angular/fire/compat/database';
constructor(public db: AngularFireDatabase) { }
getVendor(){
return new Promise((resolve, reject) =>
{
this.db.object("config").valueChanges().subscribe(
(res) => {
//console.log(res);
resolve(res)},
(err) => {
console.log("hitting error:" + err); reject(err)
}
)
})
}
Run Code Online (Sandbox Code Playgroud)
但是,在运行时我看到以下错误
[error] - ERROR {"name":"NullInjectorError","ngTempTokenPath":null,"ngTokenPath":["CoreService","SBDataService","AngularFireDatabase","InjectionToken angularfire2.app.options","InjectionToken angularfire2.app.options","InjectionToken angularfire2.app.options"]}
Run Code Online (Sandbox Code Playgroud)
我的 package.json 是
{
"name": "xxx",
"scripts": { …Run Code Online (Sandbox Code Playgroud) firebase ionic-framework firebase-realtime-database angularfire2 angular
我正在使用 Observable 数组来获取实时数据。数据按升序排列,但我需要它以相反的顺序显示。互联网上的示例是 Angular 5 之前的,语法不再有效。请指教
html
<tr *ngFor="let card of cards | async;let last = last ">
<td> <img [src]="card.frontImageUrl" width=200 height="100"></td>
</td>
refreshCards(){
this.cards = this.dataSvc.fetchCards().pipe(
map((cards: any) => cards.map(cardObj => new Card(cardObj.key, cardObj._frontImageUrl, cardObj._backImageUrl, cardObj._status, cardObj._date, cardObj._userId, cardObj._message)))
);
}
Run Code Online (Sandbox Code Playgroud)
调用firedb
fetchCards(){
this.cardList = this.db.list<Card>('adminCardQueue', ref => ref.orderByChild('_date').limitToLast(50))
return this.cardList.snapshotChanges().pipe(
map(changes =>
changes.map(c => ({ key: c.payload.key, ...c.payload.val()}))
)
) ;
}
Run Code Online (Sandbox Code Playgroud) 我创建了一个圆环图
public doughnutChartPlugins: PluginServiceGlobalRegistrationAndOptions[] = [{
beforeDraw(chart:any) {
const ctx = chart.ctx;
const txt = 'Center Text';
//Get options from the center object in options
const sidePadding = 60;
const sidePaddingCalculated = (sidePadding / 100) * (chart.innerRadius * 2)
ctx.textAlign = 'center';
ctx.textBaseline = 'middle';
const centerX = ((chart.chartArea.left + chart.chartArea.right) / 2);
const centerY = ((chart.chartArea.top + chart.chartArea.bottom) / 2);
//Get the width of the string and also the width of the element minus 10 to give it 5px …Run Code Online (Sandbox Code Playgroud) 我有一个大型的 Firebase 实时数据库数据文件。现在,当我去控制台时,它提到它在我选择钥匙之前是只读的。现在,我需要通过控制台手动向实时数据库添加一个新节点。除了编写代码或下载所有数据之外,我该怎么做。
试图去控制台并检查它似乎不可能
我们正在使用 ms 团队和 ms 机器人构建产品集成。我们已经与 Slack 进行了现有的集成。在 slack World 中,我们通过 TEAM_ID 和 USER_ID 识别唯一用户。在 Teams 的情况下,我什至可以看到 from 节点中的 id 是一个很长的字符串,表明它是唯一的。以下有效负载是进入我们服务器的一个示例。有人可以确认使用来自 from 节点的 id 是否不会改变特定用户吗?
假设对以下用户不感兴趣的用户 ID 是“29:1374Bmi6ngJLBlF9oGVcDuTaBbMfJmcOF9eUvQVdx_rgYh5spPNQ5Mi6fLdVvCiT7mQPMNytT0zGk_iAUtvqKAwXXXX”
{
"_activity": {
"id": "1576102076169",
"from": {
"id": "29:1374Bmi6ngJLBlF9oGVcDuTaBbMfJmcOF9eUvQVdx_rgYh5spPNQ5Mi6fLdVvCiT7mQPMNytT0zGk_iAUtvqKAwXXXX",
"name": "My Name",
"aadObjectId": "37a2516a-baf2-41d8-a406-a067888d676c"
},
"conversation": {
"conversationType": "personal",
"tenantId": "9bfb3569-994e-4908-855c-c7f6c1a94100",
"id": "a:1DcGjCAgiuinvuzR0Mx6dR9uJOB3YUwjMdLOiGTAwQ7KWSGsiEijNfvir66ep7k0fABwoSXxCAACx2_3GflfTNIZL7XMkfjrMm0v8OzJJ7vvIFKasqrClrZ_T-8dDfdT0"
},
"channelData": {
"tenant": {
"id": "9bfb3569-994e-4908-855c-c7f6c1a94100"
}
},
"text": "contact mat",
"textFormat": "plain",
"type": "message",
"channelId": "msteams",
"serviceUrl": "https://smba.trafficmanager.net/amer/",
"recipient": {
"id": "28:a835cf1d-83a8-4ae9-845a-23a68a1df442",
"name": "FlashCX.ai"
}
}
}
Run Code Online (Sandbox Code Playgroud) angular ×4
firebase ×4
angularfire2 ×2
ios ×2
botframework ×1
cordova ×1
cordova-ios ×1
css ×1
ecmascript-6 ×1
ionic4 ×1
ionic5 ×1
ng2-charts ×1
node.js ×1
typescript ×1