Why can I install my app on iOS 14.1 but not 14.2?

霸气de小男生 提交于 2021-01-23 06:53:07

问题


Ever since installing Xcode 12.2, I can't install our app on simulators running iOS 14.2. I downloaded 14.1 and simulators running 14.1 install the app just fine. Tellingly, my coworker does not have this problem even though he's running the same version of Xcode, so a problem with my setup seems likely.

I've tried uninstalling Xcode and reinstalling. I've deleted the derivedData folder. Nothing seems to help.

The app builds just fine, but when it goes to install on a simulator running iOS 14.2, I get this popup:

When I click the "Details" button, I get the following:

Details

“Cozi” Needs To Be Updated Domain: IXUserPresentableErrorDomain Code: 4 Failure Reason: This app needs to be updated by the developer to work on this version of iOS. Recovery Suggestion: Failed to find matching arch for input file: /Users/j.r.willett/Library/Developer/CoreSimulator/Devices/662A1CB0-4E54-4DEC-8F4B-E2CA5FCB0DE8/data/Library/Caches/com.apple.mobile.installd.staging/temp.o8dPqi/extracted/iCozi-Free.app/PlugIns/NotificationService.appex/NotificationService -- Failed to find matching arch for input file: /Users/j.r.willett/Library/Developer/CoreSimulator/Devices/662A1CB0-4E54-4DEC-8F4B-E2CA5FCB0DE8/data/Library/Caches/com.apple.mobile.installd.staging/temp.o8dPqi/extracted/iCozi-Free.app/PlugIns/NotificationService.appex/NotificationService Domain: MIInstallerErrorDomain Code: 15 User Info: { FunctionName = MIMachOFileMatchesMyArchitecture; LegacyErrorString = IncorrectArchitecture; SourceFileLine = 51; } --

System Information

macOS Version 10.15.7 (Build 19H15) Xcode 12.2 (17535) (Build 12B45b) Timestamp: 2020-11-20T13:33:05-08:00

I don't see other people on StackOverflow reporting this error, so I seem to have stumbled into something a bit unique. I'd really appreciate any pointers!!

Edit 11/30/2020: Despite creating a bounty, I still haven't found any solution to this problem. My current plan is to wait or iOS 14.3 and hope that fixes the problem somehow.

Edit 12/16/2020: iOS 14.3 didn't help, but some more answers came in which led me to the solution, which you can see below. Thank you!!


回答1:


This might help someone if still not too late. The issue in my case was caused after I added NotificationService The steps: Select your project -> Targets -> NotificationService (or any name you chose). Select Build Settings -> search for VALID_ARCHS and add the value $(ARCHS_STANDARD)

Hope this helps someone struggling with the same.




回答2:


I've bumped into the same problem while trying to build Messages Extension on Xcode 12.2 for iOS 14.2.

This is how I've solved this problem:

  1. Try to set Legacy build system (File -> Workspace Settings... -> Build System -> Legacy Build System). It shows errors in better way.
  2. I've got smth like this:
  1. Removed VALID_ARCHS settings from my extension target



回答3:


@Nadzeya and @Sawib's suggestion led me to discover the fix for my situation!!

In my case, I needed to edit my project file and ADD some VALID_ARCHS parameters for my new extension, which were for some reason missing. Here's what my github desktop diff looked like:

I can finally compile again for iOS 14.2 and 14.3. Thank you @Nadzeya and @Saqib!!

I think @Saqib's answer was the closest to what I did so I marked theirs as the correct answer.




回答4:


If you look at the error a little closer you will see where it is complaining about the architecture being incorrect:

Review your project architecture settings, and try changing 'Build Active Architecture Only' to Yes on your target like so:

This is a notable bug I have encountered since updating to Xcode 12.x. If the problem persists you can begin narrowing down the specific dependency that is causing the problem.



来源:https://stackoverflow.com/questions/64937288/why-can-i-install-my-app-on-ios-14-1-but-not-14-2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!