The executable was signed with invalid entitlements - iphone

This is the first time trying to test an app I created with LiveCode on an iPad.
I made sure that the IOS Provisioning Portal had the following set up as ad hoc:
certificates in Development and Distribution.
Ipad is registered
Apple ID is set up
provisioning in Development and Distribution.
When I try to get the app into Xcode the following error is displayed:
The executable was signed with invalid entitlements.
How do I get all of this into xCode so my LiveCode app can be tested in the iPad?

Probably, you used a distribution profile instead of a developer's profile.
The creation of the developer certificate and provision profiles are described step by step on Apple's website. I strongly recommend that you take your time to read these steps and to make sure that you follow each step correctly.
Apple's provision portal also has an assistant that helps you to create a developer's provision profile. You need to use this developer's provision profile instead of an ad-hoc prodile if you want to install your app through XCode on your own device(s).
You can use the devloper's profile in LiveCode's Standalone Application Settings window.

This is a ENTITLEMENTS error, not a code sign issue. Entitlements have to do with iCloud. In Xcode 4 this was done on the Summary page at the bottom. In Xcode 5 it is on a new page called capabilities at the top. It will be lit up with a FIX this Issue Flag. Simply select your Devel profile and you're good to go. It does require an AppID set-up with iCloud Checked. If you're not using iCloud simple delete whatever is in the Entitlements field in the build Settings.
Although I see the "read the doc" answers often. a.) Most of us do try to read the doc and b.) It rarely contains and useful granular detail needed to code or troubleshoot anything. Cheers

Entitlements are also used with the Game Center, Passbook, In-App Purchases and Maps. All are setup in the Target Tab called Capabilities.

Related

Renewing an expiring Enterprise provisioning profiles, and other aggravations

Now that the app I created last year has enjoyed a year's worth of functional success, my Enterprise users are beginning to see alerts indicating that the provisioning profile is about to expire.
The Code Signing business of the app gave me tremendous difficulty in the beginning, and now it's doing it again. I think it's because all the information I can find about it refers to apps to be distributed in the App Store, but not for Enterprise apps. The "Tools Workflow Guide for IOS" seems only to be helpful for App Store distribution.
I did finally get it working just by trial and error, by setting all of the Code Signing Identities to "iPhone Developer," but I really need to understand the proper way to do it and why it works that way. And I need the "Idiot's Guide" version.
First, I think what is hanging me up is understanding the Distribution aspect. Is "Distribution" only in reference to an app that is bound for the App Store? This being an Enterprise app, does Distribution apply? Any time I try to create a Distribution profile and include it in Distribution/Release for the Code Signing Identity, compile fails. It works ok if all Code Signing Identities are set as "iPhone Developer." Does that mean it is going to always need a Developer provisioning profile, and never a Distribution profile?
The "iPhone Developer" profile always comes up in the Code Signing Identity section of Build Settings as "(currently matches 'iPhone Developer: Bill Norman(4GR2 etc) in 'iOS team". But any other profile doesn't say anything like that, and so none of the other profiles work. If they don't work, why are they there? And do I need to delete them?
And yes, there are lots of profiles listed that are the result of many trials and errors. Only one appears in the Profiles section of the iPhone's Settings, and that's the iOS Team Provisioning Profile.
If it does need a "Distribution" profile, how do I make it work?
Next question: Will my Enterprise users need to download and re-install the app to get the new provisioning profile? Or will it do it by itself, seamlessly? Or will it inform my users that the profile has expired, and they need to do such-and-such to get their app to work?
More: The Developer profile only lasts for a year, while the Distribution profile lasts three years. Obviously it would be helpful to make it last three years, but can we do that with an Enterprise app?
My apologies for my continued inability to fathom the inner workings of this stuff. And many thanks to anyone who can help.
First thing that you want to do is delete all of those extra provisioning profiles that you created through trial and error. Just totally remove them from the organizer. The difference between developer provisioning profiles and distribution provisioning profiles is that developer profiles will only work on devices that are registered with that developer profile, meaning test devices. You would not be able to sign an app with a developer profile and then put it on any device, only devices that you have registered to work with that profile. In the distribution zone you will have app store distribution and Ad Hoc distribution. App store refers to the Apple App Store which you must submit your app to apple for that. Ad Hoc distribution allows developers who have enterprise accounts to distribute to any device via the internet or other methods.
I would need more information when you say that compile fails with distribution but generally speaking, you would click the product tab and then click on archive. When the archiving is complete and the archive window pops up, you would click on the button that says Distribution in the bottom right corner. You would then click on the Save for Enterprise or Ad-Hoc deployment option. You choose your distribution code signing identity when asked which identity to use and hit next. Here comes the tricky part: On the next section where you are choosing where to save the app, you click on the option, save for Enterprise distribution. There are two fields that need to be filled in here, the first is an application url, this is the exact url where you will be hosting the ipa file, for example http://www.somewebsiteyouown.com/myApplication.ipa
The second is the ApplicationTitle which will just be your app title: myApplication.
This process will generate for you a plist and an ipa file, you put thos both on the server and link to the plist from a button or link on a webpage. The plist is like the instructions on where the ipa file is and what to do with it.

