在我运行Snow Leopard的旧Mac上,我可以将"ios"输入聚光灯下,它会自动启动iPhone/iPad模拟器.
我必须得到一台运行Lion的新机器.我已经为Lion安装了Xcode,我已经从首选项面板安装了开发人员工具选项.
但是"ios"选项不再存在:(现在唯一的办法似乎是运行Xcode,创建一个空项目,然后使用run选项启动模拟器.
我搜索并搜索了intertubes和facewebs,但没有任何帮助.
有谁知道如何在Lion上只运行模拟器?
更新:这是对@ike_love线程的回应.答案无法保证在所有Yosemite机器上工作.
我在添加 3rd 方框架后尝试构建一个项目,但是在添加框架后我无法编译该项目,我收到架构 arm64 的未定义符号:尝试在设备上编译时出错,但我可以在模拟器上编译. 我已经尝试了在 stackoverflow 上找到的所有其他解决方案。任何帮助表示赞赏!
这是我尝试过的:
我尝试过的所有解决方案都不适合我。
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_*", referenced from:
objc-class-ref in frameworkName.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Run Code Online (Sandbox Code Playgroud) 我已经设置了一个堆栈闪电弹,并基本显示了问题所在。
基本上,当我尝试在包含MatChipList的MatFormField上触发事件时,出现了以下错误
Cannot read property 'stateChanges' of undefined at MatChipInput._onInput
Run Code Online (Sandbox Code Playgroud)
我尝试用MatInput的替代模拟覆盖MatChip模块。我也尝试覆盖该指令。
有人有智慧的话吗?
谢谢
的HTML
<h1>Welcome to app!!</h1>
<div>
<mat-form-field>
<mat-chip-list #chipList>
<mat-chip *ngFor="let contrib of contributors; let idx=index;" [removable]="removable" (removed)="removeContributor(idx)">
{{contrib.fullName}}
</mat-chip>
<input id="contributor-input"
placeholder="contributor-input"
#contributorInput
[formControl]="contributorCtrl"
[matAutocomplete]="auto"
[matChipInputFor]="chipList"
[matChipInputSeparatorKeyCodes]="separatorKeysCodes"
[matChipInputAddOnBlur]="addOnBlur">
</mat-chip-list>
</mat-form-field>
</div>
Run Code Online (Sandbox Code Playgroud)
TS
import { Component, Input } from '@angular/core';
import { COMMA, ENTER } from '@angular/cdk/keycodes';
import { FormControl } from '@angular/forms';
import { Observable } from 'rxjs';
import { map, startWith } from 'rxjs/operators'; …Run Code Online (Sandbox Code Playgroud) 我正在尝试测试登录组件。我可以模拟除字符串变量之外的所有内容。这该怎么做?
@Component({
selector: 'app-login',
templateUrl: './login.component.html',
styleUrls: ['./login.component.scss'])
export class LoginComponent {
username: string;
password: string;
loginSpinner: boolean;
constructor(public authService: AuthService, public router: Router) {
}
login() {
this.loginSpinner = true;
this.authService.login(this.username, this.password).subscribe(() => {
this.loginSpinner = false;
if (this.authService.isLoggedIn) {
// Get the redirect URL from our auth service
// If no redirect has been set, use the default
const redirect = this.authService.redirectUrl ? this.authService.redirectUrl : '/';
// Redirect the user
this.router.navigate([redirect]);
}
}, () => {
// also …Run Code Online (Sandbox Code Playgroud) angular ×2
jasmine ×2
ios ×1
osx-lion ×1
swift ×1
typescript ×1
unit-testing ×1
xcode ×1
xcode12 ×1