Renaming a Project Causing Provisioning Erros - xcode

I did a major restructuring of my app, and decided the easiest way to do this, was to create a new project with a new name. After everything was working, I went in and renamed the project but now I get "A valid provisioning profile for this executable was not found."
I went into my app-info.plist and ensured that my CFBundleIdentifier is the same. I confirmed that the Project Name is the same, and that the built app is the same. I confirmed in my Build Settings that it shows my Distribution Profile.
This is the first time I've completely rewritten the app this way, is there something I've missed?

Have you tried cleaning both projects? (cmd+shift+k)

Related

Xcode custom framework not found when archiving

I know this question has been asked many times here and here and here, but I'm very frustrated that none of those answers fixes my problem!
There are 3 projects in my workspace: the app, a "custom" framework, and (Cocoa) Pods. When I run the app on a simulator or device, it works fine. When I try to archive, it fails with "ld: framework not found ".
I've tried:
Removing and adding the framework from the app's General settings
Many combinations of "(inherited)" and "(PROJECT_DIR)" in the app's Build Settings
Quitting and restarting Xcode
Deleting everything in DerivedData
Note I always run and archive from the workspace.
What's interesting is that the app runs fine whether the Run build configuration is set to "Debug" or "Release" and it gives the error whether the Archive build configuration is set to "Debug" or "Release", so I don't think it's the Build Settings. What is different about archiving?
I think this is a good clue: the Build / Products folder inside DerivedData only contains a "Debug-iphonesimulator" folder with the .framework package. Shouldn't it also contain release folder of some kind?
Any ideas or other things to try?
I had this same problem as you describe, and after much trial i managed to fix it with these steps:
Removing and adding the framework back with the "General - Frameworks - + button"
Setting this (static) framework to "do not embed"
"Product - Clean Build folder"
"Product - Archive"

IOS/Cordova Invalid Signature - A sealed resource is missing or invalid. The file at path

I am trying to publish my app on the app store but I get this error. I have no idea where it is coming from. My certifications and signing are managed automaticaly by XCode. (Select is empty because I erased it on the screenshot)
Invalid Signature - A sealed resource is missing or invalid. The file
at path [AlphaBane.app/AlphaBane] is not properly signed. Make sure
you have signed your application with a distribution certificate, not
an ad hoc certificate or a development certificate. Verify that the
code signing settings in Xcode are correct at the target level (which
override any values at the project level). Additionally, make sure the
bundle you are uploading was built using a Release target in Xcode,
not a Simulator target. If you are certain your code signing settings
are correct, choose "Clean All" in Xcode, delete the "build" directory
in the Finder, and rebuild your release target. For more information,
please consult
https://developer.apple.com/library/ios/documentation/Security/Conceptual/CodeSigningGuide/Introduction/Introduction.html
https://developer.apple.com/library/ios/documentation/Security/Conceptual/CodeSigningGuide/Introduction/Introduction.html
I started a brand new project with Cordova, and I am still facing this error. As Always, Apple error are self-explained (irony). What do I have to do to fix this error ?
Thanks
I'm seeing the same thing in a project (on Xcode 9.2) with multiple targets (different version of a single app framework) - all targets pass except one. One of my apps continued to get this error. Perfect situation to look into why this is happening. I first thought it was the signature profile (development vs distribution certificate). Check that first.
But in my case, I had a few files that were not being used by the code that I had excluded from the build. When I added these resources my build passed. Check to see that all needed resources are included in the File Inspector panel. This includes code and media resources.

Corona Enterprise Xcode proj runs in simulator, but fails to archive "app_sign cannot resign <myapp>"

I'm at the point where I'm ready to build, but when I try to archive the project I get the following error in xcode:
app_sign cannot resign
/Users/me/Library/Developer/Xcode/DerivedData/My-App-bzgdaitstcabzpaiygqfnluetfhk/Build/Intermediates/ArchiveIntermediates/App/InstallationBuildProductsLocation/Applications/My-App.app/My
App. Please remove and then build
Does anyone know why this is happening?
In build settings I've tried leaving the code signing identity blank, and tried it with the correct distribution profile.
I've tried with and without the provisioning profile specified.
I've tried deleting the whole file in my DerivedData folder.
It would seem that this is the line in question that causes the problem:
"$TOOL_PATH" app_sign sign "$SHARED_RESOURCE_DIR/developerkey.cert"
"$CORONA_RESOURCE_CAR_PATH/resource.car" "$CORONA_EXECUTABLE_PATH"
little
But I don't know enough about what it's doing here to think of the solution. If I build the sample app that comes with Corona Enterprise still builds fine, but my own app still fails.
It turned out that the problem was to do with the xcode.proj file itself. Not sure what the cause was, it seemed to be keeping a reference to a file which no longer existed, rather than the new build.
I made a new project, copied all of my own source files across but left the new proj files in, and then it built successfully.

Xcode not recognizing directory structure

I've recently downloaded GPUImage which is made up of one large directory containing the framework and various sample projects within it. Usually when I run a project it's simply one folder containing the project and everything works fine. However, when I run one of the sample projects within GPUImage, it's not recognizing the provisioning profile. When I move the sample project out of the GPUImage folder on its own, the provisioning profile error goes away, but then I get a bunch of new errors about it not being able to find the framework and other things (I messed around with moving stuff around but it turned into a disaster).
I'm wondering, is there a path somewhere that I need to change to get Xcode to work like normal when running a sample project from within the GPUImage directory so I don't get the provisioning profile error?
The problem was, somewhere along the line I deleted my team provisioning profile! Didn't realize it, but I was also unable to run any other sample projects that weren't created by me.

Xcode error: failed to launch

I have a Mac app I have written to support iCloud. However, I get this when trying to run the app:
error: failed to launch /Users/padsoftware/Library/Developer/Xcode/DerivedData/Scrawl-heofvoywsunchdhjowxkvkoiqvan/Build/Products/Release/Scrawl.app/Contents/MacOS/Scrawl
The odd thing is that this appears for all of my Mac apps, with or without iCloud, with or without sandboxing, with or without entitlements, or ever with or without code signing. Any idea on how to fix this?
I had this problem too. For me, it was a code sign issue. Make sure you're signing with developer, not distribution.
I encounter this problem every once in a while. Like the others mentioned, these are the steps I take:
1. Clean (Shift+Cmd+K) ------
Removes all the product files, as well as any object files (.o files) or other intermediate files created during the build process (Apple Doc)
2. Navigate to "~/Library/Developer/Xcode/DerivedData", delete folder for app in question ------
Derived data consists of project indexes, logs, and build products including intermediate files (Apple Doc)
3. Restart Xcode
One or the other usually fixes it. I haven't had to change Code Signing settings, but that would be my next step. Wouldn't re-install Xcode unless absolutely necessary.
I had such problem also and restarting Xcode Fixed the issue .
even it happened after renaming the application ....
Under Build Settings make sure you are signing with a valid developer profile for debug and release.
Then Build for Testing
That fixed the problem.
"Product"->"Scheme"->"New Scheme" fixed my problem
Just in case it helps anyone else, my problem was fixed by rebooting my iPhone (4S). Then the app suddenly appeared on the Springboard (it was like it was already installed but somehow hidden).
...I did all the other steps (restart Xcode, clean project, delete derived data) but none of it worked this time.
What worked for me... I was already code signed as developer so I cleaned my code
menu bar -> Product -> Clean
That still didn't fix it but I noticed that I was getting handshake error, I had a large amount of apps already running on my phone (~15-20) so I exited out of all of them and retried. It worked after exiting out of all other apps.

Resources