"The device does not recognize this host message when running app on the device" [duplicate] - xcode4.3

I'm trying to profile my application using Instruments on the device itself. Specifically, I'm trying to do time profiling.
Unfortunately, I just can't get it to work. Here's the situation:
1) If I run instruments with the app signed using the developer profile on the simulator, it works.
2) If I run instruments with the app signed using the distribution profile on the simulator, it works.
3) If I run instruments with the app signed using the distribution profile on the device (which is the default case for profiling since the scheme is set to use the release build) then Xcode complains about that there's no valid provisioning profile. That seems reasonable.
4) If I run instruments with the app signed using the developer profile on the device, then Xcode transfers the app, but then states that it's "Finished running" immediately. The app isn't run, and in most cases there's no error message.
Sometimes, just sometimes, there's a message from the Organiser stating that device does not recognise host - E800001C.
5) Running the app directly using the developer profile works fine - I can debug as expected.
Summary - I can't run an app on a device through Instruments using a debug build - it stops before it's had a chance to start. There are no error messages - nothing at all in the debug console.
Help?
Thanks,
Tim

I've solved this. It hadn't occurred to me to check the console inside the organizer. It said:
: entitlement 'keychain-access-groups' has value not permitted by a provisioning profile
After a bit of Googling I discovered that deleting the app from the device would solve my issue. Now I can profile.
So easy when you know how. Hope that helps someone else.
Tim

First of all app can be executed on simulator without signing it. Now apple has provided us the developer profile to test the app on devices.
Distribution profiles are created for submitting the app to the apple store or when application has to be distributed to the employee within the enterprise.
If want to do profiling on device do it with developer one. It should work.

Related

Mac App crashes when I add a Distribution Profile

I've created a Mac App for Mavericks that uses MapKit. It works fine during development and testing on Xcode 5.1. Now I'd like to submit it to the App Store and I need a Distribution Profile which I've created successfully. Trouble is, as soon as I add it to my project, the app doesn't run anymore - it crashes every time without fail with this error message:
When I change back to "no provisioning profile", or to the profile that Xcode created during development, the app runs again.
My question: Is this expected behaviour, or will the app be rejected by the review team? I know that iOS apps don't run with their distribution profiles, but I'm new to Mac Development. Any insights into this way too complex topic are appreciated!
My app was approved - and the crash was indeed no issue for the app review team.
I had a chat with Apple about this who were kind enough to call me back and explain the issue. Looks like this phenomenon is "kind of" expected behaviour: Mac Apps may or may not crash when run with a Distribution Profile.
To avoid this problem, we can add both a Development AND a Distribution Profile to our app, without one having to replace the other. This was news to me. Had I however opened my tired eyes a bit wider I would have perhaps spotted the little disclosure triangle myself:
Perhaps this helps those with the same issue.

How to remove code signing in Xcode?

I've created an iOS7 project in Xcode 5. It's a very simple app. I zipped it and sent it to another developer. When they open it, they get these messages:
No matching code signing identity found
No code signing identities (i.e.certificate and private key pairs)
matching "iPhone Developer" were found. Xcode can resolve this issue
by downloading a new provisioning profile from the Member Center.
How do they get around this? The app isn't going to be submitted to the app store.
Is this happening because they have not linked Xcode to their online developer account? Isn't an online developer account free?
The other developer can ignore that message if the intention is to run the app on the Simulator. But you must use code signing in order to run an app from Xcode on a device, even for testing purposes, even if the app is never going to be submitted to the App Store. And that costs $99/year. End of story.
You could turn your account into a Company account and put this developer on your company; that way the developer is covered under your $99.
Or, if you just want to send the app to someone for testing and you don't need them to run the app directly from Xcode on a device, you can create an Ad Hoc build targeted to their device.
And of course the developer can look at your code, test on the simulator, and run your previously built Ad Hoc build on the device - but not run from Xcode on the device, i.e. the developer can not build for a device without someone paying that $99/year fee.

App Wireless Distribution not working in iOS7. Internet Connection needed?

In iOS6 I used to install some of my apps over an adhoc network without internet sharing. So the iPad had no internet connection. Therefore I use a typical html and plist file. Everything was alright.
Now, in iOS7 the installation is not working anymore. It is just stuck in "Waiting" and nothing more happens. (Note: It is still working on my iOS6 iPad)
First I thought something might be wrong with my plist, but then I copied the files to my IIS Server and installed it from there. Here I had a internet connection on my iPad and everything worked out.
Is it possible that the wireless distribution now needs an internet connection in iOS7 e.g. to check the ipa in the app store or something like that? Because this is the only difference I can see.
The app is signed with a valid distribution profile.
Thanks for your help.
It turned out the installation of apps over the air in iOS 7 really needs an internet connection now. The iPad tries to contact at least the following URLs before installing the app.
ax.init.itunes.apple.com: The device obtains the current file-size limit for downloading apps over the cellular network.
ocsp.apple.com: The device contacts this site to check the status of the distribution certificate used to sign the provisioning profile.
It seems in iOS6 it was ok if those URLs were not reachable and now in iOS 7 they have to be reachable.
Well i just had the same problem and I figured it out. At least on my xcode this is what happened. Turns out the application target release code siging identities auto set to developer and not their current state, from xcode 4.x, which is distribution. So when I went to distribute my application I kept getting the same error you had. So Click on your project name in your project explorer then click on the application target, not the project, and make sure the code signing identity is not set to developer for your releases. I have no idea why the code signing identities were automatically set to the developer profile, maybe there was some sort of bug when updating from xcdoe 4.x to xcode 5 that caused this. But now other devices are able to install the program. Hope this helps.

Trouble generating MASReceipt during development

I am working on developing a Mac application that has an in app purchase. I have done this before on iOS, but I cannot get it to work with the Mac app. After doing some research it looks like I will have to get and validate a receipt from the Mac App Store before this will work.
I believe that I have followed the steps to do this correctly,
1.) Build the app in Xcode.
2.) Launch the app through finder
3.) When prompted sign in with a TestUser account created in iTunesConnect
4.) The app closes with the error message
“AppName” is damaged and can’t be opened. Delete “AppName” and download it again from the App Store.
When I open up the bundle though I do not see the _MASReceipt/receipt folder and file - and I am still getting invalid product identifiers from StoreKit.
These steps seems to work for me the last time this happened:
Log out from Mac App Store.
Force quit storeagent and softwareupdated processes.
Try double-clicking the app to start it again.

Bizarre Xcode/iTunes Provisioning crash

I've been building and deploying apps for several months now and am aware that provisioning can get a bit sticky at times. But my current situation is particularly unusual.
I can attach my development device and build and run the app on it through Xcode. If I archive it for Ad-Hoc Distribution as an ipa file, I can also successfully load it onto a distribution device via iTunes. However, running it on the device causes an immediate crash: it opens then promptly closes.
There are no permissions errors during the iTunes load, and this issue presents so far on 3 distribution devices, including the same device that it successfully runs when sent via Xcode.
For the life of me I cannot figure out what is going on; in the past, if there was a misplaced profile or a device not added to the profile, you'd get a simple permissions error during the iTunes sync. I've never seen it successfully transfer to a device with no errors, but then crash. I'd love some suggestions as I've been working with this for 2 hours trying to track it all down.
All devices are in the provisioning profile and I reloaded the profiles in XCode to make sure they were current. I also reloaded the ad-hoc profile in iTunes to make it was current.
I've had a similar experience with expired provisioning profiles: dev build of an app opens then immediately closes when run on a device. Double check that all profiles installed on the devices are current.