我在通过 Nativescript 在我的 iPhone 上构建运行应用程序(尤其是 HelloWorld 模板)时遇到问题。Android 构建/运行完美无缺,但让 iOS 对应物运行却是一场噩梦。作为背景,我正在运行最新版本的 macOS (High Sierra) 和最新版本的 XCode。问题是每当我尝试构建时,我都被告知 XCode 8 需要一个 teamid(请注意我也在使用 XCode 9)。然后构建崩溃并产生下面列出的输出。我看到人们讨论手动将他们的 teamid 插入到配置文件中,但是由于我没有注册开发人员计划,所以我没有 teamid。我是否必须注册 99 美元的计划才能在我的设备上运行某些东西?我确实在 XCode 中设置了开发证书,并且尝试在 Sidekick 中执行临时配置文件,但无论如何我仍然收到此错误。此外,有些人建议打开实际的应用程序 XCode 项目,但是我什至无法打开它,因为一旦单击它就会立即使 XCode 崩溃。这里可能是什么问题?为什么不像 Android 构建/运行过程那么简单?此外,模拟器也不能正常工作,它会给出自己的错误消息主机,但由于我的计算机硬件使模拟器非常慢且不可靠,因此这不是一个好主意。因此,在我的设备上运行,比如 Android,效果最好。输出如下:有些人建议打开实际的应用程序 XCode 项目,但是我什至无法打开它,因为一旦单击它就会立即使 XCode 崩溃。这里可能是什么问题?为什么不像 Android 构建/运行过程那么简单?此外,模拟器也不能正常工作,它会给出自己的错误消息主机,但由于我的计算机硬件使模拟器非常慢且不可靠,因此这不是一个好主意。因此,在我的设备上运行,比如 Android,效果最好。输出如下:有些人建议打开实际的应用程序 XCode 项目,但是我什至无法打开它,因为一旦单击它就会立即使 XCode 崩溃。这里可能是什么问题?为什么不像 Android 构建/运行过程那么简单?此外,模拟器也不能正常工作,它会给出自己的错误消息主机,但由于我的计算机硬件使模拟器非常慢且不可靠,因此这不是一个好主意。因此,在我的设备上运行,比如 Android,效果最好。输出如下:然而,这并不是一个好主意,因为我的计算机硬件使模拟器非常缓慢且不可靠。因此,在我的设备上运行,比如 Android,效果最好。输出如下:然而,这并不是一个好主意,因为我的计算机硬件使模拟器非常缓慢且不可靠。因此,在我的设备上运行,比如 Android,效果最好。输出如下:
jslarosmbp:HelloWorld Js$ tns run ios
Searching for devices...
Preparing project...
Project successfully prepared (iOS)
Building project...
Xcode 8 requires a team id to be specified when building for device.
You can specify the team id by setting the DEVELOPMENT_TEAM setting in build.xcconfig file located in App_Resources folder of your app, or by using the --teamId option when calling run, debug or livesync commands.
Xcode build...
2017-12-18 11:56:20.660 xcodebuild[3263:131976] [MT] DVTAssertions: ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-13756/Xcode3Core/LegacyProjects/Frameworks/DevToolsCore/DevToolsCore/RuntimeSupport/MacroExpansion/XCMacroExpansionExtensions.mm:94
Details: Assertion failed: [value isKindOfClass:[NSString class]] || [value isKindOfClass:[NSArray class]]
Object: <DVTMacroDefinitionTable: 0x7fbf626a0a70>
Method: -_xc_setValue:forMacroName:conditionSet:errorHandler:
Thread: <NSThread: 0x7fbf60d175e0>{number = 1, name = main}
Hints:
Backtrace:
0 -[DVTAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in DVTFoundation)
1 _DVTAssertionHandler (in DVTFoundation)
2 _DVTAssertionFailureHandler (in DVTFoundation)
3 _DVTAssertionFailureHandler (in DVTFoundation)
4 -[DVTMacroDefinitionTable(XCMacroExpansionExtensions) _xc_setValue:forMacroName:conditionSet:errorHandler:] (in DevToolsCore)
5 -[DVTMacroDefinitionTable(XCMacroExpansionExtensions) _xc_setValue:forMacroName:errorHandler:] (in DevToolsCore)
6 __108-[DVTMacroDefinitionTable(XCMacroExpansionExtensions) xc_setMacroNamesAndValuesFromDictionary:errorHandler:]_block_invoke (in DevToolsCore)
7 -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] (in CoreFoundation)
8 -[DVTMacroDefinitionTable(XCMacroExpansionExtensions) xc_setMacroNamesAndValuesFromDictionary:errorHandler:] (in DevToolsCore)
9 +[DVTMacroDefinitionTable(XCProjectArchivingExtensions) xc_macroDefinitionTableFromDictionaryRepresentationForProjectArchiving:usingPropertyDefinitionsFromSpecificationDomain:] (in DevToolsCore)
10 -[PBXBuildStyle _setBuildSettings:] (in DevToolsCore)
11 -[PBXUnarchivingBinding readValueForObject:fromPListUnarchiver:] (in DevToolsCore)
12 -[PBXObject _unarchiveValuesForArchiveMask:fromPListUnarchiver:] (in DevToolsCore)
13 -[PBXObject readFromPListUnarchiver:] (in DevToolsCore)
14 -[PBXBuildStyle readFromPListUnarchiver:] (in DevToolsCore)
15 -[PBXPListUnarchiver _unarchiveObjectWithGlobalIDHexString:] (in DevToolsCore)
16 -[PBXPListUnarchiver _decodeMutableObjectArrayFromPListArray:] (in DevToolsCore)
17 -[PBXPListUnarchiver decodeMutableObjectArrayForKey:] (in DevToolsCore)
18 -[PBXUnarchivingBinding readValueForObject:fromPListUnarchiver:] (in DevToolsCore)
19 -[PBXObject _unarchiveValuesForArchiveMask:fromPListUnarchiver:] (in DevToolsCore)
20 -[PBXObject readFromPListUnarchiver:] (in DevToolsCore)
21 -[PBXPListUnarchiver _unarchiveObjectWithGlobalIDHexString:] (in DevToolsCore)
22 -[PBXPListUnarchiver decodeObjectForKey:] (in DevToolsCore)
23 -[PBXUnarchivingBinding readValueForObject:fromPListUnarchiver:] (in DevToolsCore)
24 -[PBXObject _unarchiveValuesForArchiveMask:fromPListUnarchiver:] (in DevToolsCore)
25 -[PBXObject readFromPListUnarchiver:] (in DevToolsCore)
26 -[PBXPListUnarchiver _unarchiveObjectWithGlobalIDHexString:] (in DevToolsCore)
27 -[PBXPListUnarchiver _decodeMutableObjectArrayFromPListArray:] (in DevToolsCore)
28 -[PBXPListUnarchiver decodeMutableObjectArrayForKey:] (in DevToolsCore)
29 -[PBXUnarchivingBinding readValueForObject:fromPListUnarchiver:] (in DevToolsCore)
30 -[PBXObject _unarchiveValuesForArchiveMask:fromPListUnarchiver:] (in DevToolsCore)
31 -[PBXObject readFromPListUnarchiver:] (in DevToolsCore)
32 -[PBXProject readFromPListUnarchiver:] (in DevToolsCore)
33 -[PBXPListUnarchiver _unarchiveObjectWithGlobalIDHexString:] (in DevToolsCore)
34 -[PBXPListUnarchiver decodeRootObject] (in DevToolsCore)
35 +[PBXProject projectWithFile:errorHandler:readOnly:] (in DevToolsCore)
36 -[Xcode3Project initWithFilePath:extension:workspace:options:error:] (in DevToolsCore)
37 __82+[IDEContainer _retainedContainerAtFilePath:fileDataType:workspace:options:error:]_block_invoke_2 (in IDEFoundation)
38 _dispatch_client_callout (in libdispatch.dylib)
39 _dispatch_queue_barrier_sync_invoke_and_complete (in libdispatch.dylib)
40 DVTDispatchBarrierSync (in DVTFoundation)
41 -[DVTDispatchLock performLockedBlock:] (in DVTFoundation)
42 __82+[IDEContainer _retainedContainerAtFilePath:fileDataType:workspace:options:error:]_block_invoke (in IDEFoundation)
43 __58-[DVTModelObjectGraph performBlockCoalescingModelChanges:]_block_invoke (in DVTFoundation)
44 -[DVTModelGraphTransactionScope performTransaction:] (in DVTFoundation)
45 -[DVTModelObjectGraph performBlockCoalescingModelChanges:] (in DVTFoundation)
46 +[IDEContainer _retainedContainerAtFilePath:fileDataType:workspace:options:error:] (in IDEFoundation)
47 +[IDEContainer retainedContainerAtFilePath:fileDataType:workspace:error:] (in IDEFoundation)
48 -[IDEWorkspace _configureWrappedWorkspaceWithError:] (in IDEFoundation)
49 __82+[IDEContainer _retainedContainerAtFilePath:fileDataType:workspace:options:error:]_block_invoke (in IDEFoundation)
50 +[IDEContainer _retainedContainerAtFilePath:fileDataType:workspace:options:error:] (in IDEFoundation)
51 +[IDEContainer retainedWrappedWorkspaceForContainerAtFilePath:fileDataType:error:] (in IDEFoundation)
52 -[Xcode3CommandLineBuildTool _resolveInputOptionsWithTimingSection:] (in Xcode3Core)
53 -[Xcode3CommandLineBuildTool run] (in Xcode3Core)
54 0x000000010621c2af (in xcodebuild)
55 start (in libdyld.dylib)
Unable to apply changes on device: 5d3917082e289838a5b920f9c2xxf5c1f7804149. Error is: Command xcodebuild failed with exit code null.
任何可以详细建议的内容将不胜感激。谢谢!