Testing app on my device ... end of my rope!

I’ve been working in Corona for the last several months without issue. My Corona and Apple accounts/subscriptions are both current and not expired. I’ve read just about every relevant post in the forums regarding the “app signature is not valid” error that I’m getting.

Here’s the final sequence of steps that I attempted, after numerous other attempts to remedy the problem:

(1) deleted all my login certificates from Applications>Utilities>Keychain Access,
(2) deleted all provisioning profiles from /Users/dhogan/Library/MobileDevice/Provisioning Profiles,
(3) deleted the following system certificates from Keychain Access: Apple Code Signing Certification Authority.cer, Software Signing.cer (these certificates weren’t expired and the expiration dates indicated that they had been created when I initially set up my developer account in summer 2011),
(4) deleted the private and public keys associated with the above mentioned certificates,
(5) in Keychain Access, chose View > Show Expired Certificates … no expired certificates were present,
(6) in iOS Provisioning Portal, deleted all provisioning profiles, certificates, and device,
(7) restarted my laptop,
(8) in Keychain Access, chose Keychain Access > Certificate Assistant > Request a Certificate from a Certificate Authority and saved to desktop,
(9) in iOS Provisioning Portal > Certificates > Development, requested a new certificate and uploaded the request created in (8),
(10) after issuance, downloaded the development certificate to desktop, double-clicked, and verified that it was in Keychain Access > My Certificates,
(11) downloaded WWDR intermediate certificate to desktop, double-clicked, and verified that it was in Keychain Access > Certificates (note that it loaded to Certificates … not My Certificates),

… also setup my device in Provisioning Portal at this point …

(12) in iOS Provisioning Portal > App IDs, created new ID …I tried this entire process twice, once with the App ID configured for push notification and once without,
(13) in iOS Provisioning Portal > Provisioning, created new development provisioning profile using the certificate created in (10) and App ID created in (12),
(14) downloaded provisioning profile created in (13) and moved to /Users/dhogan/Library/MobileDevice/Provisioning Profiles,
(15) in Keychain Access, made sure that TRUST was set to “Use system defaults” for each certificate,
(16) in Keychain Access, made sure that for the key under the certificate, the “Access Control” tab was set to “Allow all applications to access this item”,
(17) started Corona Simulator,
(18) selected File > New Project and allowed Corona to create a new directory containing build, config, and main files … (note: the path to the new directory contains no spaces),
(19) copied code from previous main.lua into new main.lua and saved,
(20) copied all app files (no sub-directories are present) into new project directory,
(21) built for iOS device using the Code Signing Identity described above … neither the project path nor save to folder path contain spaces,
(22) build completes successfully and says that app is ready to be uploaded to my device,
(23) start iTunes, drag app into iTunes, sync device … iPhone 3g running 4.2.1 (8C148),
(24) receive error stating, “The app “(insert app name)” was not installed on the iPhone “(insert device name)” because the app signature is not valid.”

Arghhh! I’ve been at this for 3 days. I admit that I’m not a pro, but I am extremely detailed and can typically figure something out if I stick with it long enough. Very frustrating, given that the entire process was working just fine last week.

Any help would be greatly appreciated … [import]uid: 36444 topic_id: 22280 reply_id: 322280[/import]

Have you made your device available for testing in XCode or installed a provisioning file on the device? [import]uid: 10389 topic_id: 22280 reply_id: 88766[/import]

http://forum.voxilla.com/threads/how-to-install-an-ad-hoc-distribution-iphone-ipod-touch-application.18957/ [import]uid: 10389 topic_id: 22280 reply_id: 88767[/import]

Thanks WauloK. Just ran thru the steps at the voxilla.com thread you listed above. The provisioning profile was on my device. I went ahead and deleted it and re-installed thru iTunes … received the same error.

The only difference is that I’m using a development certificate and provisioning profile … not ad hoc. My understanding is that it shouldn’t make a difference for testing on my device. [import]uid: 36444 topic_id: 22280 reply_id: 88770[/import]

You’ve probably done this but:

http://www.onidev.com/2010/01/12/the-application-does-not-have-a-valid-signature/

