I am trying to come up with regex to validate iOS app's bundle id. This link was quite helpful. However I also need to validate length of supplied bundleid as well as length of strings between dots (here I am assuming there would be such restrictions from Apple) . For example, in bundle id 'com.company.project' I need to ensure 'company', 'project' etc are also within in allowed limit. I tried finding any apple docs that talks about maximum allowed bundle id but I couldn't. Is it like any length is allowed? Any help appreciated.
From inspecting the HTML of the create App ID page on May 14, 2018, here are the constraints including a regular expression to validate the bundle identifier:
Name
^[0-9A-Za-z\\d\\s]+$
Bundle Identifier
^[A-Za-z0-9\\.\\-]+$
The original question was a regular expression to validate bundle identifiers, you could use this to do that:
^[A-Za-z0-9\.\-]{1,155}$
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.