xcode refuse to run application on iphone something about private key - xcode4

I spent one full week trying to get over this problem but nothing appears to help me.
I use to have a MacBook Pro, and I used it to connect my iphone devices and deploy my iOS applications on it. Now I have bought an new Mac Book pro, when I try to test some applications on my new iPhone using my new Mac, it just refuse to accept it or accept any of my old devices I registered on my old MAC.
It just report : "Code Signature error". I found in the device organizer >> iphone >> Provisioning profile in the status of "valid singing identity is not found"
From my reading and trying, I think the problem is that my new Mac seems to not bet able to get the private key of my team. However, I don't know how to get this key from my old Mac, and I don't know - if it possible - how to get new key for my new Mac.
Thank you in advance for your answer.

Did you verify that your certificates are present in the new Mac's keyChain ? (should if you initialized from a time machine). If they are not, export the certificates on the old mac with the keychain utility. Later import them in the new mac's keychain.
Look for certificates whose name begins with iPhone developer and iPhone distribution.

Ok, I found the solution in this link:
http://www.iphonedevsdk.com/forum/iphone-sdk-tutorials/90538-critical-back-up-your-developer-key.htm
I manage to archive my old Private key from my old Mac and installed it again on my new one and everything went perfect :)
Thank you.

Related

/usr/bin/codesign failed with exit code 1 in Xcode 6.4 (yosemite 10.10.5) when trying to run on iPad

Everything started when I tried to create and validate my archive for the new app version.
My developer certificate expired, I revoked it (I didn't revoke distribution certificate it is still valid) and now it is up to date. I deleted my old associated provisioning profiled from Xcode and Xcode is configured to generate them automatically. After The provisioning profiles were not in my account. I was able to compile fine without errors using simulator, but I can not run app on my iPad. I deleted old app version (I could not find in iPad Settings->General any Profiles to delete since my version is iOS8.4 and it deletes it automatically) I don't know if I need to delete anything else on iPad?
Now when I try to run from Xcode app on iPad, I get this error:
Command /usr/bin/codesign failed with exit code 1
(see details below)
NOTE1: I don't get this error when I run it in the simulator, only when I chose to run on registered iPad
NOTE2: I was able to run app on this same iPad before I revoked the certificate.
NOTE3: I was able to create archive and submit the app before, problems started when certificates expired.
All troubles started after revoking the certificate.
I am running Xcode version 6.4
Mac has OS X Yosemite Version 10.10.5
Here is what I did so far:
After revoking certificates,I tried to delete provisioning profiles and restart Xcode, Mac and iPad and that didn't help.
I deleted old certificates from keychain, right now I have just the new up to date certificate in my keychain.
When I tried to run Xcode it asked me to fix non-existing provisioning profiles and it worked for simulator, but not for iPad.
I also looked in Xcode general settings for the build and tried various things, but that didn't help...
This didn't help too:
Xcode -> Preferences -> Accounts -> Choose your account, and then View Details -> Refresh (button on bottom left), Refresh again, restart Xcode
I tried to read developer guides for distribution, but troubleshooting suggestions how to run on development device didn't help, also I didn't find much about this codsign error.
I also downloaded new certificate WWDR from Apple, that didn't help.
I tried most of the things what people suggested related to this error posted, but didn't help...
One additional info:
My problem is also that I am trying to submit second version of the existing app, so I don't know what I can delete in order to be able to submit the updated version of my app again. If it was new project I would create new project from scratch and start from zero, but this happened just when I was ready to submit new archive...
Do you have any suggestion how to fix this issue, which steps to follow?
I would appreciate your pointers where to read or what to do.
If you need additional info from me, please let me know.
Thanking you in advance, -Tatjana
CodeSign /Users/t/Library/Developer/Xcode/DerivedData/K-eskcdowdkybtiygveputefcuziqr/Build/Products/Debug-iphoneos/K.app
cd /Users/t/Desktop/myProjects/K
export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
Signing Identity: "iPhone Developer: T... (G....)"
Provisioning Profile: "iOS Team Provisioning Profile: com.k.K"
(5....)
/usr/bin/codesign --force --sign D.... --entitlements /Users/t/Library/Developer/Xcode/DerivedData/K-e.../Build/Intermediates/K.build/Debug-iphoneos/K.build/K.app.xcent /Users/t/Library/Developer/Xcode/DerivedData/K-e..../Build/Products/Debug-iphoneos/K.app
CSSM_SignData returned: 8001094A
/Users/t/Library/Developer/Xcode/DerivedData/K-e..../Build/Products/Debug-iphoneos/K.app: errSecInternalComponent
Command /usr/bin/codesign failed with exit code 1

Apple Push Notification not working after changed Mac

since my old MacBook crashed and not able to revive, I have gotten a new macbook and load my project from SVN.
Because of this I faced problem with the code signing. So I deleted all my cert and provision profile from Apple developer and regenerated new set. I have successfully archive the app now.
Problem is the push notification is not working already. Even I have replaced re generated p12 on my server. My old app, ad hoc new app all don't receive message anymore.
Anybody can advise me where to check? Thanks.
Thanks Siva for the suggestions, those are all valid checking. However I have done all these but still to no avail.
After dive deep into the code and Google around, finally found the culprit. It is due to Apple no longer support SSL and using TLS now. Have to update code in Push Sharp.
These are 2 related links:
1) https://github.com/Redth/PushSharp/pull/369/files
2) https://github.com/Redth/PushSharp/issues/424

