Attempt to present UIViewController on UIViewController whose view is not in the window hierarchy

Where are you calling this method from? I had an issue where I was attempting to present a modal view controller within the viewDidLoad method. The solution for me was to move this call to the viewDidAppear: method. My presumption is that the view controller’s view is not in the window’s view hierarchy at the point that it has been loaded … Read more

Xcode couldn’t find any provisioning profiles matching

I am now able to successfully build. Not sure exactly which step “fixed” things, but this was the sequence: Tried automatic signing again. No go, so reverted to manual. After reverting, I had no Eligible Profiles, all were ineligible. Strange. I created a new certificate and profile, imported both. This too was “ineligible”. Removed the … Read more

react-native: command not found

After adding right path to the PATH variable issue is resolved. Below are the steps to find the right path. from above output you can clearly see the path: /usr/local/Cellar/node/6.1.0/libexec/npm/bin/react-native if you getting xcrun: error: unable to find utility “simctl” at this stage you can reslove using below steps XCode -> Preferences -> Locations -> Command Line Tools … Read more

Xcode – How to fix ‘NSUnknownKeyException’, reason: … this class is not key value coding-compliant for the key X” error?

Your view controller may have the wrong class in your xib. I downloaded your project. The error you are getting is ‘NSUnknownKeyException’, reason: ‘[<UIViewController 0x3927310> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key string.’ It is caused by the Second view controller in MainWindow.xib having a class of UIViewController instead of SecondView. Changing to the correct class resolves the … Read more

Swift 4 Attempt to present ViewController whose view is not in the window hierarchy

This issue happens due to your view hierarchy. You need to find out what is your Current/Topmost view controller in view hierarchy and present your alert over it. To find out topmost view controller use following code: And present your alert over topmost view controller and use main thread to present an alert because closures may have … Read more

Xcode 10, Command CodeSign failed with a nonzero exit code

Everytime I build console is showing this message. CodeSign /Users/admin/Desktop/AppStoreBuild/Project201/build/Debug-iphonesimulator/Project.app (in target: Desker) cd /Users/admin/Desktop/AppStoreBuild/Project201 export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate Signing Identity: “-“ /Users/admin/Desktop/AppStoreBuild/Project201/build/Debug-iphonesimulator/Project.app: resource fork, Finder information, or similar detritus not allowed Command CodeSign failed with a nonzero exit code … Is there any way to identify the cause of this failure. It’s showing Signing Identity: “-” when … Read more