Preparing Ad Hoc Distribution for my app - iphone

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.

Related

The executable was signed with invalid entitlements

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.

Testing on a second iPhone

I have developed my first full fledged iPhone app, and tested it on my phone. I would like to have it tested by one of the contributing graphic artists on their iPhone. They live in another state so I do not have access to their device. I added their Device ID to the apple portal.
A couple of questions:
I do not see the device show in Xcode when I hit refresh. Should I be seeing it?
Which executable file(s) do I send to them?
Look at testflight. It makes distributing apps very easy. Since you have already included the designers device ID, all you have to do is:
Sign up to test flight
invite the designer and tell him to register and add his device info
go to apple developer portal - provisioning - distribution and create a new distribution profile (don't forget to add the designers device when creating the profile), download and open the certificate (which will be shown in Xcode's Window>Organizer) - make sure that the correct certificates are selected in your build settings.
make sure that iOS device is selected ( and not the simulator) now in Xcode go to Product>Archive, when the archive is shown click distribute>adhoc distribution
this will create an IPA file.
upload this to test flight and follow the instructions to select the designer from your team.
Use TestFlight. It's free, takes 5 mins to install their API, and gives step by step instructions on how to push your app to any tester over the air.
Add their device id to your developer account, Update your adhoc profile (which you are using for running your app on device) attach their device with this profile. Now again sign your build with updated profile and give this APP file and provisioning profile to others or upload it on TestFlight.

