Unable to install app in simulator xcode 9 beta

本秂侑毒 提交于 2019-12-29 05:45:32

问题


I downloaded Xcode 9 beta recently, and when I tried to run my app in the simulator it is not getting installed. I am getting this error in my Xcode every time I try to run the app.

Any help provided will be appreciated. Thanks in advance.

P.S: Application used to work in Xcode 8.3.3


回答1:


Unfortunately, the error message doesn’t explain why the install failed. You can take a look at ~/Library/Logs/CoreSimulator/CoreSimulator.log to see if the rest of the error message is there with more info. If not, you should check out the sim device’s system log:

sudo xcode-select -s /Applications/Xcode-beta.app # if you haven’t already
xcrun simctl spawn booted log show

You can use --predicate to filter that down a bit.




回答2:


Late answer but might be that can be useful for others. I just get a project with existing watch-kit and custom keyboard code. After change the identifier i got the same error and i spend 1 day to find out why that happens.

I checked everything of bundle id and all version. then i do global search in xcode with old identifier and i found that following.

Here in both .plist file have old WKCompanionAppBundleIdentifier so after i update it with new manually application run again.

IMPORTANT NOTE:

IF YOU ARE JUST CHANGE IDENTIFIER FROM GENERAL TAB THAT DOES NOT MEAN IT UPDATE AT ALL. KINDLY CHECK WITH ALL POSSIBLE PLACES BY SEARCH AND REPLACE IT WITH NEW IDENTIFIER.

XCODE VERSIO: Version 9.0 (9A235)



回答3:


I ran into this same issue and a quick click on Product > Clean did the trick for me!




回答4:


If you are using CocoaPods in your project please have a look at this answer: https://stackoverflow.com/a/44533287/221194

Changing the status of the pods subdirectory helped me with my project.




回答5:


I had a similar issue when installing my App on the IOS simulator (with Xcode 9).

I found the issue (at least for my case), it was due to an unauthorized key (Privacy - Location When In Use Usage Description) in the info.plist of the Watch App.

I have moved this key to the info.plist of the WatchKit Extension and now the App installs again.

I hope it will help others people having the same issue.




回答6:


change deployment target as per requirement. select project > GENERAL > DEPLOYMENT TARGET also check ios version of your device




回答7:


I had the same issue. Log shows it's an error caused by Google Signin:

FunctionName=-[MobileInstallationHelperService stageItemAtURL:completion:], SourceFileLine=392, NSUnderlyingError=0x7f891e9a1270 {Error Domain=MIInstallerErrorDomain Code=4 "Failed to remove ACL" UserInfo={NSLocalizedDescription=Failed to remove ACL, FunctionName=-[MIFileManager _removeACLAtPath:isDir:error:]

However it works on iOS 9 & 10 simulator.




回答8:


I got same error and I was using Cocoapods in my project and for me help just update pods.




回答9:


I ran into this issue in Xcode 9.0 beta 5 after renaming a project that contained an iOS and watchOS app. To fix, I recreated the iOS target.




回答10:


This issue could be triggered by multiple things however if you take a look at the logs at ~/Library/Logs/CoreSimulator/CoreSimulator.log and it states an error that reads :

NSUnderlyingError=0x7fb51c271ee0 Could not hardlink copy /originPath to /destinationPath

it's possible that your Build number in your Project Target's settings is set to empty.

Go to Project Target > Identity > Build and set a Build number. You'll have to uninstall the the app in the simulator and re-install it before installing updated versions.




回答11:


Please check the bundle identifier to solve the issue.




回答12:


I had the same issue on XCode 9.3.1 when I wanted to add google map framework to my project manually.

To fix the problem I remove the google frameworks from Embedded binaries...



来源:https://stackoverflow.com/questions/44857020/unable-to-install-app-in-simulator-xcode-9-beta

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