Issue with CoreLocation and Adhoc Distribution - iphone

We're developing an application that uses CoreLocation as a primary feature, where need to poll the GPS over an extended period of time. Everything works fine when we install via build&run in Xcode, but whenever its installed via adhoc using hockey (ipa generated using build&archive->share_application->distribute_for_enterprise), something very odd is going on with CoreLocation. Here are the problems we're experiencing; (1) the "Allow xxx to access your current location" dialog is never displayed, (2) the location icon on the taskbar is never shown, and (3) the delegate method, locationManager:didUpdateToLocation... is never called.
To make matters even more confusing, this issue is only reproducible on the developer devices. Beta testers are not experiencing this. We have tried removing all provisioning profiles from the developer devices and from Xcode, but the issue still remains. We have also verified that we are building with the lastest provisioning profile. I was only able to install via adhoc onto my dev phone after I completely wiped it and set it up as a new phone in iTunes.
Has anyone else experienced this issue or something similar? Any suggestions/recommendations?
Tested using Xcode 3.2.4 64bit and iOS 4.1 (8B117)

Possibly related to iphone Location Services code that works on OS 4.1 in appstore?

Related

Xcode 4 -- "no provisioned iOS device is connected" with iPod touch 2

I have two iPod touches. One is 2nd generation running iOS 4.2.1, and the other is 4th generation, running iOS 4.3. I have the same provisioning profile installed on both of them.
My app runs just fine on the 4th generation device.
With the 2nd generation one, when I look at my device in the organizer, everything looks fine, there is a green dot next to the device, and it shows that the profile is installed. But when I try to run the app, I get the above error.
The deployment target for my app is iOS 4.0.
As of a week ago, I was using Xcode 3, and everything worked fine. Over the past week, I upgraded to Xcode 4, and also had to update the profile, as the old one expired. I did install the new profile on both devices -- and the above situation ensued.
Incidentally, if you are a new developer and you arrived at this question, I suspect your problem is different from mine. This question has been answered in the generic form many times before; several of them are linked from here.
I've tried reinstalling the profile and also restarting both my device and computer. No luck.
What I had to do was change the settings of the scheme. I had it set to "iOS device". This worked fine for my newer iPod. But for the older one, I had to change it to the device name of my older iPod. It was of the form "William Jockusch's iPod (4.2.1, overriding to Base SDK 4.2)".
Annoyingly, Xcode appears to reset this setting every time the device is changed. So I have to set it again every time I swap devices.
Try delete profiles (not just reinstall) in the Organizer and reinstall it, delete profiles in the device (not through Organizer) then reassign profiles in Build settings for all iOS SDK and Debug mode.
It might do the work.
yeah renaming the scheme worked for me too. this is pretty helpful! I was able to duplicate the scheme and add a new one, so it saves it when I close and open xcode again.

Using the 4.2 SDK, how do I install on a jailbroken device without paying?

I'm having trouble installing my application on a jailbroken device without being a paid member of the iPhone Developer Program. It seems like I've tried everything. I've tried:
Building the .app , placing it in a Payload folder, zipping it and
changing to .ipa.
Building to an .app and manually playing that in the /Applications
folder and respringing
I'm using the 4.2 SDK and attempting to test on a jailbroken 4.2.1 iPad. Whenever I get the app on there and try and launch it, it crashes immediately. It works flawlessly on the simulator.
If you pay the $99 to enroll and get an iOS Developers certificate, you'll be able to deploy the app to the device with the Xcode debugger, and likely see exactly why the app is crashing.
Your best bet would be to find a friend with an account already and have them set you up. Not sure how that jives with any terms in the agreement.

How do I install my AppCelerator App to my IPhone