How to install Blackberry 10 Native(QT, C/C++) on Windows Machine

I am trying to install Blackberry 10 Native in my Windows 7 Machine, but somehow i am unable to install it properly, so please any one can guide me how can i install Blackberry 10 in my Windows 7 Machine.
I already downloaded Momentics IDE and also i have followed the instruction from this link
http://developer.blackberry.com/native/documentation/cascades/getting_started/setting_up.html
One more thing is that i don't have Blackberry device so i have to run mt application on simulator.
Please I just want brief guidance about how to setup all environment related to run Blackberry 10 on my Windows Machine.
Any help would be appreciated. Thank you in advance.
I am assuming Momentics installed without an issue, and simulator is the problem. You need VMware Player or some other virtual machine. You simply
Download and install VMware Player (Free for personal use)
in Momentics: where the "on:" choose "Add new target", click "Simulator", Install a new simulator and choose the version you want.
Once installed Launch simulator, go to Settings (in the simulator), Security and Privacy, Turn on development mode (you need to create password for this). I'm not 100% you need to turn on development mode on simulator but I do it anyway
Go back to Momentics (under Add new target), click Properties, enter password you used in simulator and click Connect.
Another thing that might be useful. You don't need signing keys on a simulator, but you do if you want to try on a real device. I hope you tried Momentics 2.1 beta, it's slightly better

Do I need two Provisioning Profiles?

I've got a Provisioning Profile for distribution com.mycomapnyname.myappname
Now I want to test my app in my iPad and I did all steps- Get certificate - Add my device - create an AppId - and finally create a Development Profile called My Applications (to sets all apps), so I've got a Distribution Profile and a development Profile.
The bundle identifier for distribution is com.mycomapnyname.myappname
The bundle identifier for developer is com.mycomapnyname.*
In Library Provisioning Profiles I've got both.
In Ipad Provisioning profile I've got just My Applications Profile
When I try to run it on my iPad I set in Targets - Build Settings:
Code Signing / Debug / Any iOS SDK = iPhone developer matching with My Applications
Code Signing / Distribution / Any iOS SDK = iPhone distribution identity
in Targets / Info:
Bundle identifier: com.mycomapnyname.myappname
Finally when I want to run my project (setting to run it on my iPad) I've got the error:
"A valid provisioning profile for this executable was not found."
It's a king of mess for me, can anyone help me to be able to run in on my device?
I run other app on my device, but following a tutorial and creating a new app, but I can't run my own app in my device for testing.
Thanks in advance ;-)
No you don't unless you like to setup wild cards for each app which is confusing.
Try this it may help. In xcode go to organizer and then select provisioning profile section. Try to refresh that. It will connect to Dev portal and download your current profiles. Then with your device connected try clicking on the name of the device and make sure your device gets detected by xcode. If it says use for developing click on that and it will also refresh the provisioning profile on your device. That should re sync everything. If this dies not work let me know and I'll get on my Mac and see how I can help you more.
Adrian

How to install signing certificates so that they are listed in Xcode 4?

I need to code sign my Mac App. I obtained the certificates from the Apple's developer portal and would like to install it. The certificates are listed in Keychain Access. How to I go about doing this so that it is listed in Xcode 4?
Thanks.
I ran into a similar issue. In my case, it was caused by my installing the certificates in the incorrect ("System") keychain. They should be in the "login" keychain. The Keychain Access tool will let you drag and drop them into the login group.
This is what it should look like:
Once I did this, the signing option appeared in XCode:
I had reinstalled OSX without backing up my certificates. Therefore, when I re-downloaded it from Apple it will not work. I had to recreate the certificates from the Developer Certificate Utility for it to work again.

Resources