- Developer ID signed OS X app crashes on start with Code Signature Invalid
- 2 Answers 2
- Question: Q: App crashes with «Code Signature Invalid» in Big Sur
- Helpful answers
- Invalid code signature problem with Xcode12
- Answers
- Проверка цифровой подписи приложений в Mac OS X
- Автоматическая проверка цифровой подписи.
- Проверка подписей вручную
Developer ID signed OS X app crashes on start with Code Signature Invalid
I’m trying to build my app such that I can share it with testers. My app specifies entitlements (iCloud) so I have to sign it. To distribute a signed build I think I need to sign it using ‘Developer ID’, which I’ve done. The app package appears to be signed correctly — running:
But when I run the app it crashes — a ‘Code Signature Invalid’ exception.
So why does it crash? I think I need to include the provisioning profile I’ve created which includes the UUID’s for my tester’s machines, but when I try to export the ‘Developer ID-signed Application’ from Xcode it always lists the provisioning profile as ‘None’, and there’s no way to change it. What am I doing wrong?
2 Answers 2
I figured out that I was misunderstanding a bunch of things.
Firstly — I’m pretty sure it crashes because although the code signature is valid, I’m trying to use features (iCloud) which are only available to apps downloaded from the app store; the app needs to be signed by Apple to run.
Secondly — Developer ID-signed apps don’t use provisioning profiles; these are production-ready apps for actual distribution outside of the app store (so long as they don’t use app-store only features).
So how do I share a build so that testers can run it and use its iCloud features? The answer is I build a development build as I normally do, signed as a developer, but create a matching provisioning profile including the UUIDs of my tester’s machines. I then export the archived app using ‘Export as Mac Application’. Both the app AND the profile need to be passed on to testers — they can install the profile by simply double-clicking on it to bring up the profile manager.
This took me a few hours to figure out — I don’t think it’s clear from the doc quite how all these things relate, so I hope this is useful to someone! 😉
Источник
Question: Q: App crashes with «Code Signature Invalid» in Big Sur
Since I have upgraded to Big Sur, almost every app on the machine will crash upon first opening it. The error message is like that below (the example is Chrome, but it happens on all Apps).
The crash log for every single app is IDENTICAL:
The whole machine hangs until this message appears. I can then hit OK to dismiss the log, and reopen the App, and the app works fine from then on. It doesn’t matter if the machine has just been rebooted, or running for a while.
This happens for every app I open, so it can take 10 minutes to open all the items I need to work.
The machine is running fine other than this. Can anyone help?
iMac Line (2012 and Later)
Posted on Mar 3, 2021 1:46 AM
Helpful answers
I had similar problems with non Apple applications and finally opened up support ticket with Intego. They had me update to VirusBarrier 10.9.41 and this issue has been resolved.
Mar 31, 2021 12:39 PM
I’ve also open a ticket at Intego and they react quickly with indeed the update of VirusBarrier that solve problem on my Microsoft 365 suite.
Mar 31, 2021 1:18 PM
There’s more to the conversation
Loading page content
Page content loaded
Are All the Apps in question Third Party Apps ? Or does this happen even on Apple Apps too ?
Mar 3, 2021 2:25 AM
Do you know, I hadn’t thought to log / check that.
From recent (last couple of days) memory, apps affected included: MS Office (All), Chrome & Brave browsers, Blender, Amazon Music, Parallels Desktop, Citrix Workspace, WhatsApp Desktop, Zoom, Skype.
The Apple apps I most use are Safari, Calendar, Screen Sharing, Music and Photos. I’m racking my brains, but I have to say I don’t remember if they have been affected or not. It’s become so intrusive, that I stopped noticing which particular apps crashed which time.
If it is just 3rd party apps, doesn’t the fact that it is across such a wide range of providers indicate it’s an Apple issue? Especially if Apple apps are not affected? [now I’ll have to keep a paper log of which ones failed 🙁 ]
Mar 3, 2021 3:58 AM
You could do that, OR get a real under-the-hood look at both Hardware and Software analysis — excellent App from a Very Trusted Developers and frequent Contributor to these Forums — EtreCheck Free Trial. Once installed — you need to give it Full Disk Access via Security & Privacy in System Preferences ( Full Disk Access ). The app will analyze the total system — it Does Not collect or Reveal any Personal Information. It will produce a Report that can then posted in this Tread by using the » Additional Text » icon below ( 3rd icon from last ). This way, we ( I ) and others with even more experience can review and offer possible Solutions / insights.
Mar 3, 2021 4:12 AM
I’ve added the EtreCheck report above. Note: The unsigned apps are all from my Windows and Ubuntu VM’s, so can be ignored.
Mar 3, 2021 7:10 AM
The very first thing that Jumps at me is » Intego » AV and » NetBarrier » with their extensions installed — Effective defenses against malware and other threats. It is strongly suggested to Remove them as per Developers Instructions. The link provided should answer question that may arise as to their effectiveness and or need. Without this $%^&ware — you may find some apps will stop playing up as much if at all.
Mar 3, 2021 7:32 AM
I’ve been using Intego AV for many years, and it has never had an adverse affect on the Mac as far as I have seen. I want to reiterate, that this behaviour only commenced after the install of Big Sur. I’ve been using Mac’s since 2006, and this is this is the first time I’ve seen such wide-spread misbehaviour from the OS. I also don’t see the interaction between the AV and Code Signing issue in the crash logs, although I’m beginning to think that the specific error thrown is a red herring.
I come from an IT development background (25 years experience), so although the information in the link you’ve provided is sound, it’s not news to me and I’ve followed such good practice on my many machines over the years.
I do appreciate you taking the time out to look at this, and in particular for the pointer to EtreCheck, which is a neat bit of software.
I’ve also tried running Disk Utility First Aid / Repair (both direct and in recovery mode), but no errors are reported. Other than the crashes, the iMAC behaves flawlessly.
Mar 3, 2021 7:54 AM
Sorry- hit to fast. should also say that the same occurred on my MacBook when I upgraded to Big Sur on that. The Macs in the house that are too old to upgrade to Big Sur are all on Catalina, and are 100% fine with pretty much the same application load-out.
Mar 3, 2021 7:56 AM
From experience, it has taught many on these Forums — including myself — Any Third Party AV software is not required nor beneficial to the macOs System. It interfere with the Normal Operation, causes havoc and can and has corrupted to OS.
Mar 3, 2021 8:20 AM
I’m on 11.2.2 and I have exactly the same issue, except my list of apps seems more limited VMWARE Fusion 12 Pro does it every time, MS Office 365 does I most times, Chrome does it occasionally.
The weird thing is in all cases simply clicking the app icon a second time fixes the issue.
Come on — lets get a fix to this.
Mar 8, 2021 2:18 PM
With my deep respect, I have more than 20 years of experience in the field of information security, working with SOC and CSIRT teams, and providing support to clients to ensure compliance and protection of their information within their company. I have seen that Windows does not have a monopoly on malware even though it is the primary infected platform (inevitably when you represent over 90% of the ICT population. ). If indeed following the good practices mentioned in your link allows avoiding several infections, there is always a risk. A risk that I feel I should mitigate.
In the case that is mentioned, and which particularly impacts me for Microsoft Office 365 applications (Word, Excel, Powerpoint, Teams, Edge), I have a little difficulty in making the link between a protection system against the risks of malware infection of all types and the invalid signature error unless and that is perhaps if the signature control depends on a connection to an Apple server and that the protection software (firewall) would cause a connection latency not foreseen in the signature control processes.
What’s more, I don’t experience this problem on an older machine protected by the same solution, which also uses the same Microsoft Office 365 applications, but due to its age, only runs an older version of MacOs, the HighSierra version.
As cambsGooner mentions below «let’s get a fix to this.» but I’m a bit afraid due to the fact there is no reaction since the last post of March 8.
Источник
Invalid code signature problem with Xcode12
I’m practicing a swift 5 class, and have this issue:
Could not launch “I AM RICH”
Failure Reason: The operation couldn’t be completed. Unable to launch com.superdie.I-AM-RICH because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user.
RawLLDBErrorMessage = «The operation couldn\U2019t be completed. Unable to launch com.superdie.I-AM-RICH because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user.»;
I’m not sure what can I do, some help would be nice 🙂
Hello there, I am currently on iOS 15 beta. When I deploy the app for debugging, it also shows «invalid signature», but I can’t find «Trust» in Device Management. Can somebody please help me?
Did you find the solution to this, encountering this same issue
Device Management is when you are in a MDDM environment. If the problem is the same as for the initial post, you should open the project in Xcode, select the project name (blue icon), select «TARGEYS» go to signing and capabilities Tab and check information there.
Answers
I found the solution. Go to your Iphone Settings -> General -> Device Management and «trust» yourself as developer.
I hope it fixes your issue. I did to me.
thanks, it worked for me
Great !! Good work.
I found the solution. Go to your Iphone Settings -> General -> Device Management and «trust» yourself as developer.
I hope it fixes your issue. I did to me.
Thank you, Worked for me!
you can find same option VPN & Device Management select the option then you will find your Xcode email click on it and press trust. hope this will be helpful
hi everyone . it also gives me the following error message when i try to install my app from xcode to my iphone 11:
I don’t understand what’s going on .
I tried to go to settings> general> VPN and device management but I have nothing inside it I only have the possibility to log in with a work or school account and nothing else .. my app does not appear in the VPN and device management section therefore I cannot authorize anything .
how can i solve?
I have same problem, my ios15, xcode13, iphone x
Same issue I am faving. There is not any option to trust the developer to allow anything.
Same problem here.. after update iPhone and iPad updated to Version 15 and Xcode to version 13.. Tried from imac and from MacBookPro..
Creating a new Apple Dev ID works, but this isn’t really an option..
Perhaps someone from Apple could gibe a hint, as they didn’t answer on mail requests either..
Did you find a solution?
Actually installing own Xcode created Cert on iOS 15 seam not to work any more, still got the error also after installing the cert.
Источник
Проверка цифровой подписи приложений в Mac OS X
Один из способов, которым может воспользоваться злоумышленник, чтобы получить доступ к данным на вашем Маке или иным образом попортить вам нервы — изменить дистрибутив какой-либо распространенной программы, которая редко вызывает подозрения у пользователей, и добавить в него вредоносное ПО. И хотя этот трюк вряд ли удастся провернуть с официальными источниками, такими как Mac App Store, подобный софт часто можно встретить на различных файлообменниках, торрент-трекерах и прочих сайтах, предлагающих альтернативные варианты загрузки программ.
Злоумышленники с удовольствием используют для этих целей старые версии iWork и Xcode, предлагая загрузить их в обход официальных серверов Apple, а также могут попытаться внедрить вредоносный код и во встроенные приложения, такие как Safari. Такие изменения зачастую приводят к нестабильной работе программ, чем в конечном итоге себя и выдают, однако, так происходит не всегда.
К счастью, на данный момент для большинства популярных приложений в Mac OS X, которые продолжают развиваться и поддерживаться разработчиками, используется цифровая подпись. Она представляет собой код, который генерируется индивидуально для каждой программы с использованием информации о количестве файлов в пакете приложения, их размере, контрольной сумме и прочих подобных деталей.
Цифровая подпись может быть проверена как автоматически, так и вручную, чтобы убедиться, что установленная программа не была изменена или иным образом скомпрометирована.
Автоматическая проверка цифровой подписи.
Встроенный в Mac OS X сервис GateKeeper создан как раз для того, чтобы проверять цифровую подпись приложений и в случае обнаружения проблем препятствовать их запуску. Таким образом, если вы настроите GateKeeper на максимальный уровень безопасности, вы сможете предотвратить возникновение проблем связанных с установкой подозрительного ПО.
Чтобы сделать это, откройте меню Системные настройки → Защита и безопасность → Основные и в разделе «Разрешить использование программ, загруженных из» выберите значение «App Store для Mac» (или, если вы уверены в безопасности устанавливаемых вами программ, можно выбрать «App Store для Mac и от установленных разработчиков»).
Стоит учитывать, что автоматическая проверка производится только при первом запуске приложения, и, если вы решите все-таки его запустить, несмотря на предупреждение, в дальнейшем она проводиться не будет.
Проверка подписей вручную
Проверить состояние цифровой подписи приложений вручную можно при помощи Терминала.
- Запустите Терминал из папки «Утилиты».
- Введите следующую команду: codesign —verify —verbose Поставьте после неё пробел, но пока не нажимайте клавишу ⏎Enter.
- Найдите приложение, которое вы хотите проверить в Finder и перетащите его в окно Терминала, чтобы добавить полный путь до него. В результате команда должна принять следующий вид: codesign —verify —verbose /Applications/AppName.app
- Нажмите клавишу ⏎Enter, чтобы применить введенную вами команду.
После этого в окне Терминала отобразится информация о корректности указанного вами приложения и его соответствии тем данным, что указаны в цифровой подписи. В случае с Safari, например, команда и её вывод будут выглядеть следующим образом:
Источник