When testing a React Native app with react-native run-ios it opens an iPhone simulator.
You can change the virtual device to an iPad in the Simulator options, but the React Native app does not appear in the list of installed apps.
Is there a way to open an iPad simulator from the CLI?
--simulator flag is what you are looking for
For example react-native run-ios --simulator 'iPad 2' will run the app on iPad 2 simulator.
As a side node, if you need to get list of available simulators with their names use xcrun simctl list devices
Get device list with this command
xcrun simctl list devices
Console
== Devices ==
-- iOS 13.5 --
iPhone 6s (9981E5A5-48A8-4B48-B203-1C6E73243E83) (Shutdown)
iPhone 8 (FC540A6C-F374-4113-9E71-1291790C8C4C) (Shutting Down)
iPhone 8 Plus (CAC37462-D873-4EBB-9D71-7C6D0C915C12) (Shutdown)
iPhone 11 (347EFE28-9B41-4C1A-A4C3-D99B49300D8B) (Shutting Down)
iPhone 11 Pro (5AE964DC-201C-48C9-BFB5-4506E3A0018F) (Shutdown)
iPhone 11 Pro Max (48EE985A-39A6-426C-88A4-AA1E4AFA0133) (Shutdown)
iPhone SE (2nd generation) (48B78183-AFD7-4832-A80E-AF70844222BA) (Shutdown)
iPad Pro (9.7-inch) (2DEF27C4-6A18-4477-AC7F-FB31CCCB3960) (Shutdown)
iPad (7th generation) (36A4AF6B-1232-4BCB-B74F-226E025225E4) (Shutdown)
iPad Pro (11-inch) (2nd generation) (79391BD7-0E55-44C8-B1F9-AF92A1D57274) (Shutdown)
iPad Pro (12.9-inch) (4th generation) (ED90A31F-6B20-4A6B-9EE9-CF22C01E8793) (Shutdown)
iPad Air (3rd generation) (41AD1CF7-CB0D-4F18-AB1E-6F8B6261AD33) (Shutdown)
-- tvOS 13.4 --
Apple TV 4K (51925935-97F4-4242-902F-041F34A66B82) (Shutdown)
-- watchOS 6.2 --
Apple Watch Series 5 - 40mm (7C50F2E9-A52B-4E0D-8B81-A811FE995502) (Shutdown)
Apple Watch Series 5 - 44mm (F7D8C256-DC9F-4FDC-8E65-63275C222B87) (Shutdown)
Select Simulator string without ID here is example.
iPad Pro (12.9-inch) (4th generation)
Final command
iPhone
• iPhone 6s
react-native run-ios --simulator="iPhone 6s"
• iPhone 8
react-native run-ios --simulator="iPhone 8"
• iPhone 8 Plus
react-native run-ios --simulator="iPhone 8 Plus"
• iPhone SE (2nd generation)
react-native run-ios --simulator="iPhone SE (2nd generation)"
iPad
• iPad Pro (12.9-inch) 4th generation
react-native run-ios --simulator="iPad Pro (12.9-inch) (4th generation)"
• iPad Air (3rd generation)
react-native run-ios --simulator="iPad Air (3rd generation)"
• iPad (7th generation)
react-native run-ios --simulator="iPad (7th generation)"
Related
in iOS 13 beta 5, the WebViewJavascriptBridge callback not work for wkwebview of iPad pro(3rth generation)
in iOS 13 beta 5, there is no issue in other device except for iPad pro(3rth generation).
I am trying to emulate my Ionic app in iOS but when I run ionic cordova emulate ios I get an error:
No target specified for emulator. Deploying to undefined simulator
Device type "com.apple.CoreSimulator.SimDeviceType.undefined" could not be found.
It seems that even though there are emulators available on my OSX, Ionic can't access them for some reason. Why are there no devices found in Ionic when there are clearly devices that can be run elsewhere? Could this be an issue with env vars?
For reference: ionic info:
cli packages: (/usr/local/lib/node_modules)
#ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 7.0.1
local packages:
#ionic/app-scripts : 3.1.10
Cordova Platforms : android 6.2.3 ios 4.4.0
Ionic Framework : ionic-angular 3.9.2
System:
ios-sim : 7.0.0
Node : v9.1.0
npm : 6.0.0
OS : macOS High Sierra
Xcode : Xcode 9.4.1 Build version 9F2000
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro
When I run ionic cordova emulate ios --list I get the following output:
Available ios virtual devices:
However, when I run ios-sim showdevicetypes I get:
Apple-Watch-38mm, watchOS 4.3
Apple-Watch-42mm, watchOS 4.3
Apple-Watch-Series-2-38mm, watchOS 4.3
Apple-Watch-Series-2-42mm, watchOS 4.3
Apple-Watch-Series-3-38mm, watchOS 4.3
Apple-Watch-Series-3-42mm, watchOS 4.3
iPhone-5s, 11.4
iPhone-6, 11.4
iPhone-6-Plus, 11.4
iPhone-6s, 11.4
iPhone-6s-Plus, 11.4
iPhone-7, 11.4
iPhone-7-Plus, 11.4
iPhone-8, 11.4
iPhone-8-Plus, 11.4
iPhone-SE, 11.4
iPhone-X, 11.4
iPad-Air, 11.4
iPad-Air-2, 11.4
iPad--5th-generation-, 11.4
iPad-Pro--9-7-inch-, 11.4
iPad-Pro, 11.4
iPad-Pro--12-9-inch---2nd-generation-, 11.4
iPad-Pro--10-5-inch-, 11.4
Apple-TV-1080p, tvOS 11.4
Apple-TV-4K-4K, tvOS 11.4
Apple-TV-4K-1080p, tvOS 11.4
And running xcrun simctl list gives:
== Device Types ==
iPhone 4s (com.apple.CoreSimulator.SimDeviceType.iPhone-4s)
iPhone 5 (com.apple.CoreSimulator.SimDeviceType.iPhone-5)
iPhone 5s (com.apple.CoreSimulator.SimDeviceType.iPhone-5s)
iPhone 6 (com.apple.CoreSimulator.SimDeviceType.iPhone-6)
iPhone 6 Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-6-Plus)
iPhone 6s (com.apple.CoreSimulator.SimDeviceType.iPhone-6s)
iPhone 6s Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-6s-Plus)
iPhone 7 (com.apple.CoreSimulator.SimDeviceType.iPhone-7)
iPhone 7 Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-7-Plus)
iPhone 8 (com.apple.CoreSimulator.SimDeviceType.iPhone-8)
iPhone 8 Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-8-Plus)
iPhone SE (com.apple.CoreSimulator.SimDeviceType.iPhone-SE)
iPhone X (com.apple.CoreSimulator.SimDeviceType.iPhone-X)
iPad 2 (com.apple.CoreSimulator.SimDeviceType.iPad-2)
iPad Retina (com.apple.CoreSimulator.SimDeviceType.iPad-Retina)
iPad Air (com.apple.CoreSimulator.SimDeviceType.iPad-Air)
iPad Air 2 (com.apple.CoreSimulator.SimDeviceType.iPad-Air-2)
iPad (5th generation) (com.apple.CoreSimulator.SimDeviceType.iPad--5th-generation-)
iPad Pro (9.7-inch) (com.apple.CoreSimulator.SimDeviceType.iPad-Pro--9-7-inch-)
iPad Pro (12.9-inch) (com.apple.CoreSimulator.SimDeviceType.iPad-Pro)
iPad Pro (12.9-inch) (2nd generation) (com.apple.CoreSimulator.SimDeviceType.iPad-Pro--12-9-inch---2nd-generation-)
iPad Pro (10.5-inch) (com.apple.CoreSimulator.SimDeviceType.iPad-Pro--10-5-inch-)
iPad (6th generation) (com.apple.CoreSimulator.SimDeviceType.iPad--6th-generation-)
Apple TV (com.apple.CoreSimulator.SimDeviceType.Apple-TV-1080p)
Apple TV 4K (com.apple.CoreSimulator.SimDeviceType.Apple-TV-4K-4K)
Apple TV 4K (at 1080p) (com.apple.CoreSimulator.SimDeviceType.Apple-TV-4K-1080p)
Apple Watch - 38mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-38mm)
Apple Watch - 42mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-42mm)
Apple Watch Series 2 - 38mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-2-38mm)
Apple Watch Series 2 - 42mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-2-42mm)
Apple Watch Series 3 - 38mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-3-38mm)
Apple Watch Series 3 - 42mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-3-42mm)
== Runtimes ==
iOS 11.4 (11.4 - 15F79) - com.apple.CoreSimulator.SimRuntime.iOS-11-4
tvOS 11.4 (11.4 - 15L576) - com.apple.CoreSimulator.SimRuntime.tvOS-11-4
watchOS 4.3 (4.3 - 15T212) - com.apple.CoreSimulator.SimRuntime.watchOS-4-3
== Devices ==
-- iOS 11.4 --
iPhone 5s (68553C20-B109-4807-B20C-E93006B8F214) (Shutdown)
iPhone 6 (9B230488-BC8B-4947-AC2B-3B8245878625) (Shutdown)
iPhone 6 Plus (028C9FB4-4179-4772-AC96-9AEC9F447859) (Shutdown)
iPhone 6s (BFBFF883-1207-4049-851B-DDFF15D7A7D5) (Shutdown)
iPhone 6s Plus (6030E33B-DE97-41A6-A961-6C05DEA2EA34) (Shutdown)
iPhone 7 (0F1EE195-BB50-44D3-B87C-DB914196BB68) (Shutdown)
iPhone 7 Plus (42FDB489-30D3-4BEE-82F1-D6BCA84019F2) (Shutdown)
iPhone 8 (62895939-A322-4F3D-8D4E-8D8F3F44B98E) (Shutdown)
iPhone 8 Plus (79D7D0A1-03CE-425D-A714-13CE8E62BCB3) (Shutdown)
iPhone SE (82AC6B87-D98E-46A2-BE34-7F148F179796) (Shutdown)
iPhone X (FEA0BBCA-91C3-4EE3-A49A-7EE2BC4382A4) (Shutdown)
My-iPhoneX (A2E78F04-CB1B-4BCE-8BF3-8EA1B14930E5) (Shutdown)
iPad Air (6F05FAB3-7094-485E-B518-CE6EC1D46D54) (Shutdown)
iPad Air 2 (2A075B9A-35B3-410D-8D18-308A94F49F1D) (Shutdown)
iPad (5th generation) (879A193F-2AF3-4446-BB63-095AE6C9C3E6) (Shutdown)
iPad Pro (9.7-inch) (025D91DC-43CE-4497-A672-B57857BF6E68) (Shutdown)
iPad Pro (12.9-inch) (2D1C41EA-5F2E-493F-98C8-29FCCDB35D0F) (Shutdown)
iPad Pro (12.9-inch) (2nd generation) (96467014-EDC9-47EE-84FE-29AB7817B742) (Shutdown)
iPad Pro (10.5-inch) (47BEFF82-F240-4105-868D-CA4C8EE3BF29) (Shutdown)
-- tvOS 11.4 --
Apple TV (E3696606-A26C-4BCE-9CC3-1DC99B148ED3) (Shutdown)
Apple TV 4K (087290EA-40C9-4EEC-8A80-9D0A92378FA5) (Shutdown)
Apple TV 4K (at 1080p) (71014E88-3FEF-450A-B315-3C224271401A) (Shutdown)
-- watchOS 4.3 --
Apple Watch - 38mm (7914DF5F-9810-4995-908F-1BABBAE02670) (Shutdown)
Apple Watch - 42mm (A335D9E6-7974-45F6-B47D-3747FA9BD09E) (Shutdown)
Apple Watch Series 2 - 38mm (7FBCB06A-EE99-4C8F-BDD2-870EC5275EF0) (Shutdown)
Apple Watch Series 2 - 42mm (806DDCC1-588A-455D-AA1A-16F5E5931077) (Shutdown)
Apple Watch Series 3 - 38mm (DF16B352-301E-4221-81CA-2869A1F9B527) (Shutdown)
Apple Watch Series 3 - 42mm (85C06E5F-3E1A-4BC4-AECB-4EA0C88D8F09) (Shutdown)
== Device Pairs ==
BE73638A-71E6-41F2-A1EA-3372E898F1B0 (active, disconnected)
Watch: Apple Watch Series 2 - 38mm (7FBCB06A-EE99-4C8F-BDD2-870EC5275EF0) (Shutdown)
Phone: iPhone 7 (0F1EE195-BB50-44D3-B87C-DB914196BB68) (Shutdown)
E17C2241-7367-4F02-AC44-54542EDBC936 (active, disconnected)
Watch: Apple Watch Series 2 - 42mm (806DDCC1-588A-455D-AA1A-16F5E5931077) (Shutdown)
Phone: iPhone 7 Plus (42FDB489-30D3-4BEE-82F1-D6BCA84019F2) (Shutdown)
A463C9D5-E753-46F8-9493-D1A3E3BDCAA1 (active, disconnected)
Watch: Apple Watch Series 3 - 38mm (DF16B352-301E-4221-81CA-2869A1F9B527) (Shutdown)
Phone: iPhone 8 (62895939-A322-4F3D-8D4E-8D8F3F44B98E) (Shutdown)
7A7B90CE-9B4F-41A6-8721-C7457E9F4A4E (active, disconnected)
Watch: Apple Watch Series 3 - 42mm (85C06E5F-3E1A-4BC4-AECB-4EA0C88D8F09) (Shutdown)
Phone: iPhone 8 Plus (79D7D0A1-03CE-425D-A714-13CE8E62BCB3) (Shutdown)
There are lots of bits of code here because it requires output logs.
Or you could just try something like this :
cd platforms/ios/cordova
npm install ios-sim#latest
If this problem again persist after updating to Mojave then remove and add platform will not going to work.
Instead you can try invoking simulator directly using following command
ionic cordova emulate ios --livereload --consolelogs --target="iPhone-6,com.apple.CoreSimulator.SimRuntime.iOS-12-2"
Also, if you are using older build system, you can add additional flag like below
ionic cordova emulate ios --livereload --consolelogs --target="iPhone-6,com.apple.CoreSimulator.SimRuntime.iOS-12-2" --buildFlag="-UseModernBuildSystem=0"
As of Ionic v5.4.1 and ios-sim#latest (8.0.2), none of the other answers worked for me. What ended up working was running the list command to find the device's UUID then specifying it as the target:
ionic cordova emulate --list
ionic cordova emulate ios -l -c --target="<UUID>"
Had to remove ios platform and add it
ionic cordova platform remove ios
ionic cordova platform add ios
iOS 9.3 was released on march 21, 2016, and according to its download page, this version has two build numbers associated :
Builds
13E233
13E234
I don't remember of any previous iOS version with multiple builds numbers, so it raised some questions :
First, why is there two build numbers ? The builds were made successively according to the difference between them, so maybe there are one iPhone and one iPad build.
What is the difference between these builds ?
How can I detect which build i'm using ?
If you look at the name of each platform's ipsw file, you will see which binaries were build 13E233 or 13E234:
iPhone 6s
iPhone8,1_9.3_13E234_Restore.ipsw
iPhone 6s Plus
iPhone8,2_9.3_13E234_Restore.ipsw
iPhone SE
iPhone8,4_9.3_13E233_Restore.ipsw
iPhone 6
iPhone7,2_9.3_13E233_Restore.ipsw
iPhone 6 Plus
iPhone7,1_9.3_13E233_Restore.ipsw
iPhone 5s (CDMA)
iPhone6,2_9.3_13E233_Restore.ipsw
iPhone 5s (GSM)
iPhone6,1_9.3_13E233_Restore.ipsw
iPhone 5 (CDMA)
iPhone5,2_9.3_13E233_Restore.ipsw
iPhone 5 (GSM)
iPhone5,1_9.3_13E233_Restore.ipsw
iPhone 5c (CDMA)
iPhone5,4_9.3_13E233_Restore.ipsw
iPhone 5c (GSM)
iPhone5,3_9.3_13E233_Restore.ipsw
iPhone 4S
iPhone4,1_9.3_13E233_Restore.ipsw
iPad Pro 12"
iPad6,7_9.3_13E233_Restore.ipsw
iPad Pro 12" (LTE Cellular)
iPad6,8_9.3_13E233_Restore.ipsw
iPad Pro 9" model
iPad6,3_9.3_13E234_Restore.ipsw
iPad Pro 9" model (LTE Cellular)
iPad6,4_9.3_13E234_Restore.ipsw
iPad Air 2
iPad5,3_9.3_13E233_Restore.ipsw
iPad Air 2 (LTE Cellular)
iPad5,4_9.3_13E233_Restore.ipsw
iPad Air (5th generation Cellular)
iPad4,2_9.3_13E233_Restore.ipsw
iPad Air (5th generation)
iPad4,1_9.3_13E233_Restore.ipsw
iPad Air (5th generation China)
iPad4,3_9.3_13E233_Restore.ipsw
iPad (4th generation CDMA)
iPad3,6_9.3_13E233_Restore.ipsw
iPad (4th generation GSM)
iPad3,5_9.3_13E233_Restore.ipsw
iPad (4th generation)
iPad3,4_9.3_13E233_Restore.ipsw
iPad 3 Wi-Fi (3rd generation)
iPad3,1_9.3_13E233_Restore.ipsw
iPad 3 Wi-Fi + Cellular (GSM)
iPad3,3_9.3_13E233_Restore.ipsw
iPad 3 Wi-Fi + Cellular (CDMA)
iPad3,2_9.3_13E233_Restore.ipsw
iPad 2 Wi-Fi (Rev A)
iPad2,4_9.3_13E233_Restore.ipsw
iPad 2 Wi-Fi
iPad2,1_9.3_13E233_Restore.ipsw
iPad 2 Wi-Fi + 3G (GSM)
iPad2,2_9.3_13E233_Restore.ipsw
iPad 2 Wi-Fi + 3G (CDMA)
iPad2,3_9.3_13E233_Restore.ipsw
iPad Mini (CDMA)
iPad2,7_9.3_13E233_Restore.ipsw
iPad Mini (GSM)
iPad2,6_9.3_13E233_Restore.ipsw
iPad Mini
iPad2,5_9.3_13E233_Restore.ipsw
iPad Mini 2 (Cellular)
iPad4,5_9.3_13E233_Restore.ipsw
iPad Mini 2
iPad4,4_9.3_13E233_Restore.ipsw
iPad Mini 2 (China)
iPad4,6_9.3_13E233_Restore.ipsw
iPad Mini 3 (China)
iPad4,9_9.3_13E233_Restore.ipsw
iPad Mini 3
iPad4,7_9.3_13E233_Restore.ipsw
iPad Mini 3 (Cellular)
iPad4,8_9.3_13E233_Restore.ipsw
iPad Mini 4
iPad5,1_9.3_13E233_Restore.ipsw
iPad Mini 4 (Cellular)
iPad5,2_9.3_13E233_Restore.ipsw
iPod touch (5th-generation)
iPod5,1_9.3_13E233_Restore.ipsw
iPod touch (6th-generation)
iPod7,1_9.3_13E233_Restore.ipsw
The binaries that were build 13E234 were for the iPhone 6s, 6s Plus, and iPad Pro 9" devices.
By running instruments -s devices, you get a list of connected devices as well as virtual simulator devices:
Known Devices:
your.mac [uuid]
Physical Device 1 (9.1) [uuid] <--- unknown device type
Physical Device 2 (9.0) [uuid] <--- unknown device type
Apple TV 1080p (9.0) [uuid]
Apple Watch - 38mm (2.0) [uuid]
Apple Watch - 38mm (2.0) [uuid]
Apple Watch - 42mm (2.0) [uuid]
Apple Watch - 42mm (2.0) [uuid]
iPad 2 (9.1) [uuid]
iPad Air (9.1) [uuid]
iPad Air 2 (9.1) [uuid]
iPad Pro (9.1) [uuid]
iPad Retina (9.1) [uuid]
iPhone 4s (9.1) [uuid]
iPhone 5 (9.1) [uuid]
iPhone 5s (9.1) [uuid]
iPhone 6 (9.1) [uuid]
iPhone 6 Plus (9.1) [uuid]
iPhone 6s (9.1) [uuid]
iPhone 6s (9.1) + Apple Watch - 38mm (2.0) [uuid]
iPhone 6s Plus (9.1) [uuid]
iPhone 6s Plus (9.1) + Apple Watch - 42mm (2.0) [uuid]
The problem is that I can't tell what kind of device is listed on the physical devices. The only thing you really get is the OS version, but there's no way to use this since iOS and tvOS versions are so similar.
Is there any way to lookup a device type based off of a UUID? Or another way to list devices + device types?
Note: Using xcrun simctl doesn't do me any good since I don't care about the simulator, just the physical devices that are connected.
I'm running some test code on the simulator but need to reset the simulator contents each time before runs to make sure the data stored and cached by the app during execution is removed before each re-run of the test cases.
Is there a way to do this from within the tests?
You can use simctl to reset your simulators from the command line, which you could use in a script in your actions to run before a test scheme, but not individual test cases. You need to install the xcode command line tools
to reset the simulator use :
xcrun simctl erase <simulator device id>
to get the device ID you use :
$ xcrun simctl list devices
== Devices ==
-- iOS 10.2 --
iPhone 5 (D226CF12-6782-4D7D-9C00-2D662CF4022C) (Shutdown)
iPhone 5s (34E0E0F8-3429-4D91-B038-ECF4FD0F3311) (Shutdown)
iPhone 6 (9C772A68-34E3-4F3F-981C-543DE6D5D985) (Shutdown)
iPhone 6 Plus (7848A50E-BFB5-4F19-BB31-4A56CA78AA2C) (Shutdown)
iPhone 6s (12CF89BA-C8B2-4837-B4EB-FB24DFF1622C) (Shutdown)
iPhone 6s Plus (3EE6CA84-8F12-4A5E-A31D-EF4BF3CCBDB2) (Shutdown)
iPhone 7 (1EB3CE5D-849C-491C-9CAA-5E97B1BD89CE) (Booted)
iPhone 7 Low Disk Space (6CCF4C7A-606B-40B7-A8D8-DF8B3CB119CB) (Shutdown)
iPhone 7 Plus (94FEFD36-6EFF-4762-BD21-79B1F958F6C6) (Shutdown)
iPhone SE (E8E8ECEB-34C0-44F0-B92E-57DCA91024F1) (Shutdown)
iPad Retina (0DA5BF39-3DC7-49B3-BE9B-2FA756FCA725) (Shutdown)
iPad Air (DAB9C2D3-8EBC-41DC-9C2D-0ECEC1D2FAE3) (Shutdown)
iPad Air 2 (1E2DA170-5C2E-413C-831B-FA65524643D3) (Shutdown)
iPad Pro (9.7 inch) (99F931A9-0708-4637-9294-6420DC7A149C) (Shutdown)
iPad Pro (12.9 inch) (08CD02EB-C44A-4183-961A-EED89FF1C225) (Shutdown)
-- tvOS 10.1 --
Apple TV 1080p (7EE393F2-C83E-467F-9802-3E5BFE7C2CA9) (Shutdown)
-- watchOS 3.1 --
Apple Watch - 38mm (B8969533-D7CD-462E-9E76-511C08E8CC8E) (Shutdown)
Apple Watch - 42mm (E16167D9-1007-438B-8812-CD97CE6ABECA) (Shutdown)
Apple Watch Series 2 - 38mm (F59C0BB1-B4D0-47DD-B927-1BFD78DD78C0) (Shutdown)
Apple Watch Series 2 - 42mm (7FE3AADD-94AB-46B9-A057-78F20F030999) (Shutdown)
Device IDs remain constant I think until they're deleted or recreated, it would probably be possible to retrieve the device id of the booted simulator using some scripting magik (which I haven't yet worked out), the current active simulator is always marked as (Booted)
You can also use simctl to create custom simulators, just use xcrun simctl to list all the stuff it does.
You could use LUA script to do this with your automated testing. Have a look at http://www.coronalabs.com/blog/2011/08/11/automated-testing-on-mobile-devices-part4/ for detailed instructions.
Basically you will have lua use events to reset it.