Test App on Real iPhone [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Deploy an iphone app from xcode to iphone
Hi I have tested my app using the iOS simulator. How can I test it on my own iphone? I am an Apple developer member.
The first thing you need is a development certificate. Visit the iOS provisioning portal and follow the steps here: http://developer.apple.com/ios/manage/certificates/team/howto.action:
Once that is done, you can do everything else from Xcode. Using Xcode 4:
Connect your device via USB.
Open the Xcode organizer (Window->Organizer)
Select "Provisioning Profiles"
Check the "Automatic Device Provisioning" checkbox and click "Refresh"
You will be prompted to enter your developer account username and password. Do this.
This step will automatically create and download a wildcard (*) provisioning profile that you can use for testing any application on your device.
After a few seconds you should see this new profile appear in the list with the name "Team Provisioning Profile: *"
Restart Xcode just to be safe. Sometimes it can get confused.
Open a project and select your device from the main schemes dropdown box:
Build and run.
If that doesn't work straight away, make sure your target has the correct code signing options. Find your target's build settings and for the Debug configuration choose "iPhone Developer" under the "Automatic Profile Selector" group in the dropdown:
This should be selected by default.
Good luck!
You need to learn about creating Adhoc Distributions for iOS devices for detailed reference. I am however putting all of it here in the answer:
Creating iPhone Ad Hoc Distribution Builds
1. Adding Beta Tester Devices
Apple allows an Ad Hoc build to be distributed to up to 100 devices which they enforce by making you add the devices to the distribution provisioning certificate. This means that you need to retrieve the UDID for all of the test devices, add them to the provisioning profile using the iOS Provisioning Portal and then download and install the profile.
2. Finding the UDID
To get started you need to ask your beta testers to supply the Unique Device ID (UDID) for their devices. To find UDIDs they can follow the steps on:
whatsmyudid.com
3. Registering the Device
Once you have the UDID you need to add it to your account in the iOS Provisioning Portal in the same way you would for a development device. You do this in the Devices section of the portal and can either use the ‘Add Device’ button to manually add a single device or use the Upload Devices button to bulk upload multiple UDIDs from a text file.
Note: If you want to bulk upload multiple devices the format of the text file needs to be as follows with the two columns separated with tabs:
Device ID Device Name
1234567890123456789012345678901234567890 Test_iPad
The contents of the first line are not important but you need to put something as the first line is ignored when you upload.
Also be aware that you can only register up to 100 devices each year. You can delete devices any time you want but once added they still count towards your annual allocation. (So if you add 100 devices and then delete 50 of them you still have to wait until the next year before you can add any more).
4. Creating the Distribution Provisioning Profile
Assuming you already have a distribution certificate the process to create an Ad Hoc provisioning profile is quick and easy. In the Distribution tab of the Provisioning section use the New Profile button.
The only difference between an Ad Hoc profile and a normal App Store profile is the Distribution Method.
Ensure you select the Ad Hoc method and then enter a profile name, the App ID and finally ensure you select all of the devices you want the Ad Hoc build to run on. Once you have finished submitting the profile you should download it and save it somewhere safe as you will need to send it to each of the beta testers. The file should have an extension of .mobileprovision. You should also drag the file onto your Xcode icon to install it, you can use the Xcode organiser to verify that it installed ok. You should see the profile in the Provisioning Profiles section.
5. Building for Ad Hoc Distribution
With the provisioning profiles configured correctly the next step is to prepare the project in Xcode for an Ad Hoc build. It might be useful to create a configuration just for Ad Hoc builds so that you do not have to worry about the details each time. The easiest way to do that is to copy an existing configuration, if you already have a Distribution configuration that is probably a good starting point otherwise you can start from the default “Release” configuration.
With the project open in Xcode, right-click on the target and select “Get Info” to bring up the Info dialog window and select the Build tab and then in the Configuration drop down menu select “Edit Configurations…”
Select an existing configuration (e.g. Release or Distribution) and then at the bottom of the window use the Duplicate button to create a copy of the configuration and name it “AdHoc”.
In the Target Info window ensure this new AdHoc configuration is selected and then adjust the following settings in the Build tab. In the Code Signing section, look for the “Any iOS” setting under Code Signing Identity and make sure it is set to iPhone Distribution and matches the Ad Hoc provisioning profile we installed previously.
6. Entitlements
There is one additional step if your project includes an Entitlements.plist file (perhaps because you needed to enable keychain data sharing). For an Ad Hoc distribution you need to ensure that the get-task-allow flag is not set in the plist file. One way to handle this is to add a second file (Entitlements-adhoc.plist) just for the Ad Hoc build which is identical apart from the get-task-allow flag:
To ensure this new Entitlements file is used you need to modify the Code Signing Entitlements setting in the AdHoc configuration to reference the new file.
7. Build and Archive
With the AdHoc build settings active use the Build and Archive command to create the distribution build. Assuming the build was successful you should find it in the Xcode Organizer in the Archived Applications section. You can add a name and comment to the organizer for future reference at this point.
8. Sharing the Application
The easiest way to send the application files to a beta tester is to use the Xcode organizer to create an ipa file. To do that select the AdHoc build in the Archived Applications section and use the Share button and then select Save to Disk. Xcode will create a signed application file and save it to disk with a name of your choosing. Name the file something useful like appName-x.y.z.ipa where x.y.z is the version number.
You can then send this .ipa file together with the .mobileprovision file to your beta tester with instructions to drag onto their iTunes library to install it on the test device.
For sharing and application versioned release management you can also use testflightapp
You should add your device UUID to your iOS provisioning portal. Create an App id. Create a mobile provisioning profile by selecting your device and App Id. Download and install that profile to your device. The build and run your app on the device. Please let me know if you need further clarification.

Share my iPhone app for testing

I'm writing a new iPhone app and want to share it with a couple of friends for testing and general feedback and sign-off. Is there a way I can do that?
They are located in a different state, and they don't have a Mac either.
Edit: I wrote this post a long time ago. Since then, services such as TestFlight have come along which do this entire process. This is really the way to go!
You need to make an ad hoc build which your friends can install on their phones. It's a bit of a pain, but basically, the procedure goes like this:
Go to the Apple Developer Center's Provisioning Portal and register their device ID's. You will need to have your friends give you their device ID's, which can be done by clicking on the "Serial Number" field in iTunes on the device page.
Generate a distribution certificate for ad hoc distribution in the Provisioning Portal under Provisioning -> Distribution
Download that certificate yourself (the .mobileprovision file) and install it into Xcode by dragging it on the Xcode icon.
Duplicate your "Release" build setting in Xcode for an Ad Hoc build. Everything should be the same as Release, except in the "Code Signing" section you will want to select the new Ad Hoc profile generated in step 3.
Make an Ad Hoc build by going to Build -> Build and Archive
When Xcode brings up the organizer window, right click on the archived build and make a .ipa file by saving it to disk
Tell your friends to drag the mobile provisioning profile to the iTunes icon (or with File -> Open for windows users) to install it on their phone.
Tell your friends to drag the .ipa file you made into iTunes, and sync their phones
At this point, the app should be installed on their phone, but lots of things can go wrong, so you should definitely read Apple's documentation on the subject as well.
Note that this procedure won't work unless your friends are using iTunes to sync applications with their phones. Also, as noted, you will need to be a paying developer in ADC to even access any of the Provisioning Portal stuff.
You need to create an ad-hoc provisioning profile and build your app with that. Then send both a .zip compressed build and the profile to your friends (maybe over e-mail). They don't necessarily need Macs... Windows will do just fine, as long as they have the latest iTunes installed.
There's more information (including how-tos) at the iOS Provisioning Portal.
All this assumes you've paid your $99 and are a registered iOS developer.

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.