Error When Uploading IPA to TestFlight Using New Target

I recently created a new target in my project for the Lite version of my app. Now when I go to upload the .ipa to TestFlight so I can distribute it to my designer, I'm getting:
Invalid IPA: The keychain-access-group in the embedded.mobileprovision
and your binary don't match.
Seems clear to me the reason this is happening is because of the new target. Does anyone know what exactly do I need to change to get this to work?
I had this same problem. It was caused by having the wrong release code signing identity in the target's build settings. You won't need an entitlements file.
Check you are code signing with the correct Distribution profile.
Under Xcode project select > Build Settings > Code Signing
Code Signing Identity:
- Debug > iPhone Developer
- Release > iPhone Distribution
Provisioning Profile:
- Be sure to select a Distribution profile here!
When you created a new bundle you probably didn't change the entitlements and access groups. Make sure you change these in the entitlements file. Have a look at http://www.karlmonaghan.com/2012/08/09/invalid-ipa-the-keychain-access-group-in-the-embedded-mobileprovision-and-your-binary-dont-match/ on how to do this.
Should look like this
If you don't use an entitlements file...
Double check that your developer certificate and provisioning profile used are up-to-date (even if you have the confidence inspiring green tick in the organiser.) Refresh the profile by visiting the Apple Provisioning Portal and edit / modify the provisioning profile, you're using to sign the app.
Un-click and click the signing identity, so that you can submit the form, and the profile will be regenerated.
Wait a minute (really), Go back to XCode and remove the profile from the organiser, next refresh the profiles, and it should re-appear, as the regenerated version.
Once that's done, try archiving / signing the ipa, and upload to TestFlight.
(use the TestFlight app, to speed up this process.)
Here's what worked for me:
Using Automatic (Enterprise Distribution) Profile Selection for all Code Signing Identities I've Established.
Selecting "Refresh Certificates" when going through the Enterprise/Ad Hoc distribution workflow
I have such kind of problem, I am not sure you have the same one or not.
If I have a installed app with the same app id that I am going to install but with a different target, it creates problem. Seems apps are unique with app id and target. So I had to delete the app to install another app with the same app id but different target.
You have good other answers here, but just to stress something out.
If you worked for more than 1 client, and you actually used more than 1 developer account, then the automatic selection of Code Signing Identity on Archive wizard could be different than the one you need, and you might need to select it each time you create the AdHoc version.
Here is a picture, to show you where your error might be (thats where mine was):

Preparing Ad Hoc Distribution for my app

