Как найти BundleID для iOS приложений.

Когда вы работаете с iOS приложениями и создаете политики\конфигурации для iOS приложений, иногда вы сталкиваетесь с тем, что вам нужно знать идентификатор приложений, который называется BundleID. Например, это требуется для создания Compliance policy.

Если вы захотите найти этот BundleID, то у вас есть несколько вариантов. Для примера, давайте рассмотрим приложение Microsoft Outlook for iOS.

Вариант 1 – через Apple App Store.

Наше приложение находится в App Store по адресу https://apps.apple.com/us/app/microsoft-outlook/id951937596

Из этого адреса нам нужен ID приложения – 951937596. Это не BundleID, это просто ID приложения в App Store.

Для того, чтобы преобразовать ID в BundleID, нам нужно использовать сервис от Apple. Чтобы это сделать, нам нужно перейти по ссылке https://itunes.apple.com/lookup?id=951937596. Это позволяет нам скачать всю информацию о приложении в виде файла. Содержимое его будет примерно таким:

{
“resultCount”:1,
“results”: [
{“isGameCenterEnabled”:false,
“screenshotUrls”:[
https://is3-ssl.mzstatic.com/image/thumb/PurpleSource124/v4/82/f0/80/82f080df-22dd-504a-49e7-122cfcce8d85/c3956bab-6653-461f-a097-0cc5bca45ded_iPhone5.5_01-Upcoming.png/392x696bb.png”,
https://is4-ssl.mzstatic.com/image/thumb/PurpleSource114/v4/16/cc/6d/16cc6d22-ee5e-d6dd-81e3-ea0c84335d7d/e94f2d33-7853-42f2-8eab-bc00bfbaf4e8_iPhone5.5_02-Calendar.png/392x696bb.png”,
https://is5-ssl.mzstatic.com/image/thumb/PurpleSource124/v4/d6/db/a5/d6dba5e5-d2cf-fbce-8e91-52901bf2dc94/01b17e25-085f-4e2b-a7aa-6a682146194c_iPhone5.5_03-Search.png/392x696bb.png”,
https://is1-ssl.mzstatic.com/image/thumb/PurpleSource124/v4/dd/2c/ec/dd2cec21-7656-a372-a976-a383d6eb5adb/106711dd-824e-43dd-9fbe-363ce8b13046_iPhone5.5_04-Left-Nav.png/392x696bb.png”,
https://is3-ssl.mzstatic.com/image/thumb/PurpleSource124/v4/1a/cc/aa/1accaa36-52d9-2982-e796-fc2ba07a94ae/a19a10b3-9332-4eda-a977-151509283711_iPhone5.5_05-Report-Junk.png/392x696bb.png”,
https://is1-ssl.mzstatic.com/image/thumb/PurpleSource114/v4/61/aa/3f/61aa3fae-367d-4331-54e3-64e651d20b63/d0a14b1b-980f-4b7b-b4f5-bd31042c6948_iPhone5.5_06.png/392x696bb.png”,
https://is3-ssl.mzstatic.com/image/thumb/PurpleSource124/v4/1a/71/8f/1a718f1f-e773-9453-3f84-a5610b31bf6d/6b95951d-2c30-479c-b09f-5ceaa84d70ae_iPhone5.5_07.png/392x696bb.png”,
https://is2-ssl.mzstatic.com/image/thumb/PurpleSource124/v4/0e/8c/bc/0e8cbccf-f9a0-ca64-6272-ac958bccb7f7/abb318df-60f4-444b-af8d-2e448bc56f7a_iPhone5.5_08.png/392x696bb.png”,
https://is5-ssl.mzstatic.com/image/thumb/PurpleSource114/v4/20/73/16/2073168f-d80b-96a3-b00c-c2a38ab9d040/940d06fc-7f56-44bf-baa2-4b10756f65c6_iPhone5.5_09.png/392x696bb.png”,
https://is5-ssl.mzstatic.com/image/thumb/PurpleSource114/v4/f2/ac/77/f2ac77e5-3f68-67b7-2782-31ed525a082a/ec68db0a-c550-437a-a7f1-c421941c0ef8_iPhone5.5_10.png/392x696bb.png”%5D,
“ipadScreenshotUrls”:[
https://is5-ssl.mzstatic.com/image/thumb/PurpleSource114/v4/b4/f7/2a/b4f72adc-e209-ce2d-a37c-2ba4982c4ca0/6b43cfdb-4da9-4aba-9368-bda41181bac7_iPadPro_01-Inbox.png/552x414bb.png”,
https://is5-ssl.mzstatic.com/image/thumb/PurpleSource124/v4/c3/87/b2/c387b204-5098-aec7-3bd7-a6e5cca9f1c4/05bff440-a05a-46c0-abad-49bfb23b2d06_iPadPro_02-Week_View.png/552x414bb.png”,
https://is5-ssl.mzstatic.com/image/thumb/PurpleSource114/v4/88/64/f8/8864f84b-70f0-16c7-9cdf-fc26fe538a95/80a97e80-0865-4ceb-bea1-64355c0588b1_iPadPro_03-Search.png/552x414bb.png”,
https://is1-ssl.mzstatic.com/image/thumb/PurpleSource124/v4/c7/b0/8e/c7b08e04-febe-fe17-bf66-5cc594031adc/64679712-9237-4801-988a-b5b19d0fa622_iPadPro_04-Left_Nav.png/552x414bb.png”,
https://is4-ssl.mzstatic.com/image/thumb/PurpleSource114/v4/63/7b/8d/637b8de0-d30f-b2d4-a373-5786d614bc2d/02f6195d-5caf-43f6-b06a-b7283801b198_iPadPro_05-Split-View.png/552x414bb.png”,
https://is3-ssl.mzstatic.com/image/thumb/PurpleSource114/v4/db/22/81/db2281d0-a0f1-0909-7a6a-303e890eb938/983ae783-c52c-4e62-b632-e010118d93a6_iPadPro_06.png/552x414bb.png”,
https://is2-ssl.mzstatic.com/image/thumb/PurpleSource124/v4/b1/c4/e0/b1c4e095-1f68-956c-4c3b-3656e3f04a75/010a338d-56e7-461b-9301-1c8f34f6939a_iPadPro_07.png/552x414bb.png”,
https://is2-ssl.mzstatic.com/image/thumb/PurpleSource124/v4/b5/8c/22/b58c2212-1a8d-42eb-53b6-8ad4d8065a8f/b282b6a5-20a0-4d9b-8149-198a4b824372_iPadPro_08.png/552x414bb.png”,
https://is4-ssl.mzstatic.com/image/thumb/PurpleSource124/v4/40/be/2c/40be2c5d-ee2c-6d46-4c8f-2d87fbdd0fb1/4a2cc710-66f4-4407-8b96-c8eabacb317b_iPadPro_09.png/552x414bb.png”,
https://is5-ssl.mzstatic.com/image/thumb/PurpleSource114/v4/fa/60/35/fa60357d-a6e2-93ea-8d16-e1455958db44/b15bdcf0-f2fc-426f-9a3b-b9ebdc5c1a80_iPadPro_10.png/552x414bb.png”%5D, “appletvScreenshotUrls”:[], “artworkUrl60″:”https://is4-ssl.mzstatic.com/image/thumb/Purple114/v4/1f/aa/59/1faa592c-31f0-5d22-d162-e99e8253034d/source/60x60bb.jpg”, “artworkUrl512″:”https://is4-ssl.mzstatic.com/image/thumb/Purple114/v4/1f/aa/59/1faa592c-31f0-5d22-d162-e99e8253034d/source/512x512bb.jpg”, “artworkUrl100″:”https://is4-ssl.mzstatic.com/image/thumb/Purple114/v4/1f/aa/59/1faa592c-31f0-5d22-d162-e99e8253034d/source/100x100bb.jpg”, “artistViewUrl”:”https://apps.apple.com/us/developer/microsoft-corporation/id298856275?uo=4″,
“supportedDevices”:[“iPadMini3Cellular-iPadMini3Cellular”, “iPodTouchSixthGen-iPodTouchSixthGen”, “iPadSeventhGen-iPadSeventhGen”, “iPad878-iPad878”, “iPhone11-iPhone11”, “iPhone7-iPhone7”, “iPadMiniRetina-iPadMiniRetina”, “iPadAir-iPadAir”, “iPadMini5Cellular-iPadMini5Cellular”, “iPadMini3-iPadMini3”, “iPadProFourthGen-iPadProFourthGen”, “iPad611-iPad611”, “iPadSeventhGenCellular-iPadSeventhGenCellular”, “iPadProSecondGenCellular-iPadProSecondGenCellular”, “iPad834-iPad834”, “iPadAir3-iPadAir3”, “iPadMini4-iPadMini4”, “iPhone7Plus-iPhone7Plus”, “iPad72-iPad72”, “iPadAir2Cellular-iPadAir2Cellular”, “iPadProSecondGen-iPadProSecondGen”, “iPadProCellular-iPadProCellular”, “iPhone6-iPhone6”, “iPhone6s-iPhone6s”, “iPad856-iPad856”, “iPhoneX-iPhoneX”, “iPad73-iPad73”, “iPad74-iPad74”, “iPadProFourthGenCellular-iPadProFourthGenCellular”, “Watch4-Watch4”, “iPhone6Plus-iPhone6Plus”, “iPhone8Plus-iPhone8Plus”, “iPhone11Pro-iPhone11Pro”, “iPhoneXSMax-iPhoneXSMax”, “iPadMiniRetinaCellular-iPadMiniRetinaCellular”, “iPadPro97-iPadPro97”, “iPadAir2-iPadAir2”, “iPad71-iPad71”, “iPadAirCellular-iPadAirCellular”, “iPad812-iPad812”, “iPadMini5-iPadMini5”, “iPad75-iPad75”, “iPadAir3Cellular-iPadAir3Cellular”, “iPodTouchSeventhGen-iPodTouchSeventhGen”, “iPadPro97Cellular-iPadPro97Cellular”, “iPhoneXS-iPhoneXS”, “iPhone11ProMax-iPhone11ProMax”, “iPad612-iPad612”, “iPadPro-iPadPro”, “iPhone5s-iPhone5s”, “iPhone6sPlus-iPhone6sPlus”, “iPadMini4Cellular-iPadMini4Cellular”, “iPad76-iPad76”, “iPhoneXR-iPhoneXR”, “iPhone8-iPhone8”, “iPhoneSE-iPhoneSE”, “iPhoneSESecondGen-iPhoneSESecondGen”], “advisories”:[], “features”:[“iosUniversal”], “kind”:”software”, “trackCensoredName”:”Microsoft Outlook”,
“languageCodesISO2A”:[“AF”, “SQ”, “AM”, “AR”, “AZ”, “EU”, “BS”, “BG”, “KM”, “CA”, “ZH”, “HR”, “CS”, “DA”, “NL”, “EN”, “ET”, “FI”, “FR”, “GL”, “DE”, “EL”, “GU”, “HE”, “HI”, “HU”, “IS”, “ID”, “GA”, “IT”, “JA”, “KN”, “KK”, “KO”, “LO”, “LV”, “LT”, “MK”, “MS”, “ML”, “MR”, “NB”, “NN”, “FA”, “PL”, “PT”, “RO”, “RU”, “SR”, “ZH”, “SK”, “SL”, “ES”, “SV”, “TA”, “TE”, “TH”, “ZH”, “TR”, “UK”, “UR”, “VI”], “fileSizeBytes”:”316648448″, “contentAdvisoryRating”:”4+”, “averageUserRatingForCurrentVersion”:4.668440000000000367208485840819776058197021484375, “userRatingCountForCurrentVersion”:1265741, “averageUserRating”:4.668440000000000367208485840819776058197021484375, “trackViewUrl”:”https://apps.apple.com/us/app/microsoft-outlook/id951937596?uo=4″, “trackContentRating”:”4+”, “trackId”:951937596, “trackName”:”Microsoft Outlook”, “primaryGenreName”:”Productivity”, “isVppDeviceBasedLicensingEnabled”:true, “releaseDate”:”2015-01-29T05:22:59Z”, “genreIds”:[“6007”, “6000”], “formattedPrice”:”Free”, “minimumOsVersion”:”12.0″, “currentVersionReleaseDate”:”2020-07-14T22:44:57Z”,
“releaseNotes”:”This update includes performance improvements and bug fixes to make Outlook better for you.\n\nFeel free to send us any comments or questions by going to Settings > Help & Feedback – we’d love to hear from you.”, “primaryGenreId”:6007, “sellerName”:”Microsoft Corporation”, “currency”:”USD”,
“description”:”Outlook lets you bring all your email accounts and calendars in one convenient spot. Whether it’s staying on top of your inbox or scheduling the next big thing, we make it easy to be your most productive, organized, and connected self.\n\nHere’s what you’ll love about Outlook for iOS:\n\n- Focus on the right things with our smart inbox – we help you sort between messages you need to act on straight away and everything else.\n\n- Swipe to quickly schedule, delete and archive messages.\n\n- Share your meeting availability with just a tap and easily find times to meet with others.\n\n- Find everything you’re looking for with our new search experience, including files, contacts, and your upcoming trips.\n\n- View and attach any file from your email, OneDrive, Dropbox, and more, without having to download them to your phone.\n\n- Bring all the apps you love in Outlook, including Facebook, Evernote, Trello, and more.\n\n- Open Word, Excel, or other Office document attachments to edit them directly in the corresponding app and attach them back to an email.\n\n–\n\nOutlook for iOS works with Microsoft Exchange, Office 365, Outlook.com (including Hotmail and MSN), Gmail, Yahoo Mail, and iCloud.\n\n–\n\nTo make an in-app purchase of a Microsoft 365 Family or Personal subscription, open the app, go to Settings, and tap on Upgrade next to your Outlook.com or Hotmail.com account. Subscriptions begin at $6.99 a month in the US, and can vary by region. With a Microsoft 365 subscription, you get 1TB of storage for each user, access to all features in Word, Excel, and PowerPoint on iPad, iPhone, and iPod touch, and you can install Word, Excel, PowerPoint, Outlook and OneNote on PCs or Macs.\n\nMicrosoft 365 subscriptions purchased from the app will be charged to your iTunes account and will automatically renew within 24 hours prior to the end of the current subscription period, unless auto-renewal is disabled beforehand. To manage your subscriptions or to disable auto-renewal, after purchase, go to your iTunes account settings. A subscription cannot be cancelled during the active subscription period. Any unused portion of a free trial period, if offered will be forfeited when the user purchases a subscription to that publication, where applicable.\n\nPrivacy and Cookies: https://go.microsoft.com/fwlink/?LinkId=521839\nTerms of Use: http://go.microsoft.com/fwlink/?LinkID=530144″, “artistId”:298856275, “artistName”:”Microsoft Corporation”, “genres”:[“Productivity”, “Business”], “price”:0.00, “bundleId”:”com.microsoft.Office.Outlook”, “version”:”4.46.0″, “wrapperType”:”software”, “userRatingCount”:1265741}]
}

И вот тут мы уже получаем BundleId – com.microsoft.Office.Outlook
Но это неудобно, поэтому попробуем немного упростить все через PowerShell.

Вариант 2 – PowerShell

Тут нам поможет несколько простых команд.

# Add application ID from Apple App Store here. ID can be found in App store link. Example - https://apps.apple.com/us/app/microsoft-outlook/id951937596 
$id = "951937596"

#Form URI for request
$URI = "https://itunes.apple.com/lookup?id=" + $id

#Send request
$Req = Invoke-WebRequest -Uri $URI

#Parse result
$Req.tostring() -split "[`r`n,]" | select-string "bundleId"

И в выводе этих команд мы получим искомые “bundleId”:”com.microsoft.Office.Outlook”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: