Restore to a backup (if it was taken when the code wasn't on the device), or reset the device back to factory defaults (for both, first copy off anything that you want to keep) - to reset it back to factory defaults you may need to use recovery mode, there are instructions for doing that half-way down this page : If you forgot the passcode for your iPhone, iPad, or iPod touch, or your device is disabled - Apple Support
Want to highlight a helpful answer? Upvote!
Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >
Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >
Newsroom Update
Apple is introducing a new Apple Watch Pride Edition Braided Solo Loop, matching watch face, and dynamic iOS and iPadOS wallpapers as a way to champion global movements to protect and advance equality for LGBTQ+ communities. Learn more >
Apple is introducing a new Apple Watch Pride Edition Braided Solo Loop, matching watch face, and dynamic iOS and iPadOS wallpapers as a way to champion global movements to protect and advance equality for LGBTQ+ communities. Learn more >
Restore to a backup (if it was taken when the code wasn't on the device), or reset the device back to factory defaults (for both, first copy off anything that you want to keep) - to reset it back to factory defaults you may need to use recovery mode, there are instructions for doing that half-way down this page : If you forgot the passcode for your iPhone, iPad, or iPod touch, or your device is disabled - Apple Support
What is my passcode for my iPhone 6s?
Only you will know. If you can't remember follow the instructions in the link in my previous reply
forgot restrictions passcode