I have been reading several tutorials and watching some iTube videos to see how I best prepare my app for Ad Hoc distribution. However the information I got is not really consistent, it goes from the 5 step explanation from the Developer Center of Apple to a almost 3 minutes video, where I would have to set some Code Signing options in XCode, create and zip the Archive etc.
My questions:
1.
Is there a tutorial available, which explains everything required, but not too much? I somehow feel, for instance, that code signing is not really required.
2.
After I tried to install the app using iTunes, the synch claimed that it was not able to install it. Is there some log available in iTunes, so I can check for further error details?
3.
How about switching from Ad Hoc distribution mode to normal developer mode? After I followed the steps from the video and prepared my app for Ad Hoc distribution, I was not able to install it on my device anymore, I got the error
Build target Abiliator
Check dependencies
[BEROR]CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 5.0'
This is the video tutorial on iTube I followed: Demo of iPhone app Ad Hoc distribution
Thanks for your feedback and have a great weekend.
OK, looked up the Error
" the following job tried to hijack the service..." and saw that a reboot of the iPhone may solve the issue... and guess what, I was chasing a phantom all day long.....
It works perfectly.
So last hint for anyone, having a similar issue, after installing an app via Ad Hoc the first time: Reboot iPhone, otherwise the app may crash.
Cheers and now good nite :-)
PS: Just to round this thread up here the steps I did at the end (as mentioned, I am using XCode 4.2.1) :
Added my device on the Provisioning Portal (this had been done long time ago, however it is an important step, as the beta testers device IDs also need to be registered here before you re-create and download the distribution profile)
Created and downloaded an iOS Distribution Certificate in the Provisioning Portal
Imported the certificate in my Keychain
Created a Ad Hoc Provisioning File in the Provisioning Portal
Downloaded that profile
Double clicked the profile, which added it to the XCode Organizer Provisioning Profile Section)
Added the options Any SDK and Any iOS SDK in for Ad Hoc Distribution Code Signing Identity in the Code Signing section of my project AND my target and set the values with my Ad Hoc Provisioning File I just created and imported
Made sure the option in my app .plist file "Application requires iPhone environment" was set to true
Ran a clean (Product / Clean) and then a build only (Product Build)
Made sure the app was not installed on my iPhone (as I was testing before via XCode)
Copied the target (group Products via Show in Finder) to iTunes via Drag and Drop (I dropped it into the Media section)
Copied the Ad Hoc Provisioning File into iTunes via Drag and Drop (also to the Media section)
Made sure the app was checked for the synch, synched iTunes with the iPhone
Lastly rebooted my iPhone! However, I am pretty sure, that this might occur on the Developers device only. I assume that the reason for that was a process, still remaining on the iPhone, from my last test via XCode.
I did not use an entitlements file. I have actually to find out, what that file is really for, I have read that it might be required only, if using iCloud. And XCode 4.2 developers, there is nothing like File / New / Entitlement Template anymore in XCode. The file is created as soon as you check the option Entitlements and give the file your desired name in the Summary tab of your target.
You may also want to download the iPhone Configuration Utility from apple
I will also recommend this to my beta testers, as it allows you to see the console log of the iPhone, which of course might be very helpful in case of errors.
Hope this summary helps others, setting up their app for the first Ad Hoc distribution.
Cheers, René
code signing is simple.
first you create a mobileprovisioning profile for your apps bundle identifier also add the devices you want to built the app for. for adhoc build do it in distibution tab. download it, double click add it to keychain.
now you tak your app in xcode.select coreect profile(code signing). set command line build to distribution, oh i forgot create a new file(entitlements.plist) set debug inside it to false, add its relative path in the target, just above codesigning specified. now select the iosdevice on top left(where you select the simulator) press command+b to build the app. the app would be in the products folder(at the bottom) locate it in finder drag it to itunes, may be provisioning profile too, and sync it. done.
Go to https://developer.apple.com/devcenter/ios/index.action and login. You can find 'iOS provisioning portal'. And after going there, choose 'Distribution' section. Select "HOW TO", you can find necessary steps there.

Is it possible to Test iPhone Application on Actual Device rather than Simulator?

