Posts

Post not yet marked as solved
0 Replies
189 Views
Hi, I'm in the team maintaining company-wise CI for iOS build and test, which runs over 100 macs on the system with every stable versions of Xcode/simulators and the latest beta/rc. I've been terribly suffered from xcodebuild test failure with simulator destination on Xcode beta series since Xcode 14.x has changed its CoreSimulator behavior from static simruntime into simdisk-based dynamic runtime. (If you search for xcrun simctl runtime match set 'watchos9.1' 20S75 you can check what I have been fighting for.) At the end of numerous nightly overtimes I finally found out that ~/Library/Developer/CoreSimulator/RuntimeMap.plist is closely related to xcrun simctl runtime match command. If CoreSimulatorService relaunches when RuntimeMap.plist is corrupted (or missing), Chosen Runtime will be set as default SDK (pretty sure it is SDK version of iphoneos, not iphonesimulator) ex) $ sudo xcode-select -s /Applications/Xcode_15.2.app $ sed -i '' -e 's|21C62|21Cblabla|' ~/Library/Developer/CoreSimulator/RuntimeMap.plist $ sudo pkill -9 com.apple.CoreSimulator.CoreSimulatorService $ xcrun simctl runtime match list == Evaluation Results == appletvos17.2: SDK Version: 17.2 SDK Build: 21K354 Platform: com.apple.platform.appletvos Chosen Runtime: tvOS 17.2 (17.2 - 21K364) - com.apple.CoreSimulator.SimRuntime.tvOS-17-2 User Override: (null) Preferred: tvOS 17.2 (17.2 - 21K364) - com.apple.CoreSimulator.SimRuntime.tvOS-17-2 Default: 21K354 iphoneos17.2: SDK Version: 17.2 SDK Build: 21C52 Platform: com.apple.platform.iphoneos Chosen Runtime: 21C52 User Override: (null) Preferred: 21Cblabla Default: 21C52 watchos10.2: SDK Version: 10.2 SDK Build: 21S355 Platform: com.apple.platform.watchos Chosen Runtime: watchOS 10.2 (10.2 - 21S364) - com.apple.CoreSimulator.SimRuntime.watchOS-10-2 User Override: (null) Preferred: watchOS 10.2 (10.2 - 21S364) - com.apple.CoreSimulator.SimRuntime.watchOS-10-2 Default: 21S355 xros1.0: SDK Version: 1.0 SDK Build: 21N301 Platform: com.apple.platform.xros Chosen Runtime: visionOS 1.0 (1.0 - 21N305) - com.apple.CoreSimulator.SimRuntime.xrOS-1-0 User Override: (null) Preferred: visionOS 1.0 (1.0 - 21N305) - com.apple.CoreSimulator.SimRuntime.xrOS-1-0 Default: 21N301 The question is: Where exactly is the path or file that reflects this change? What file is Chosen Runtime of runtime match list tracking? When is the time to re-download and fix if it is corroded or not found? P.S. Thanks valexeev4 for letting me know where RuntimeMap plist is. https://developer.apple.com/forums/thread/738077?answerId=765617022#765617022
Posted
by dokimyj.
Last updated
.
Post not yet marked as solved
0 Replies
219 Views
I'm trying some sample with xcodebuild test command for i(Pad)OS simulators, figuring out some strange behavior on simulator initiation. 00:00:38 -------------------------- 00:00:38 --- Step: xcode_select --- 00:00:38 -------------------------- 00:00:38 Setting Xcode version to /Applications/Xcode/Xcode_15.3_beta_3.app for all build steps 00:00:38 Init simulators ... 00:00:39 $DEVELOPER_DIR 00:00:39 /Applications/Xcode/Xcode_15.3_beta_3.app/Contents/Developer ... 00:05:26 ▸ 2024-02-14 15:13:41.319 xcodebuild[12903:1082819] [MT] IDELaunchReport: 4a4f919bfba30580:4a4f919bfba30580: Finished with error: Simulator device failed to install the application. 00:05:26 ▸ Domain: IXErrorDomain 00:05:26 ▸ Code: 2 00:05:26 ▸ Failure Reason: Failed to locate promise. 00:05:26 ▸ User Info: { 00:05:26 ▸ FunctionName = "+[IXPlaceholder _placeholderForBundle:client:withParent:installType:metadata:placeholderType:mayBeDeltaPackage:error:]"; 00:05:26 ▸ IDERunOperationFailingWorker = IDELaunchiPhoneSimulatorLauncher; 00:05:26 ▸ SimCallingSelector = "installApplication:withOptions:error:"; 00:05:26 ▸ SourceFileLine = 803; 00:05:26 ▸ } 00:05:26 ▸ -- 00:05:26 ▸ Failed to set icon promise for com.example.myapp 00:05:26 ▸ Domain: IXErrorDomain 00:05:26 ▸ Code: 2 00:05:26 ▸ Failure Reason: Failed to create promise. 00:05:26 ▸ User Info: { 00:05:26 ▸ FunctionName = "+[IXPlaceholder _placeholderForBundle:client:withParent:installType:metadata:placeholderType:mayBeDeltaPackage:error:]"; 00:05:26 ▸ SourceFileLine = 803; 00:05:26 ▸ } 00:05:26 ▸ -- 00:05:26 ▸ Placeholder did not exist for UUID 2810E06A-4565-4966-BE98-AE4A6A96D916 when called for -[IXSClientConnection _remote_IXSPlaceholder:setIconPromiseUUID:completion:] by client CoreSimulatorBridge (pid 13037) 00:05:26 ▸ Domain: IXErrorDomain 00:05:26 ▸ Code: 3 00:05:26 ▸ Failure Reason: Failed to locate promise. 00:05:26 ▸ User Info: { 00:05:26 ▸ FunctionName = "-[IXSClientConnection _fetchPlaceholderForUUID:method:andRunWithPromise:error:]"; 00:05:26 ▸ SourceFileLine = 1945; 00:05:26 ▸ } 00:05:26 ▸ -- 00:05:26 ▸ 2024-02-14 15:13:41.323 xcodebuild[12903:1082819] [MT] IDELaunchReport: 4a4f919bfba30580:4a4f919bfba30580: com.apple.dt.IDERunOperationWorkerFinished { 00:05:26 ▸ "device_model" = "iPhone14,7"; 00:05:26 ▸ "device_osBuild" = "16.4 (20E247)"; 00:05:26 ▸ "device_platform" = "com.apple.platform.iphonesimulator"; 00:05:26 ▸ "dvt_coredevice_version" = "355.23"; 00:05:26 ▸ "dvt_mobiledevice_version" = "1643.100.52"; 00:05:26 ▸ "launchSession_schemeCommand" = Test; 00:05:26 ▸ "launchSession_state" = 1; 00:05:26 ▸ "launchSession_targetArch" = arm64; 00:05:26 ▸ "operation_duration_ms" = 108400; 00:05:26 ▸ "operation_errorCode" = 2; 00:05:26 ▸ "operation_errorDomain" = IXErrorDomain; 00:05:26 ▸ "operation_errorWorker" = IDELaunchiPhoneSimulatorLauncher; 00:05:26 ▸ "operation_name" = IDERunOperationWorkerGroup; 00:05:26 ▸ "param_debugger_attachToExtensions" = 0; 00:05:26 ▸ "param_debugger_attachToXPC" = 0; 00:05:26 ▸ "param_debugger_type" = 1; 00:05:26 ▸ "param_destination_isProxy" = 0; 00:05:26 ▸ "param_destination_platform" = "com.apple.platform.iphonesimulator"; 00:05:26 ▸ "param_diag_MainThreadChecker_stopOnIssue" = 0; 00:05:26 ▸ "param_diag_MallocStackLogging_enableDuringAttach" = 0; 00:05:26 ▸ "param_diag_MallocStackLogging_enableForXPC" = 0; 00:05:26 ▸ "param_diag_allowLocationSimulation" = 1; 00:05:26 ▸ "param_diag_checker_tpc_enable" = 0; 00:05:26 ▸ "param_diag_gpu_frameCapture_enable" = 3; 00:05:26 ▸ "param_diag_gpu_shaderValidation_enable" = 0; 00:05:26 ▸ "param_diag_gpu_validation_enable" = 1; 00:05:26 ▸ "param_diag_memoryGraphOnResourceException" = 0; 00:05:26 ▸ "param_diag_queueDebugging_enable" = 1; 00:05:26 ▸ "param_diag_runtimeProfile_generate" = 1; 00:05:26 ▸ "param_diag_sanitizer_asan_enable" = 0; 00:05:26 ▸ "param_diag_sanitizer_tsan_enable" = 0; 00:05:26 ▸ "param_diag_sanitizer_tsan_stopOnIssue" = 0; 00:05:26 ▸ "param_diag_sanitizer_ubsan_stopOnIssue" = 0; 00:05:26 ▸ "param_diag_showNonLocalizedStrings" = 0; 00:05:26 ▸ "param_diag_viewDebugging_enabled" = 0; 00:05:26 ▸ "param_diag_viewDebugging_insertDylibOnLaunch" = 0; 00:05:26 ▸ "param_install_style" = 2; 00:05:26 ▸ "param_launcher_UID" = 2; 00:05:26 ▸ "param_launcher_allowDeviceSensorReplayData" = 0; 00:05:26 ▸ "param_launcher_kind" = 0; 00:05:26 ▸ "param_launcher_style" = 0; 00:05:26 ▸ "param_launcher_substyle" = 0; 00:05:26 ▸ "param_runnable_appExtensionHostRunMode" = 0; 00:05:26 ▸ "param_runnable_productType" = "com.apple.product-type.application"; 00:05:26 ▸ "param_structuredConsoleMode" = 0; 00:05:26 ▸ "param_testing_launchedForTesting" = 1; 00:05:26 ▸ "param_testing_suppressSimulatorApp" = 1; 00:05:26 ▸ "param_testing_usingCLI" = 0; 00:05:26 ▸ "sdk_canonicalName" = "iphonesimulator17.4"; 00:05:26 ▸ "sdk_osVersion" = "17.4"; 00:05:26 ▸ "sdk_variant" = iphonesimulator; 00:05:26 ▸ } When I choose iPad 10th Generation, iPhone 14, 14 plus, 14 pro or 14 pro max devices listed on xcrun simctl list it fails with the log above. (doesn't matter what OS version is selected) Other than those sims it works (I checked it on iPhone SE 3rd gen, ipad mini 6g) Are those devices excluded from Xcode 15.3 Beta 3? Then why are those on the xcrun simctl list still? FYI: myapp took -Wl and -ld_classic for OTHER_LDFLAGS option in xcconfig after first app installation crash, still didn't make any changes.
Posted
by dokimyj.
Last updated
.
Post not yet marked as solved
1 Replies
482 Views
Hello, Previously I posted simulator 9.1 runtime not found although it is installed in the system. (https://developer.apple.com/forums/thread/723603) I found out there is a command xcrun simctl runtime match set to designate simulator runtime for current Xcode. I also figured out the fact that watchos 9.1 simulator runtimes for Xcode 14.1 and 14.2 always indicate 20S71, which is patched to 20S75 for now. (We can check downloadable simulators list from https://devimages-cdn.apple.com/downloads/xcode/simulators/index2.dvtdownloadableindex ) $ sudo xcode-select -s /Applications/Xcode/Xcode_14.1.app $ xcrun simctl runtime match list == Evaluation Results == appletvos16.1: SDK Version: 16.1 SDK Build: 20K67 Platform: com.apple.platform.appletvos Chosen Runtime: tvOS 16.1 (16.1 - 20K67) - com.apple.CoreSimulator.SimRuntime.tvOS-16-1 User Override: (null) Preferred: (null) Default: tvOS 16.1 (16.1 - 20K67) - com.apple.CoreSimulator.SimRuntime.tvOS-16-1 iphoneos16.1: SDK Version: 16.1 SDK Build: 20B71 Platform: com.apple.platform.iphoneos Chosen Runtime: iOS 16.1 (16.1 - 20B72) - com.apple.CoreSimulator.SimRuntime.iOS-16-1 User Override: (null) Preferred: (null) Default: iOS 16.1 (16.1 - 20B72) - com.apple.CoreSimulator.SimRuntime.iOS-16-1 watchos9.1: SDK Version: 9.1 SDK Build: 20S71 Platform: com.apple.platform.watchos Chosen Runtime: 20S71 User Override: (null) Preferred: (null) Default: 20S71 $ xcode-select -p /Applications/Xcode/Xcode_14.2.app/Contents/Developer $ xcrun simctl runtime match list == Evaluation Results == appletvos16.1: SDK Version: 16.1 SDK Build: 20K67 Platform: com.apple.platform.appletvos Chosen Runtime: tvOS 16.1 (16.1 - 20K67) - com.apple.CoreSimulator.SimRuntime.tvOS-16-1 User Override: (null) Preferred: (null) Default: tvOS 16.1 (16.1 - 20K67) - com.apple.CoreSimulator.SimRuntime.tvOS-16-1 iphoneos16.2: SDK Version: 16.2 SDK Build: 20C52 Platform: com.apple.platform.iphoneos Chosen Runtime: iOS 16.2 (16.2 - 20C52) - com.apple.CoreSimulator.SimRuntime.iOS-16-2 User Override: (null) Preferred: (null) Default: iOS 16.2 (16.2 - 20C52) - com.apple.CoreSimulator.SimRuntime.iOS-16-2 watchos9.1: SDK Version: 9.1 SDK Build: 20S71 Platform: com.apple.platform.watchos Chosen Runtime: 20S71 User Override: (null) Preferred: (null) Default: 20S71 $ xcode-select -p /Applications/Xcode/Xcode_14.3.1_Release_Candidate.app/Contents/Developer $ xcrun simctl runtime match list == Evaluation Results == appletvos16.4: SDK Version: 16.4 SDK Build: 20L489 Platform: com.apple.platform.appletvos Chosen Runtime: 20L489 User Override: (null) Preferred: (null) Default: 20L489 iphoneos16.4: SDK Version: 16.4 SDK Build: 20E238 Platform: com.apple.platform.iphoneos Chosen Runtime: iOS 16.4 (16.4 - 20E247) - com.apple.CoreSimulator.SimRuntime.iOS-16-4 User Override: (null) Preferred: (null) Default: iOS 16.4 (16.4 - 20E247) - com.apple.CoreSimulator.SimRuntime.iOS-16-4 watchos9.4: SDK Version: 9.4 SDK Build: 20T248 Platform: com.apple.platform.watchos Chosen Runtime: 20T248 User Override: (null) Preferred: (null) Default: 20T248 and I assume that the problem I suffered from (watchOS 9.1 not installed error but simulators and runtime already installed in Mac) is recurring because the watchOS runtime for Xcode 14.1/14.2 is frequently returned to default when reset or switch to other versions of Xcode, even though the user forced to choose a certain SDK version. What I want to know is: What file does contain the data of xcrun simctl runtime match list ? Where is it? Is there any reason or factor for runtime to be set to default? I am in the team running macOS as CI server. Can I use watchOS 9.x Simulator runtimes while using Xcode 14.2, other than 9.1? Thanks in advance.
Posted
by dokimyj.
Last updated
.
Post not yet marked as solved
1 Replies
765 Views
I'm using multiple versions of Xcodes in mac, and tried installing new Xcode Beta. Installing Xcode itself was successful with shorter time taken, but the problem emerged when trying to install simulators with sudo Xcode-beta.app/Contents/Developer/usr/bin/xcodebuild -downloadAllPlatforms command. If Xcode-beta.app is in $HOME/Downloads, simulator images are smoothly downloaded and installed. If Xcode-beta.app is not in $HOME/Downloads, it hangs forever with Finding Content... message when sudo Xcode-beta.app/Contents/Developer/usr/bin/xcodebuild -downloadAllPlatforms command was executed. Is this expected behavior for xcodebuild -downloadAllPlatforms of Xcode 15 Beta? Should I stop changing the download path other than $HOME/Downloads?
Posted
by dokimyj.
Last updated
.
Post not yet marked as solved
7 Replies
2.6k Views
Hi, I am working for the iOS CI build environment dev/maint. Since Xcode 14.2 has released, our CI users started claiming that their builds often fail because watchOS 9.1 simulators are not found. ex1) xcodebuild: error: Failed to build workspace YWeatherApp with scheme YWeatherApp. Reason: This scheme builds an embedded Apple Watch app. watchOS 9.1 must be installed in order to archive the scheme Recovery suggestion: watchOS 9.1 is not installed. To use with Xcode, first download and install the platform ex2) xcodebuild: error: Unable to find a destination matching the provided destination specifier: { platform:watchOS Simulator, id:CF9011C4-9FD7-40F3-A2A9-46B8D593B2FD } Ineligible destinations for the "Swinject-watchOS" scheme: { platform:watchOS, id:dvtdevice-DVTiOSDevicePlaceholder-watchos:placeholder, name:Any watchOS Device, error:watchOS 9.1 is not installed. To use with Xcode, first download and install the platform } But when I execute simctl list command to see if there is watchOS 9.1 simruntime and simulator devices, sometimes it shows as available but sometimes it doesn't. the result of xcrun simctl list when watchOS 9.1 simulators are unavailable the result of xcrun simctl list when watchOS 9.1 simulators are available Same machine (Mac mini Intel Late 2018), 30 minutes term between command executions. What is weird when error: the runtime profile of watchOS 9.1 apparently exist at the top, but the devices of watchOS 9.1 shows on and off as available... and the reason of unavailability is: (unavailable, runtime profile not found). What we do for Xcode 14.x installation with watchOS/tvOS simulators is: sudo xcodebuild -runFirstLaunch and sudo xcodebuild -downloadAllPlatforms after each installation of Xcode 14.x. What we do after each build job ends is: pkill -9 Simulator, pkill update_dyld_sim_shared_cache, pkill -9 update_dyld_sim_shared_cache and launchctl remove com.apple.CoreSimulator.CoreSimulatorService if the simulator process still exists in ps aux list. What I know now as Xcode 14 issue is what is written in the Xcode 14 Known issues for the simulator but Cleanse all simruntimes, Reboot mac and Reinstall the simulators to use could not be the answer this time because we are running over 60 macs in the system and there are 40 more macs incoming, avg 2000 builds per day. Is there anything wrong what we are doing in the operations? and would there be any alternative solutions or suggestions for this situation? Thanks in advance.
Posted
by dokimyj.
Last updated
.
Post not yet marked as solved
0 Replies
671 Views
Hi all There is an issue with uploading .ipa to Testflight from companywise CI since last Thursday. Suddenly we got a problem uploading .ipa file to Testflight without notice, due to company firewall policy. This never happened before, and what we got from the error log was this: Could not connect to Aspera server: 'vgr702.apple.com' port: 33001. Please check your firewall settings. Error message: Connection refused We are using Fastlane 2.182.0 for CI but we're not setting any -t option for pilot nor deliver. I'm curious Is there any way to impose the setting of Testflight upload method to HTTP/DAV regardless of the server condition of Apple Testflight? Is there any condition to change the method from default(DAV or HTTP I guess) to Aspera/Signiant? Thanks in advance.
Posted
by dokimyj.
Last updated
.
Post not yet marked as solved
0 Replies
746 Views
With releases of 12.2 and 12.3 Beta, xcodebuild times out in the phase of carthage update or build. No Carthage logs left in the archive directory(which starts with /var) It just shows after API fails. 16:00:30 * Skipped downloading ocmock.framework binary due to the error: 16:00:30  "API rate limit exceeded for ***.***.***.***. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)" 16:00:49 * Building scheme "OCMock iOS" in OCMock.xcodeproj 16:13:30 xcodebuild timed out while trying to read ***.xcodeproj(censoring due to private project) Maybe I can suggest for those who using 12.0.1 in the company to use newer version of Xcode, but that is not a solution for 12.0.1 crashes with 12.3 installed build machines on CI. Is there any workarounds?
Posted
by dokimyj.
Last updated
.
Post not yet marked as solved
1 Replies
2.1k Views
Happy new year to everyone in Apple Dev Forum.I use Mac mini late 2014 ~ late 2018 in the workplace.Last week, I tried user creation function in Chef 15's latest version, but failed because it tries to refresh a SecureToken-enabled account.What is weird is, those Macs are already FileVault-disabled because the auto-login function is needed for the operation.Of course, that account was administrator at that time, so I made a whole new account as administrator in GUI,and gave the new account a new Secure Token with `sysadminctl -secureTokenOn` to "-secureTokenOff" the originally secure-tokened account.Now I can check 2 secure tokens exist in that machine via `diskutil apfs listUsers /`, and those two accounts are enabled in Secure Tokens.I logged in with the new admin account and tried to disable the Secure Token for the original one, but still failed with the message below.```sysadminctl[645:19930] Operation is not permitted without secure token unlock.```What is the proper way to 'Unlock the secure token' in this case and why should STILL I do if the FileVault is disabled?
Posted
by dokimyj.
Last updated
.