http://developer.anscamobile.com/forum/2010/04/29/application-does-not-have-valid-signature [import]uid: 10389 topic_id: 22280 reply_id: 88775[/import]

Yep, tried that yesterday as well. Great suggestions though. RIght now, I’m downloading xcode 4.2 for snow leopard … currently running 3.2.1. Around the time I started getting the error, I had downloaded the latest stable version of Corona SDK. I figured I would update everything else and see if there is a positive effect … can’t hurt! [import]uid: 36444 topic_id: 22280 reply_id: 88787[/import]

OK. Definitely don’t use 4.3 cos we know that borks Corona :wink: [import]uid: 10389 topic_id: 22280 reply_id: 88791[/import]

Just to make sure, you don’t have a folder called “resources” in your project, do you? [import]uid: 52491 topic_id: 22280 reply_id: 88803[/import]

Peach - I don’t have any sub-directories. I’ve read all of your walk-thrus and feel like I should have this fixed by now on my own … unfortunately, that’s not the case. I’m a principal for a high school and building an app for our district. I thought I was about finished and then hit this wall. Any suggestions you may have would be appreciated. [import]uid: 36444 topic_id: 22280 reply_id: 88809[/import]

Had the same error message. The problem is with Corona not using the correct “signature” from the certificate in your keychain when building. To solve this problem, log on to your Apple Developer account and head to the Provisional Portal. Then you should see the “Provisioning Assistent” click “Launch Assistent” and follow the steps. [import]uid: 17138 topic_id: 22280 reply_id: 88819[/import]

One other thing that might be worth trying is adding the app to your device VIA Xcode, not via iTunes. (Plug in device, open Xcode, press CMD+Shift+2 to open Organizer window, drag app file to your device in the left once the light by it is green.)

Try not to beat yourself up - this is fixable but it is also one of the most painful parts of development, at least at first.

Soon this will just be an unpleasant memory - one most of us have :wink: [import]uid: 52491 topic_id: 22280 reply_id: 88831[/import]

Thanks! Currently downloading/installing Xcode 4.2 since my current version doesn’t support the iOS installed on my device. I’ll let you know how it goes. [import]uid: 36444 topic_id: 22280 reply_id: 88863[/import]

Please do let me know, am very eager to hear if this helps. [import]uid: 52491 topic_id: 22280 reply_id: 88986[/import]

OK, here’s what I know … or, at least what I think I know! Who cares, my app is working again.

My initial issue was that when I went to test my app on my device, it would load to my device thru iTunes, but when I tapped the app icon on my device screen, it would attempt to load and then close … never showing the Default.png image.

While investigating the issue in the forums, I ran across some discussion about updating to the newest stable version of Corona SDK. So I did. I then went to rebuild my app, took it into iTunes, and when I tried to sync … I got the dreaded “signature not valid” error.

Returned to the forums. I had always tested my app on my device using iTunes. Seemed like everyone else was using Xcode, so why not. Except, my version of xCode didn’t support the newer version iOS on my iPhone. So I decide to download Xcode 4.2, but turns out I need to update Mac OS in order to support the new Xcode I want to install. Download the OS update. Install the OS update. Download the Xcode update. Delete the old Xcode and devtools. Install the Xcode update.

Install the app on my device using Xcode … installs fine, but won’t load when I tap the app icon on my device screen. In other words … invalid signature issue solved, original issue unresolved.

I start stripping everything out of my main.lua code and adding lines back in one by one.

Looooooooooooong story short … I remember that after creating a new background.png a week ago, I decided to copy/paste/rename it to Default.png in my project directory … and since my Default.png image isn’t loading, I think that might be my problem. I create a new Default.png from scratch, drop it in my project directory … and now everything works fine and I’m back to where I was a week ago.

… at least my OS, Xcode, iTunes, and Corona SDK are all updated now! [import]uid: 36444 topic_id: 22280 reply_id: 89541[/import]

Thank you for that (very thorough) update. Lots of great details that may help others in the future.

Really happy to hear you can now test on device :slight_smile:

Peach [import]uid: 52491 topic_id: 22280 reply_id: 89587[/import]