I wants to test my own application to my actual iPhone Device rather then simulator.
So, is there any chance to do so with ?
I have an apple developer account.. But don't know the procedure, Please help me if u have any solutions..
Thanks in advance...
Log in to http://developer.apple.com/iphone/ with your developer id and password.
Then:
http://developer.apple.com/iphone/manage/team/index.action and set up your team.
http://developer.apple.com/iphone/manage/certificates/team/index.action to create your certificate
Download the certificate you just created and double click on it to run Keychain Access and install it.
http://developer.apple.com/iphone/manage/devices/index.action to enter your iPhone's id
http://developer.apple.com/iphone/manage/bundles/index.action create an appID
http://developer.apple.com/iphone/manage/provisioningprofiles/index.action to download a provisioning profile
Drop that provisioning profile onto Xcode
Go into your project's info.plist and change your Bundle identifier to be the same as you used for the provisioning profile, minus everything up to the first "."
Go into your project's Build Info, and select the appropriate Code Signing Profile
I think now you're ready to go. Select an iPhone Device from the pop-up menu in your main project browser window, plug your iPhone in and let Xcode see it, and then Build and Run.
You can, but as iPhone applications need to be signed - you need to be a paid developer. It is then a case of logging into the portal, assigning a test device, application settings and then downloading a provisioning certificate.
The procedure is cumbersome, however it is very well documented.
You need to create your Developer Certificate and a Certificate for your software projects.
Go to http://developer.apple.com/iphone/, log in and click iPhone Developer Program Portal on the right side. You will find a "launch Assistant" there that will guide you through the next steps. It's pretty easy.
You have to join the iPhone Developer Program, which is $99 for the Standard Program, $299 for the Enterprise Program.

Code Sign Error When Building iPhone Application

I am new to iPhone development. I just registered with Apple for the iPhone Developer Program. When I try to build, I am receiving an error:
Code Sign error: a valid provisioning profile matching the application’s identifier could not be found
I'm not sure what is wrong. I tried browsing the Internet but I get confused. Can anyone help me with what I should do?
At first it seems a complex process, but it's pretty straightforward when you've been through it a few times.
In a nutshell the process is this:
(I'm assuming you've set up your iPhone/iPod touch as a test device)
Via the iPhone Developer Portal
Create an App ID
(give your application a name, this is just for reference on the website and nothing to do with your own build of your application)
enter a string to identify it, like com.yourcompany.appname
(this is important and should be the same as in your .plist file inside Xcode)
Click and Save this
Go to Provisioning
There are 2 provisioning profiles you'll need
a) development - so you can install your application on a test device (i.e. your iPhone / iPod touch)
b) distribution - if you want to sell the application via the App Store
You can create the profiles by selecting your App ID, created in the previous step, from the drop down list and clicking Save
In a few moments (usually, though it can be longer) the certificate is available for download. Download this to your Mac and drop it onto the Xcode icon. Sometimes the development profile doesn't work for me like this and I drop it directly into the Organiser window in Xcode that shows my connected device.
Besides, if you are in a team account, team admin need to edit Development Provisioning Profiles, and add modify your certificates privilege.
In Xcode inside 'Edit Project Settings' you can select the certificate you wish to code sign with. Usually for debug I sign with the development certificate. Follow the instructions on the apple site and clone the release profile and call it something like release and sign this with your distribution profile. (You won't be able to load the app onto your phone with the distribution profile selected)
Make sure you select the target device as Device and not Simulator when building for the App Store!
Hope that helps, it's from memory so apologies if I've skipped some small steps.
xcode top left corner make sure you're running as "similator" "iphone"
Did you set up an iPhone provisioning profile for either development, ad hoc distribution, or app store distribution?
If not go to the iPhone developer program portal, which is linked from the developer.apple.com/iphone. Apple has provided a great series of video tutorials.
Just make sure you install the certificates or the profile won't be selectable in the project configuration. When you download the certificates double-click on them to install.
Possibly more use for others seeing this issue on a previously configured dev environment.
This error is also shown if your provisioning profile has expired, in this case you can go through the steps in Neosionnach's answer or you can go to Organizer, click on the profile and click Refresh.
This was the winner for me when I had this issue.
As of July 2012, you can go here:
https://developer.apple.com/ios/manage/overview/index.action
Then launch the "Development Provisioning Assistant." It walks through all the steps outlined by FiddleMeRagged.
You can use this process to create a Wildcard ID, if you're just looking to test your app on your iOS device and don't need to deploy to the App Store right away.