I am attempting to load a small application I wrote with AppCelerator on my device. I am having quite a bit of trouble with this because of iOS target mismatches I suspect.
AppCelerator provides me two options for the target OS, 3.2 and 4.1. My Phone has firmware 4.1 on it so I selected 4.1:
Here is a picture if you want to have a look.
Note that in this image I am selecting output type of 4.1. This generates an XCode project with 4.1 as the base sdk / target sdk of 4.1.
When I launch this it generates an XCode project. Organizer contains the following devices and provisioning profiles:
Here is a picture of organizer.
It contains my device, with provisioning profiles, with a green dot beside the device meaning it should be a valid target.
Then when I try to run the app on my device I see the following options as available targets:
Finally here is the dropdown where you select simulators and devices.
Notice it simply doesn't contain my device as it did before I upgraded to the new SDK and 4.1 iOS.
I assumed I would be able to push to my iphone at this time - have tried all I know to try. Blown away all my provisioning profiles, regenerated my developer certificate, also deleted my login keychain to make sure that I started fresh there.
I am really just out of ideas to try - appreciate any and all help!
It appears that the answer was quite simple. After kludging around in XCode for hours I found (or noticed) another tab on the AppCelerator interface.
Click on Test & Package
Click on Run on Device
Fill out the details for provisioning if they aren't already (this is likely all done if you went through the level of detail on Apple Documentation that I did)
Click Install Now
Voila - the app is on your phone for testing.
The Apple Terms and Conditions do not allow apps built outside Xcode to be installed to iOS devices. I would think this applies to AppCelerator builds as well.

iPod touch debugging: Error on install/run only if app exists on device already?

I am using an iPod to test an app. The device is all set up with the right provisioning profiles, etc-- that's not really the issue.
But every time I start the app from Xcode on the device, I get the "A signed resource has been added, modified, or deleted." error from the Organizer window.
Wait, I know, you think it's a provisioning profile problem.
But here's the kicker: if I just delete the app from the iPod (using the main screen) and try again, it works fine. I only get this error when the app is already installed. The other kicker is that this behavior doesn't happen on an iPhone that I have for occasional testing-- on that device, I can start/restart/restart indefinitely. But using the iPod, my compile-run-test cycle is annoyingly slow since I have to manually delete the app each time.
Any ideas?
I'm using Xcode 3.2.2 (prerelease) FWIW. The iPod has stock OS 3.1.2 on it.
Thanks!
I had a similar problem with the original 3.2 beta 1 and my iPhone running 3.1.3. However, I did not need to delete my app to workaround it. I was able to get around it by using the clean all targets. It seems you've done that though. :(
That said, with the 3.2.2 beta 2: IDE 1643, Core 1644, ToolSupport 1631 - my problem went away.
From the release notes Beta 2:
FIXED: In iPhone SDK 3.2 beta 1, some users saw the message "A signed resource has been added, modified or deleted…" when rebuilding their projects. This has been fixed for beta 2.
Are you sure you're running Beta 2? Perhaps a re-install of xcode might help? I assume you've tried power cycling the iPod Touch?
The only thing I can tell you is file a bug with apple here and hope they fix it
I had the same ussue a couple of days ago. My problem was I had created a distribution build and installed it on my iPod through iTunes. After removing the app from iTunes and syncing the iPod Xcode stopped complaining when making new builds.
Otherwise you could try "Clean all targets" under "Project" in Xcode.
Also had this problem, try turning off the passcode lock: http://bencollier.net/2010/03/debugging-on-iphone-requires-app-deletion/

Error when weak-linking StoreKit framework on iPhone

I am trying to add In App Purchase support to my app. I would like the app to still be able to support OS2.2.1, but IAP are not available unless the OS version is 3.0 or higher.
I have tried weak-linking the StoreKit framework. Basically, I have StoreKit.framework added to frameworks, but not in Link Binary With Libraries in the target, and have added weak_framework -StoreKite to the other flags line, as per the Apple instructions. Now when I run the app on OS2.2.1 it crashes in _read_images before the main function is even executed. I really need to support 2.2.1 and I know other apps do it. Thanks for any help.
I just ran into a similar issue with the iAd Framework. Well sort of. I thought it was the iAd Framework but when I completely commented out all the new code and removed the framework it was still crashing.
It worked on the Simulator just not on the device. I found posix_spawn("/var/mobile/Applications/...", ...): Permission denied in the Console logs.
This lead me to believe that it was some type of code-signing error. I deleted the app from the device and re-installed. This launched the app successfully.
It appears there was some remnants of the version installed on the device from the released version did not allow the debug version to install correctly.