実行するたびにreact-native run-ios
、私は得る
Could not find iPhone X simulator
Error: Could not find iPhone X simulator
at resolve (calendarPractice/node_modules/react-native/local-cli/runIOS/runIOS.js:149:13)
at new Promise (<anonymous>)
at runOnSimulator (calendarPractice/node_modules/react-native/local-cli/runIOS/runIOS.js:134:10)
at Object.runIOS [as func] (calendarPractice/node_modules/react-native/local-cli/runIOS/runIOS.js:106:12)
at Promise.resolve.then (calendarPractice/node_modules/react-native/local-cli/cliEntry.js:117:22)
ただし、Xcodeで実行すると正常に動作します
{
"devicetypes" : [
{
"name" : "iPhone 4s",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/iPhone 4s.simdevicetype",
"identifier" : "com.Apple.CoreSimulator.SimDeviceType.iPhone-4s"
},
{
"name" : "iPhone 5",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/iPhone 5.simdevicetype",
"identifier" : "com.Apple.CoreSimulator.SimDeviceType.iPhone-5"
},
{
"name" : "iPhone 5s",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/iPhone 5s.simdevicetype",
"identifier" : "com.Apple.CoreSimulator.SimDeviceType.iPhone-5s"
},
{
"name" : "iPhone 6",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/iPhone 6.simdevicetype",
"identifier" : "com.Apple.CoreSimulator.SimDeviceType.iPhone-6"
},
{
"name" : "iPhone 6 Plus",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/iPhone 6 Plus.simdevicetype",
"identifier" : "com.Apple.CoreSimulator.SimDeviceType.iPhone-6-Plus"
},
{
"name" : "iPhone 6s",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/iPhone 6s.simdevicetype",
"identifier" : "com.Apple.CoreSimulator.SimDeviceType.iPhone-6s"
},
{
"name" : "iPhone 6s Plus",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/iPhone 6s Plus.simdevicetype",
"identifier" : "com.Apple.CoreSimulator.SimDeviceType.iPhone-6s-Plus"
},
{
"name" : "iPhone 7",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/iPhone 7.simdevicetype",
"identifier" : "com.Apple.CoreSimulator.SimDeviceType.iPhone-7"
},
{
"name" : "iPhone 7 Plus",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/iPhone 7 Plus.simdevicetype",
"identifier" : "com.Apple.CoreSimulator.SimDeviceType.iPhone-7-Plus"
},
{
"name" : "iPhone 8",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/iPhone 8.simdevicetype",
"identifier" : "com.Apple.CoreSimulator.SimDeviceType.iPhone-8"
},
{
"name" : "iPhone 8 Plus",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/iPhone 8 Plus.simdevicetype",
"identifier" : "com.Apple.CoreSimulator.SimDeviceType.iPhone-8-Plus"
},
{
"name" : "iPhone SE",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/iPhone SE.simdevicetype",
"identifier" : "com.Apple.CoreSimulator.SimDeviceType.iPhone-SE"
},
{
"name" : "iPhone X",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/iPhone X.simdevicetype",
"identifier" : "com.Apple.CoreSimulator.SimDeviceType.iPhone-X"
},
{
"name" : "iPhone Xs",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/iPhone Xs.simdevicetype",
"identifier" : "com.Apple.CoreSimulator.SimDeviceType.iPhone-XS"
},
{
"name" : "iPhone Xs Max",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/iPhone Xs Max.simdevicetype",
"identifier" : "com.Apple.CoreSimulator.SimDeviceType.iPhone-XS-Max"
},
{
"name" : "iPhone Xʀ",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/iPhone Xʀ.simdevicetype",
"identifier" : "com.Apple.CoreSimulator.SimDeviceType.iPhone-XR"
},
{
"name" : "iPad 2",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/iPad 2.simdevicetype",
"identifier" : "com.Apple.CoreSimulator.SimDeviceType.iPad-2"
},
{
"name" : "iPad Retina",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/iPad Retina.simdevicetype",
"identifier" : "com.Apple.CoreSimulator.SimDeviceType.iPad-Retina"
},
{
"name" : "iPad Air",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/iPad Air.simdevicetype",
"identifier" : "com.Apple.CoreSimulator.SimDeviceType.iPad-Air"
},
{
"name" : "iPad Air 2",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/iPad Air 2.simdevicetype",
"identifier" : "com.Apple.CoreSimulator.SimDeviceType.iPad-Air-2"
},
{
"name" : "iPad (5th generation)",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/iPad (5th generation).simdevicetype",
"identifier" : "com.Apple.CoreSimulator.SimDeviceType.iPad--5th-generation-"
},
{
"name" : "iPad Pro (9.7-inch)",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/iPad Pro (9.7-inch).simdevicetype",
"identifier" : "com.Apple.CoreSimulator.SimDeviceType.iPad-Pro--9-7-inch-"
},
{
"name" : "iPad Pro (12.9-inch)",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/iPad Pro (12.9-inch).simdevicetype",
"identifier" : "com.Apple.CoreSimulator.SimDeviceType.iPad-Pro"
},
{
"name" : "iPad Pro (12.9-inch) (2nd generation)",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/iPad Pro (12.9-inch) (2nd generation).simdevicetype",
"identifier" : "com.Apple.CoreSimulator.SimDeviceType.iPad-Pro--12-9-inch---2nd-generation-"
},
{
"name" : "iPad Pro (10.5-inch)",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/iPad Pro (10.5-inch).simdevicetype",
"identifier" : "com.Apple.CoreSimulator.SimDeviceType.iPad-Pro--10-5-inch-"
},
{
"name" : "iPad (6th generation)",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/iPad (6th generation).simdevicetype",
"identifier" : "com.Apple.CoreSimulator.SimDeviceType.iPad--6th-generation-"
},
{
"name" : "iPad Pro (11-inch)",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/iPad Pro (11-inch).simdevicetype",
"identifier" : "com.Apple.CoreSimulator.SimDeviceType.iPad-Pro--11-inch-"
},
{
"name" : "iPad Pro (12.9-inch) (3rd generation)",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/iPad Pro (12.9-inch) (3rd generation).simdevicetype",
"identifier" : "com.Apple.CoreSimulator.SimDeviceType.iPad-Pro--12-9-inch---3rd-generation-"
},
{
"name" : "Apple TV",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/AppleTVOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/Apple TV.simdevicetype",
"identifier" : "com.Apple.CoreSimulator.SimDeviceType.Apple-TV-1080p"
},
{
"name" : "Apple TV 4K",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/AppleTVOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/Apple TV 4K.simdevicetype",
"identifier" : "com.Apple.CoreSimulator.SimDeviceType.Apple-TV-4K-4K"
},
{
"name" : "Apple TV 4K (at 1080p)",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/AppleTVOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/Apple TV 4K (at 1080p).simdevicetype",
"identifier" : "com.Apple.CoreSimulator.SimDeviceType.Apple-TV-4K-1080p"
},
{
"name" : "Apple Watch - 38mm",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/WatchOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/Apple Watch - 38mm.simdevicetype",
"identifier" : "com.Apple.CoreSimulator.SimDeviceType.Apple-Watch-38mm"
},
{
"name" : "Apple Watch - 42mm",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/WatchOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/Apple Watch - 42mm.simdevicetype",
"identifier" : "com.Apple.CoreSimulator.SimDeviceType.Apple-Watch-42mm"
},
{
"name" : "Apple Watch Series 2 - 38mm",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/WatchOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/Apple Watch Series 2 - 38mm.simdevicetype",
"identifier" : "com.Apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-2-38mm"
},
{
"name" : "Apple Watch Series 2 - 42mm",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/WatchOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/Apple Watch Series 2 - 42mm.simdevicetype",
"identifier" : "com.Apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-2-42mm"
},
{
"name" : "Apple Watch Series 3 - 38mm",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/WatchOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/Apple Watch Series 3 - 38mm.simdevicetype",
"identifier" : "com.Apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-3-38mm"
},
{
"name" : "Apple Watch Series 3 - 42mm",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/WatchOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/Apple Watch Series 3 - 42mm.simdevicetype",
"identifier" : "com.Apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-3-42mm"
},
{
"name" : "Apple Watch Series 4 - 40mm",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/WatchOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/Apple Watch Series 4 - 40mm.simdevicetype",
"identifier" : "com.Apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-4-40mm"
},
{
"name" : "Apple Watch Series 4 - 44mm",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/WatchOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/DeviceTypes\/Apple Watch Series 4 - 44mm.simdevicetype",
"identifier" : "com.Apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-4-44mm"
}
],
"runtimes" : [
{
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/Runtimes\/iOS.simruntime",
"availabilityError" : "",
"buildversion" : "16B91",
"availability" : "(available)",
"isAvailable" : true,
"identifier" : "com.Apple.CoreSimulator.SimRuntime.iOS-12-1",
"version" : "12.1",
"name" : "iOS 12.1"
},
{
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/AppleTVOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/Runtimes\/tvOS.simruntime",
"availabilityError" : "",
"buildversion" : "16J602",
"availability" : "(available)",
"isAvailable" : true,
"identifier" : "com.Apple.CoreSimulator.SimRuntime.tvOS-12-1",
"version" : "12.1",
"name" : "tvOS 12.1"
},
{
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/WatchOS.platform\/Developer\/Library\/CoreSimulator\/Profiles\/Runtimes\/watchOS.simruntime",
"availabilityError" : "",
"buildversion" : "16R591",
"availability" : "(available)",
"isAvailable" : true,
"identifier" : "com.Apple.CoreSimulator.SimRuntime.watchOS-5-1",
"version" : "5.1",
"name" : "watchOS 5.1"
}
],
"devices" : {
"com.Apple.CoreSimulator.SimRuntime.watchOS-5-1" : [
{
"availability" : "(available)",
"state" : "Shutdown",
"isAvailable" : true,
"name" : "Apple Watch Series 2 - 38mm",
"udid" : "01AFDEF7-63B6-465C-A02A-44EE4A07EABA",
"availabilityError" : ""
},
{
"availability" : "(available)",
"state" : "Shutdown",
"isAvailable" : true,
"name" : "Apple Watch Series 2 - 42mm",
"udid" : "BE62C985-DEE2-46EC-8962-A582D537EEE0",
"availabilityError" : ""
},
{
"availability" : "(available)",
"state" : "Shutdown",
"isAvailable" : true,
"name" : "Apple Watch Series 3 - 38mm",
"udid" : "078BF157-30FA-41D1-94FA-6B1686E03085",
"availabilityError" : ""
},
{
"availability" : "(available)",
"state" : "Shutdown",
"isAvailable" : true,
"name" : "Apple Watch Series 3 - 42mm",
"udid" : "E4CE652E-0185-4C59-B965-BED5FCEE7C76",
"availabilityError" : ""
},
{
"availability" : "(available)",
"state" : "Shutdown",
"isAvailable" : true,
"name" : "Apple Watch Series 4 - 40mm",
"udid" : "6621323A-A9DE-4BCB-AC97-54C8C33B0158",
"availabilityError" : ""
},
{
"availability" : "(available)",
"state" : "Shutdown",
"isAvailable" : true,
"name" : "Apple Watch Series 4 - 44mm",
"udid" : "D89037A3-66A0-43C1-90BA-E7C76CA0D724",
"availabilityError" : ""
}
],
"com.Apple.CoreSimulator.SimRuntime.tvOS-12-1" : [
{
"availability" : "(available)",
"state" : "Shutdown",
"isAvailable" : true,
"name" : "Apple TV",
"udid" : "AFAA21B8-BD4A-45EA-B0FF-E9915FE9B926",
"availabilityError" : ""
},
{
"availability" : "(available)",
"state" : "Shutdown",
"isAvailable" : true,
"name" : "Apple TV 4K",
"udid" : "EBB88F2E-CFFE-4981-A736-7A7C0B85643D",
"availabilityError" : ""
},
{
"availability" : "(available)",
"state" : "Shutdown",
"isAvailable" : true,
"name" : "Apple TV 4K (at 1080p)",
"udid" : "F0B73E8A-986E-447E-B37A-2F46096DEFF6",
"availabilityError" : ""
}
],
"com.Apple.CoreSimulator.SimRuntime.iOS-12-1" : [
{
"availability" : "(available)",
"state" : "Shutdown",
"isAvailable" : true,
"name" : "iPhone 5s",
"udid" : "F870B7FA-6DDA-4336-89AD-68A402844188",
"availabilityError" : ""
},
{
"availability" : "(available)",
"state" : "Shutdown",
"isAvailable" : true,
"name" : "iPhone 5s",
"udid" : "6627ADE5-F8C1-4AE5-BD6F-3AEDDC0B7B63",
"availabilityError" : ""
},
{
"availability" : "(available)",
"state" : "Shutdown",
"isAvailable" : true,
"name" : "iPhone 6",
"udid" : "05574997-ACAD-40CA-A3D7-5624D53F00FA",
"availabilityError" : ""
},
{
"availability" : "(available)",
"state" : "Shutdown",
"isAvailable" : true,
"name" : "iPhone 6 Plus",
"udid" : "93237078-CA6D-4F97-93F9-779809700018",
"availabilityError" : ""
},
{
"availability" : "(available)",
"state" : "Shutdown",
"isAvailable" : true,
"name" : "iPhone 6s",
"udid" : "9B50FE18-4F49-4EA4-80F0-DF498A667D33",
"availabilityError" : ""
},
{
"availability" : "(available)",
"state" : "Shutdown",
"isAvailable" : true,
"name" : "iPhone 6s Plus",
"udid" : "D4640B6D-97DC-4CA1-BE63-C5403159A3D4",
"availabilityError" : ""
},
{
"availability" : "(available)",
"state" : "Shutdown",
"isAvailable" : true,
"name" : "iPhone 7",
"udid" : "6E9EEC00-3291-42B4-B04A-BA3487F9CD5F",
"availabilityError" : ""
},
{
"availability" : "(available)",
"state" : "Shutdown",
"isAvailable" : true,
"name" : "iPhone 7 Plus",
"udid" : "6DA1C3CF-1D1F-4DEF-9B74-2C40D5FB5881",
"availabilityError" : ""
},
{
"availability" : "(available)",
"state" : "Shutdown",
"isAvailable" : true,
"name" : "iPhone 8",
"udid" : "E19386B9-469A-450B-9CD2-B4FE8687DCF9",
"availabilityError" : ""
},
{
"availability" : "(available)",
"state" : "Shutdown",
"isAvailable" : true,
"name" : "iPhone 8 Plus",
"udid" : "6D36DF76-8ED9-41A2-9E1A-0BA48B92C26E",
"availabilityError" : ""
},
{
"availability" : "(available)",
"state" : "Shutdown",
"isAvailable" : true,
"name" : "iPhone SE",
"udid" : "EE4818DF-F817-4441-8A1C-BE1B99303E10",
"availabilityError" : ""
},
{
"availability" : "(available)",
"state" : "Shutdown",
"isAvailable" : true,
"name" : "iPhone X",
"udid" : "85B78A8F-C32B-4493-BDD1-65ECA3F77C86",
"availabilityError" : ""
},
{
"availability" : "(available)",
"state" : "Shutdown",
"isAvailable" : true,
"name" : "iPhone X",
"udid" : "CA12C337-4F66-4C6C-ACE5-7F7EACCBC39A",
"availabilityError" : ""
},
{
"availability" : "(available)",
"state" : "Shutdown",
"isAvailable" : true,
"name" : "iPhone XS",
"udid" : "8BBCE315-2F4C-4132-8E53-28AF52401C8E",
"availabilityError" : ""
},
{
"availability" : "(available)",
"state" : "Shutdown",
"isAvailable" : true,
"name" : "iPhone XS Max",
"udid" : "4E77C62F-AB1F-4EDE-839B-53F70CAFC79E",
"availabilityError" : ""
},
{
"availability" : "(available)",
"state" : "Shutdown",
"isAvailable" : true,
"name" : "iPhone XR",
"udid" : "28D12ABE-3355-4862-960A-0FE5FFE41C7B",
"availabilityError" : ""
},
{
"availability" : "(available)",
"state" : "Shutdown",
"isAvailable" : true,
"name" : "iPad Air",
"udid" : "94485C88-BCEB-456A-95DC-5F8C3DA8D181",
"availabilityError" : ""
},
{
"availability" : "(available)",
"state" : "Shutdown",
"isAvailable" : true,
"name" : "iPad Air 2",
"udid" : "CF2C787D-A378-4AB9-B334-F7B24E94AF4D",
"availabilityError" : ""
},
{
"availability" : "(available)",
"state" : "Shutdown",
"isAvailable" : true,
"name" : "iPad (5th generation)",
"udid" : "DFE602A5-EC68-4585-8AB0-C045A9843D29",
"availabilityError" : ""
},
{
"availability" : "(available)",
"state" : "Shutdown",
"isAvailable" : true,
"name" : "iPad Pro (9.7-inch)",
"udid" : "5A3F3EAC-F788-49F1-A753-5D34A9990F0B",
"availabilityError" : ""
},
{
"availability" : "(available)",
"state" : "Shutdown",
"isAvailable" : true,
"name" : "iPad Pro (12.9-inch)",
"udid" : "EF6EBE34-0A85-4FF0-8A45-7BA418A0CC0C",
"availabilityError" : ""
},
{
"availability" : "(available)",
"state" : "Shutdown",
"isAvailable" : true,
"name" : "iPad Pro (12.9-inch) (2nd generation)",
"udid" : "FBA940F8-FD85-4D5E-A570-EB4F3A56E1F9",
"availabilityError" : ""
},
{
"availability" : "(available)",
"state" : "Shutdown",
"isAvailable" : true,
"name" : "iPad Pro (10.5-inch)",
"udid" : "8AE4AAED-ECE0-4984-9679-8D3022064692",
"availabilityError" : ""
},
{
"availability" : "(available)",
"state" : "Shutdown",
"isAvailable" : true,
"name" : "iPad (6th generation)",
"udid" : "1121363D-EF49-4AC0-9E46-5C30318A24A2",
"availabilityError" : ""
},
{
"availability" : "(available)",
"state" : "Shutdown",
"isAvailable" : true,
"name" : "iPad Pro (11-inch)",
"udid" : "038FECC0-8711-46E3-B601-8F88F2F4AD7D",
"availabilityError" : ""
},
{
"availability" : "(available)",
"state" : "Shutdown",
"isAvailable" : true,
"name" : "iPad Pro (12.9-inch) (3rd generation)",
"udid" : "12DC911F-2F45-4767-BC1A-6F1D0C8D9F3D",
"availabilityError" : ""
}
]
},
"pairs" : {
"C9B69F4A-6A9D-44F3-A6BC-56BFA2F8B83F" : {
"watch" : {
"name" : "Apple Watch Series 4 - 44mm",
"udid" : "D89037A3-66A0-43C1-90BA-E7C76CA0D724",
"state" : "Shutdown"
},
"phone" : {
"name" : "iPhone XS Max",
"udid" : "4E77C62F-AB1F-4EDE-839B-53F70CAFC79E",
"state" : "Shutdown"
},
"state" : "(active, disconnected)"
},
"5327B65F-29E7-42D0-9861-FF31428F3218" : {
"watch" : {
"name" : "Apple Watch Series 4 - 40mm",
"udid" : "6621323A-A9DE-4BCB-AC97-54C8C33B0158",
"state" : "Shutdown"
},
"phone" : {
"name" : "iPhone XS",
"udid" : "8BBCE315-2F4C-4132-8E53-28AF52401C8E",
"state" : "Shutdown"
},
"state" : "(active, disconnected)"
}
}
編集:出力JSONのデバイスセクションをコピーし、自分の/node_modules/react-native/local-cli/runIOS/runIOS.js
function runOnSimulator(xcodeProject, args, scheme) {
return new Promise(resolve => {
try {
var simulators = {devices section of your json}; //Here
} catch (e) {
console.log("e", e);
throw new Error('Could not parse the simulator list output');
}
const selectedSimulator = findMatchingSimulator(simulators, args.simulator);
console.log("selected", selectedSimulator);
if (!selectedSimulator) {
throw new Error(`Could not find ${args.simulator} simulator`);
}
...
そして最後に、あなたと同じエラーを出しました。そのため、デバイスの解析バージョンが異なることがわかりました。デバイスのバージョンは次のとおりです。
"com.Apple.CoreSimulator.SimRuntime.tvOS-12-1" //for tvOS
"com.Apple.CoreSimulator.SimRuntime.iOS-12-1" // for iOS
しかし、react-nativeチェックでは、このバージョン値はthis(/node_modules/react-native/local-cli/runIOS/findMatchingSimulator.js
);
// Making sure the version of the simulator is an iOS or tvOS (Removes Apple Watch, etc)
if (!version.startsWith('iOS') && !version.startsWith('tvOS')) {
continue;
}
したがって、react-nativeは認識できません。
これでこのコードを変更すると、
// Making sure the version of the simulator is an iOS or tvOS (Removes Apple Watch, etc)
if (!version.startsWith('com.Apple.CoreSimulator.SimRuntime.iOS') && !version.startsWith('com.Apple.CoreSimulator.SimRuntime.tvOS')) {
continue;
}
問題は解決しました。私のコンピューターであなたのJSONデータでそれをチェックしましたが、うまくいきました。
このエラーを修正するには、npmを使用してプロジェクトを再インストールするだけです
npm install
次に、警告のリストが表示されます。それらを修正するには、次のコマンドを使用します。
npm audit fix
これですべてが修正され、iOSエミュレーターを実行できるようになりますreact-native run-ios
[〜#〜]問題[〜#〜]
最新のXcode(11)でこれを試しても、iPhone Xはありません!
シミュレータを単独で実行するには、トップメニューで、[ハードウェア、デバイス、iOS 13.0]を確認します。次のように表示されます。
run-ios
を実行すると、react-nativeは要求されたデバイスに一致するように設計されます。
内部的にハードコードされたデフォルトはiPhone Xです。
要求されたデバイスとの一致を試みる関数は次のとおりです。
/node_modules/@react-native-community/cli-platform-ios/build/commands/runIOS/findMatchingSimulator.js
この機能は、デバイスとオプションのバージョン番号を提供できるように設計されています。
指定されたデバイスとバージョンが見つからない場合、デフォルトでリストの最初のデバイスを使用して一致を返します。
しかし...実際には、最初のデバイスは時計であり、どの時計も一致から除外されるため、この関数はnullを返します。
解決策1-既存のXcodeデバイスを使用する
上記のように、最初にシミュレータを単独で実行し、希望するiPhoneまたはiPadをメモします。
次に、この名前をオプションの引数として、次のようにrun-iosコマンドラインコマンドに渡します。
react-native run-ios --simulator="iPhone 8"
解決策2-新しいXcode iOSデバイスを追加する
Xcode 11リリースノート によると:
「Xcodeは使用可能なすべてのiOSシミュレータデバイスをデフォルトで作成しなくなりました。代わりに、最も一般的に使用されるデバイスのセットが作成されます。名前を入力し、関連するデバイスタイプとOSバージョンを選択しますTerminalで、xcrun simctl createコマンドを実行します(例:xcrun simctl create "My iPhone 7" "iPhone 7" iOS13.0。(49428617) "
Xcodeでは、「iPhone X」という新しいデバイスを追加する必要があります。
また、私はここで答えました: React Native Issue#2328
一時的な修正:
ステップ1:ファイルを開く/node_modules/react-native/local-cli/runIOS/findMatchingSimulator.js
ステップ2:これからコード行を変更します:
if (!version.startsWith('iOS') && !version.startsWith('tvOS')) {
continue;
}
これに:
if (!version.startsWith('com.Apple.CoreSimulator.SimRuntime.iOS') && !version.startsWith('com.Apple.CoreSimulator.SimRuntime.tvOS')) {
continue;
}
手順:react-native run-ios
を実行します(2回実行する必要がある場合があります。以前のバージョンから実行している場合は、Metro Bundler [バックグラウンドで実行しているコンソール]を削除することを忘れないでくださいビルドに失敗しました!)
問題は、Xcodeの更新後、シミュレーターの名前空間がデバイスのバージョンリストに追加されたことです。 Reactネイティブビルドはこれらの名前空間を想定していなかったため、ビルドが中断しました。
xcode 11の更新後、xcrunはtrueまたはfalseを返し、以前のYESまたはNOを返しません。
goto / node_modules/react-native/local-cli/runIOS/findMatchingSimulator.jsおよび
見つける
if (
simulator.availability !== '(available)' &&
simulator.isAvailable !== 'YES'
) {
continue;
}
に変更します
if (
simulator.availability !== '(available)' &&
simulator.isAvailable !== true
) {
continue;
}
Xcodeをバージョン11に更新した後、同じ問題が発生しました。
解決策は、リストにiPhone Xシミュレーターを追加することです。
シミュレータを選択->ハードウェア->デバイスの管理(ポップアップが表示されます)
[シミュレータ]->(左下隅)+(プラスアイコン、[フィルタ]の横)を選択して、新しいシミュレータを追加し、
シミュレーター名:iPhone Xデバイスタイプ:iPhone Xを選択します。
それは私のために働いた
ファイル/node_modules/react-native/local-cli/runIOS/findMatchingSimulator.jsを開きます
!version.startsWith( 'iOS')->!version .includes( 'iOS')
また、XcodeにシミュレータとしてiPhone Xをインストールしていません。私がしなければならなかったのは、Xcodeの新しいシミュレーターとしてiPhone Xを追加することだけでした。
Xcodeの場合:Window
に移動してからDevices and Simulators
。シミュレータータブをクリックします。クリック +
左下隅のボタンをクリックして、iPhone Xを追加します。
この修正があなたにとって私にとってそれと同じくらい簡単であることを願っています。
私の場合、スクリプトを実行します:sed -i '' 's/startsWith/includes/g' node_modules/react-native/local-cli/runIOS/findMatchingSimulator.jsそしてそれは動作しました。反応ネイティブを更新できない人にも適しています
私の問題は、iPhone Xシミュレーターがインストールされていないことでした
どのシミュレーターがインストールされているかを確認できます
xcrun simctl list devices | grep iPhone | grep -v unavailable | cut -d'(' -f1
次に実行する
react-native run-ios --simulator="iPhone Xs"
Xcode 11.2およびiOS 13.2の場合、シミュレーターでアプリを実行するために行った変更があります
findMatchingSimulator.js
43行目:
if (!version.startsWith('iOS') && !version.startsWith('tvOS')) {
に
if (!version.includes('iOS') && !version.includes('tvOS')) {
ライン
52行目
if (
simulator.availability !== '(available)' &&
simulator.isAvailable !== 'YES'
) {
continue;
}
に
if (
simulator.isAvailable != true
) {
continue;
}
追伸.
初日Reactプロジェクト広告は既に低下しています!(いいえ)
簡単な修正...
Xcode->設定->コンポーネントはiOS 12.2シミュレーターをインストールします
変化する /node_modules/@react-native-community/cli-platform-ios/build/commands/runIOS/index.js
ファイル
options: [{
name: '--simulator [string]',
description: 'Explicitly set simulator to use. Optionally include iOS version between' + 'parenthesis at the end to match an exact version: "iPhone 6 (10.0)"',
default: 'iPhone X'
}
に
options: [{
name: '--simulator [string]',
description: 'Explicitly set simulator to use. Optionally include iOS version between' + 'parenthesis at the end to match an exact version: "iPhone 6 (10.0)"',
default: 'iPhone 8'
}
runSimulator.js内の次のコード行を置き換えた後も、シミュレータが見つからなかった場合は存続します。
RunSimulator.jsのパス-> /node_modules/react-native/local-cli/runIOS/findMatchingSimulator.js
if (!version.startsWith('iOS') && !version.startsWith('tvOS')) { continue; }
これで
if ( !version.startsWith('com.Apple.CoreSimulator.SimRuntime.iOS') && !version.startsWith('com.Apple.CoreSimulator.SimRuntime.tvOS') ) { continue; }
置換後の次の行をコメント
if ( simulator.availability !== '(available)' && simulator.isAvailable !== 'YES' ) { continue; }
問題なくiPhoneシミュレーターを起動します。
およびXCode 11への更新後の2番目のアプローチ
Xcode 11 xcrunは、以前と同様にisAvailableプロパティに対してYESまたはNOではなくtrueまたはfalseを返します。次のコマンドを使用してそれを確認できます
xcrun simctl list devices --json
上記のコマンドは使用可能なすべてのデバイスを印刷します次のように
"com.Apple.CoreSimulator.SimRuntime.iOS-12-2" : [
{
"state" : "Booted",
"isAvailable" : true,
"name" : "iPhone X",
"udid" : "E53748D1-628B-4A99-A419-4D7AE7CE4745"
}
]
次のコードでYESをtrueに置き換えます
if ( simulator.availability !== '(available)' && simulator.isAvailable !== 'YES' ) { continue; }
このように
if ( simulator.availability !== '(available)' && simulator.isAvailable !== true ) { continue; }
React-native-cli 2.0.1では、単にシミュレーターの名前を変更することができます。デフォルトでは、Xcodeは<DeviceName> (<DeviceSize>)
の形式でいくつかのデバイスに名前を付けます。ただし、このバージョンのCLIは、括弧内のすべてをiOSバージョンとして解釈します。
iPad Pro (10.5-inch)
という名前のシミュレーターを実行しようとすると、シミュレーターの名前をiPad Pro [10.5-inch]
に変更するだけで実行できるようになりました。
シミュレーターアプリのHardware
-> Device
-> Manage Devices...
メニューを使用し、シミュレーターの1つを右クリックして(Xcode 10.2.1で)シミュレーターの名前を変更できます。
Xcodeを更新したときに問題に直面しました。すべてのシミュレータが利用可能/アンインストールされていません。私は再びそれらをインストールしています。
私の場合、私は他のソリューションを試しましたが、何も機能しませんでした。
その後、react-nativeを0.59.5
から0.59.10
それから解決しました
私にとっては、React Nativeを0.60に更新してnpx react-native-git-upgrade
。
React Native from 0.59.8
から0.59.9
。
(上記の回答に基づいて)判明したので、@react-native-community/cli
モジュール:
yarn.lock
またはpackage-lock.json
)yarn
またはnpm install
もう一度インストールします。参照: https://github.com/react-native-community/rn-diff-purge/issues/21#issuecomment-507645945