Will building & running another iOS project disassociate existing provisioning or app id's? - iphone

I recently recovered from not being able to test on my device in Xcode. After much headache, it turned out that I only needed to uninstall/reinstall iTunes, but I'd certainly rather not do so frequently.
(See: prior thread)
The troubles seemed to begin after I built and ran some sample projects which obviously did not have my App id, etc. Is this always the case? Should I live in fear of compiling other projects that I haven't previously associated with my device and/or developer profile?
I'm not exactly sure if the App id/bundle/provisioning/keychain/whatever needs to be done per test ad hoc App or if it only matters that your device is provisioned and your plist matches what Apple has when you go to upload to the iTunes store.

I've run many samples on my device through Xcode and never had any issues. There's certainly no reason why this should happen.
It's hard to say "No, you shouldn't be worried" without knowing what the issue is, but it's not intended to break in this way, and it doesn't for most of us!

Related

Is it possible to test an app in an iOS device without having a Mac?

I believe this is a duplicate question, but examining the others I could not find my problem exactly.
I have developed a flutter app and I intend to publish it. So I rented a virtual Mac, loaded the project in XCode and tested it on a simulator. Everything worked fine.
I have an Apple Developer Account, Certificates, registered an iPhone, etc., but it seems that I have to physically connect the device to the computer to be able to run it on the iPhone. No way to do that remotely (I'm in Brazil and the virtual Machine in NY).
XCode tells me to plug in the device so it can register it (but I have registered it already in the developer's site).
I thought it would be possible to generate some kind of executable to download to my iPhone, but it appears that is note the case.
Is there any other way I can do that?
Maybe I can skip this step and try to publish the app, because it is the same project as an Android app already tested and published in Play Store.
The answer is yes, the modern answer is probably TestFlight. But this has always been possible using OTA downloads. To do this, archive your app, create an OTA manifest and put this on a web server somewhere. Then you can download the app straight to your phone (assuming it's signed with the correct provisioning profile and all that). We used to do this a lot before TestFlight came along.
This question and
this article are somewhat related to what you want to do
I was having trouble to test without an iphone what I did is register this device on my account https://messapps.com/wp-content/uploads/2016/08/udid.png and so far I could build the app for iOS.

How can I test my signed app on an unjailbroken iOS device

As part of our software development life cycle, we want to make sure that the binary we test in house before pushing to iTunes, is the same as the binary that we push to iTunes. I know that sounds really silly, but it's a matter of checks and balances in a mid size company, so that the testers can be sure the coders didn't add in anything after testing occurred.
So is there a way to run a signed/certed app on a device that's not jail broken? Or is there a way to verify that an IPW is the exact identical code in the zip that gets pushed to iTunes?
Or possibly a way to accomplish my goals with a different way?
We have a valid developer account and around 15 different devices that are not jail broken. Would prefer to test with them left stock and not jail broken.
If you compile your app for distribution using an ad-hoc profile you can later take that archive and resign it with the appstore profile and upload it.
You can't however upload an application that was compiled with an development certificate.
A binary signed to go to the App Store cannot be run on devices via the normal ways. You can test the code by having the developers create an Ad Hoc build. This will have the same functionality as the App Store version, but you can test it.
Unfortunately, when the app is recompiled for the App Store, more code can be added.
Do you not have access to the code to test? If you must, you can have them create an adhoc in front of you, test it, and then recompile for the app store all in front of you. Seems a bit overkill, however.
There is with another trick:
first test you code for functionality's, buggs in normal way.
Than push the code to AppStore, but set the release date farther with 3 weeks, while your testers are validating it is that what they tested last time or not. Somewhere here, I have read that possibility forgot where. Never tried!

iPhone app crash immediately after update

today my app update it has been released in the store, when updated or downloaded for the first time the app immediately crash on start.
I've tested the app on simulator and on device (the same where I've installed the update from the store) and I never experienced this problem.
My update it has been submitted with Organizer after the archiving, in the Distribute section.
Apple do not perform these types of controls before to release an app?
Anyone experienced a similar problem? I have no idea what could be the cause..
Thank you, Stefano.
Here's the best way to test a production build without deploying to the store:
Set your build Scheme to "iOS Device"
Do an Archive build
Select your archive and click Distribute
Choose "Save for Enterprise or Ad-Hoc Deployment"
Pick your code signing cert
After saving the ipa file, use Apple's iPhone Configuration Utility(*) to install it on your device
You should always perform two tests:
installing on a blank device after uninstalling your app *and any profiles in Settings -> General -> Profiles"
installing over the top of the previous version of your app, to make sure any files/preferences/etc are properly converted to the new format
(*) the iPhone Configuration Utility is mostly used for enterprise app deployment, but it's also useful for developers and is available as a free download for mac and windows at support.apple.com. You can also use iTunes instead, but it's convoluted.
As for why your app is crashing? No idea... it could be anything. Standard debugging advice applies.
The issue is related to the Framework. I had this exact error. It wasn't a case of logic as it was crashing before the AppDelegate was even called and my usage of NSMetadataQuery was much later in the life cycle than that.
It turns out that weak linking the Foundation framework was required.
Problem was solved by changing (under the Project Info in Xcode) the dependency option of the Foundation.framework from required to optional. Check for any such frameworks.
Try deleting any old versions of the app you have on your device, and reinstall. Also try on a different device, maybe with a different apple id to your developer account.
This happened to our app also, and apparently, other apps too.
Apple is aware of the problem and is currently working on a solution.
see this article:
http://techcrunch.com/2012/07/05/apple-responds-to-app-crashing-issues-has-a-dedicated-team-working-on-a-fix/
If you are using core data & you have updated database in your latest version without versioning core data in that case app crashes on launch after update.

iPhone Provisioning: What's it all about?

Grepping around, I see that I'm not AT ALL alone in being... challenged... by the process of setting up an iPhone app, getting it to run, giving it my testers, and so on.
I've gotten it to work. Somehow I emailed a copy or two to testers, and eventually got my li'l app into the store, and that was fine.
But I can't say a really, deeply understand it! (And I don't do iOS dev every day. Even now my recollection of what I did is kind-of hazy.)
I'm moderately capable of understanding things, if presented, well, you know, in a way I can understand.
Can anyone point me to a crystal clear explanation of what provisioning actually is?
I feel that if I understood it, the recipes to do it would be obvious.
Thanks!
Development provisioning profiles sign your application, and allow the phone to know it's OK to run. These days, XCode automatically makes a Development Profile for you (the "Team Profile").
The other kind of profile, when you are talking about other people running you app, is a Distribution Profile. You need a Distribution profile for either giving your app to the store, or for giving to beta-testers.
The profile is what allows other people's phones to know it's OK to run your app, basically it includes a list of device ID's approved to run that application on the phone in question, along with being signed so that the phone knows the whole thing is valid.
If you read advice around the web concerning distribution, it's easy to get confused because things used to be a lot harder. You used to have to send Distribution certificates separately from your app to beta testers. These days the certificates are included in your app bundle so you don't have to worry about that.
Furthermore, sending an AdHoc build can be all kinds of unpleasant - for testers using Windows. These days, the absolute best way to do beta testing is have a link on the web that uses the Enterprise ad-hoc deployment feature, to let a user with iOS4 or higher automatically download and install your application with no iTunes or copying work at all. In fact I would at this point refuse to use beta testers running windows who were not on iOS4 or higher.
The guide link posted should have a section about the enterprise ad-hoc, but basically the way it works is there's a small plist file the phone downloads, that has a link to the IPA file containing your app. You point the phone to a specially formatted link to the plist file and the phone fetches the application directly.
All of this is predicated on using the "Build and Archive" option for building any ad-hoc distribution build. You should do that anyway because it also saves out a symbol file for you to use in debugging crash reports.
EDIT:
Here's a little more detail on enterprise deployment (which works for any registered developer, not just Enterprise registered developers):
http://jeffreysambells.com/posts/2010/06/22/ios-wireless-app-distribution/
The Developer Program User Guide should be helpful.

IPhone Development Profile Expired

I really combed this site and others. I read and re-read the related links here and the Apple docs. I'm sorry, but either I am obviously missing something right under my nose, or this Apple profile/certificate stuff is a bit convoluted. Here it is:
I have a product in the App Store.
I have updated it several times and users like it.
My development profile recently expired just when I was improving the app for its next release.
I can run the app in the simulator.
I can compile and put the distribution build on my iPhone just fine.
I went to the Apple portal and renewed the development profile.
I downloaded it and installed it in Xcode.
I see it in the Organize window.
I see it on my iPhone.
I CANNOT put the debug build on my iPhone to debug or run with Instruments. The message is that either there is not a valid signed profile or it is untrusted.
I subsequently tried to download and install the certificate to my Mac's keychain.
Still no success.
I checked the code signing section of Project settings and also for the target and the root. All appears to indicate that it is using the expected development profile for debug.
Yes, I had deleted the old profile from my iPhone, from the Organizer. I cleaned the Xcode cache and all targets. I have done all of this several times and in varying sequences to try to cover every possibility.
I am ready to do anything to be able to debug with Instruments in order to check for leaks or high memory usage. Even though the distribution compile runs fine on my iPhone and plays well with other running processes, I will not release anything without a leaks/memory test.
Any ideas will be appreciated. If I missed something obvious, please forgive me - it was not due to just posting a question without searching for similar postings.
Thanks!
All problems solved! I am very happy this all happened because I learned so much about Xcode, keychains, certs and provisioning. Unfortunately, there is not a simple answer. Here are the highlights:
I needed to recreate the ad-hoc profile and install it on my device. (That was MY BIG oversight and the reason the dist build no longer ran on my device.)
Between the very first time I created my profiles and the date my development profile expired, I upgraded to the 3.1.3 Xcode SDK.
It seems that this now means you need 2 entitlements files; a debug version with the get-task-allow checked and a distribution version with get-task-allow unchecked. Each need to be set in the respective settings.
In Project settings, I needed to set both my working directory and intermediate directory to the build product directory.
BIGGIE - I had to double click on the target and reset the appropriate code signing profile. There was an old profile name still there for some reason! Now, I can debug, and drop my distribution on my device without a hitch.
So, in summary, I believe that my original problem (not being able to debug after renewing my dev profile) and the problem that resulted from all my efforts to fix the first were caused by:
the fact that I upgraded to 3.1.3 during my dev cycle
my own oversight (I apologize to Apple for my criticism)
an Xcode quirk (the old profile name hanging around in target settings).
I hope this helps others. The best advise I can give is to take a day off and then create a new empty project, going through the same process step by step.
Thank you all!!
Try re-creating your development mobileprovision file on Apple's site. Be sure to delete all old copies from Organizer (including those on the iPhone itself).