How to upload to Apple's My Apps from a Xamarin project - xamarin

I specifically need help getting the app build into my apps. I am so new to the MAC ecosystem. I need to get my app build from my windows 10 box (parallels) running VS2017/Xamarin Forms project uploaded to My Apps. What i have found is helpful if you are using xcode on the mac.
I have read tons of pages and help files and with all of that what I have includes:
created an app in VS2017/Xamarin that runs happily on the emulator from the MAC (MacBook Pro)
purchased the app dev subcription from apple
created a Production certificate (I don't need this yet but I was in there so...)
created a Development certificate
created a key pair from the Dev cert (that show up in the keychain)
created an App Group
created my app's placeholder under My Apps on App Store Connect
added my iPhone to devices via connecting to the Mac getting the UDID from iTunes
created a development provisioning profile for my iPhone (Not sure how this helps my testflight plight)
Assumptions
You must submit for review the same way for both TestFlight and Prod release to the actual store.
You don't need to open the app in xcode outside Xamarin
There is a tool or concept I am missing out on.

For development outside of Xcode, you will want to use Apple's Application Loader App to upload your app to App Store Connect.

As I said in comment to Matt below his correct answer to my actual question above, I needed to get the project right to get to that point.
Here are the more intimate details for the lurkers. I hope this helps some of you.
I was getting, or trying, to get all of this in place manually instead of letting VS do it's work getting this stuff together while I got to coding. FastLane FTW
Open the account management window, go to Tools > Options > Xamarin > Apple Accounts
Add your AppleID
Click on your appleID
Click the add button
Select your id in the lower text area
then add your distro cert. As is proper you deploy to TestFlight as a prod release.
Then get over to to your iOS project properties:
Make sure that your project is outputting an IPA. (Not Beer ;) )
These are my settings that worked. There could be other configurations that work as well.
I never get the automatic provisioning to work. And while this bundle signing settings look like it will not work, it does. I have received my apple approval for beta and users are in testflight.
Also, make sure you update the version of the app in the plist for subsequent releases. This change is not carried through from the AssemblyInfo.cs as one might expect. viola.
If you see this during debug make sure your debug version has Developer (Automatic) set for your debug settings.
FWIW - My VS2017:
While this does not perfectly match the info # https://learn.microsoft.com/en-us/xamarin/cross-platform/macios/apple-account-management?tabs=windows it worked for me. That page was key to the solution and deserves citing. Your mileage may vary.
If I missed something please reach out and I will update this.

Related

Profile doesn't include the selected signing certificate

I have an application for macOS that uses core data to save data. I switched to CloudKit so I can sync that data with its iOS counterpart. This is on Xcode 13.4. Even since I did that I get the error:
When I try to submit it for a distribution with "Developer ID"
I have been going in circles for the last two days. I have tried all the stuff several articles here at SO mentioned (e.g. this one), or the Apple Dev Forums (for example this one). I have tried deleting certs, regenerating them, adding them again, downloading "manual profiles" again, going to the building settings and changing certs and options...
It doesn't matter. It goes nowhere.
Here's the thing, if I go back to the version without iCloud, all is good. Same with any iOS app that uses iCloud. All builds, and all goes to Apple without any issues. It's only this app.
For the sake of testing I created a new macOS app, and from the get go I enabled CloudKit. Same error.
So, what's missing? Is there any special foo or incantation I need to utter to get an macOS app to use iCloud and be able to be distributed?
Thanks

Xamarin.iOS on macincloud development and automatic provisioning setup

I'm trying to develop a cross-platform app using xamarin forms and mac-in-cloud. Specifically with ios, I'm trying to set-up automatic provisioning since I originally got the error when debugging: >Could not find any available provisioning profile for (app name).iOS on iOS
So, after researching into the issue I put my apple developer acct info in, and when trying to use automatic provisioning. I get an error under Team: >There were errors in the data supplied. Please correct and re-submit. There are no current IOS devices on this team matching the provided device IDs.
Now, following the research rabbit hole, I go to the apple developer portal, try and register device, select macOS, insert Hardware UUID of mac mini into device ID, so on. And no change to error(s).
Question time, am I setting it up completely wrong? Other (older) articles/forums suggest linking an ios device via itunes, however, that seems counterproductive to my objective. Anyways, any help would be greatly appreciated. Apologies for any naiveté.
What are you trying to develop with the mac? Is it a iOS (iPhone) app? If so you can just use the simulator on the mac, and the mac does not need to be registered.
Try manual provisioning in VS
Signing Identity > Development (your name)
Provisioning profile > probably will be vs (something)
Also in VS go to Preferences > Apple Developer Accounts > make sure your account is listed. Then on the right hand side, click 'View Details' then 'Download all profiles'
Restarting VS or the mac may also help.

How to list provisioning profiles and installed iOS signing identities?

Environment:
Visual Studio 2015 on PC
Visual Studio (Xamarin) on Mac
iPad is connected to Mac
My setup used to work fine. From PC, I would be able to debug iOS apps running on the iPad.
Yesterday, I updated the Mac OS as well as my iPad iOS. I may have updated a few other things too. However, now I am running into problems deploying Xamarin iOS apps on the iPad.
I can create an iOS app in xcode and deploy it successfully. However, when I try to build my Xamarin app, I get the error "No installed profiles match the installed iOS signing identities."
There are a few posts on the forum that talk about a similar problem. I have gone through all these posts. I have also downloaded (once again) my iOS certificate from Apple developer portal and added it to my keychain store.
I still don't understand why I get the error. Would appreciate if someone can tell me how I can get the list of installed iOS signing identities and compare them against the list of provisioning profiles.
Also, when I look at my plist.info file, I see that, for key CfBundleIdentifier, the value is replace_bundle_id. I am wondering how I can tie this bundle id back to my provisioning profile. On Apple's portal, I see a bunch of provisioning profiles (I am part of an enterprise team). There is no field called bundle-id on these profiles. All each of them have is an app-id. Where do I related the bundle-id to the provisioning profile? Regards.
Provisioning profiles are all inside the directory: /Users/m.piccotti/Library/MobileDevice/Provisioning Profiles
Usually when I have these kind of problems and no time to understand what's wrong, I simply delete everything inside that directory and I download again all the profiles from Xcode. Naturally you can try this only if you are sure that you'll be able again to download all the provisioning profiles you need.
Or it could be that you have to set the right provisioning profile for the project:
This info is saved into iOS.csproj, the element CodesignProvision.
When you go to Apple Developer portal and check App IDs, you see the Name and ID of your app. The ID is your bundle ID. That you need to enter in your plist.
Based on that Xamarin will find your profiles.
Here is what I did to make it work. This is based on the feedback I received from the other two replies.
From the Apple developer portal, I looked at the ID of my app. This was in the form com.mycompany.myproduct. In my Xamarin iOS app's plist.info, the id was replace_bundle_id. I changed it to match the one from the portal.
Next, I cleaned the "Provisioning Profiles" directory on Mac and used xcode to create a test project and change the bundle id (from project options) to match the one on the portal. xcode automatically created a new profile.
This made the whole thing work. Now I am able to deploy and debug from my PC to iPad via Mac.
Our project was generated by Xamarin wizard a long time ago and used to work just fine until recently. I still do not know why replace_bundle_id worked in the past and stopped working all of a sudden. The only change I had made was that I upgraded the OSes on the Mac as well as my iPad.

Xcode 5 - What should I change on development version of my app, before uploading to store

My app is ready to upload. Everything works fine in development side. I wonder what I should change (about SSL or something else) before uploading to store?
This is a complex topic and we may not be able to answer this in once sentence.
For submission you may need a Distribution Profile from the Apple Dev Center. Depending on the functionality you're using in your app, and depending on if it's an iOS or Mac App, you may be able to use the provisioning profile Xcode has generated for you. You can set this under Build Settings - Code Signing - Provisioning Profile.
You also need to setup your app in iTunes Connect so you can submit it (this includes screenshots, App Store Category, description, etc).
To check if the submission will be successful, head over to Product - Archive, and from the screen that opens hit "Validate". This will tell you if you're missing anything.
Take a look at the App Distribution Guide for details on how to submit an app to the App Store. There's a whole chapter on Push Notifications in there too which deserve special attention: https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/SubmittingYourApp/SubmittingYourApp.html
Those technicalities aside, make sure that any NSLog and NSAssert statements that you may have used while developing are removed or not compiled before submission.

iPhone Debugging: How to resolve 'failed to get the task for process'?

I have just added a provisioning profile to XCode (needed to support notifications and in app purchase), setup as needed the build configuration for ad hoc distribution, and tried to run the app on the device (I have done this several times in the past, without any problem).
The app is installed, but it does not start. On the console, I see the following message:
Error launching remote program: failed to get the task for process 82.
Error launching remote program: failed to get the task for process 82.
The program being debugged is not being run.
The program being debugged is not being run.
However, if I start the application on the device manually, it works as expected. I have recently installed the latest XCode 3.2 for Snow Leopard. Is this a known bug of this version of XCode or am I doing something wrong?
EDIT: It works fine with release distribution using the development provisioning profile.
I have checked again the ad hoc provisioning profile to make sure it includes the device I am using.
The ad-hoc profile doesn't support debugging. You need to debug with a Development profile, and use the Ad-Hoc profile only for distributing non-debuggable copies.
I have had problems debugging binaries on the device via XCode when the app includes an Entitlements.plist file, which is not necessary to install onto the device for debugging. In general, then, I have included this file for release builds (where it is required for the App Store) and removed it for debugging (so I can debug the app from XCode). That may be your problem here.
Update: As of (at least) August 2010 (iPhone 4.1 SDK) the Entitlements.plist is no longer necessary to include in your application in many cases (e.g., distribution through the App Store.) See here for more information on the cases when Entitlements.plist is required:
IMPORTANT: An Entitlements file is generally only needed when building for Ad Hoc Distribution or enabling Keychain data sharing. If neither of these is true, delete the entry in Code Signing Entitlements. (emphasis mine)
I Had the same issue, but resolved it by following simple following steps :
Make sure you have selected debug rather than release.
In Debug configurations, in project settings, you should have selected developer's profile & no need of specifying the entitlements plist.
Also same setting are there under: Targets: , if not manuall change them to the above for the debug config. It will work.
All the best.
This took me a while to figure out.
If you are using a distribution / ad hoc/ profile you cannot test it through xcode. You will get the error: The program being debugged is not being run.
You can build the app, go to the products folder in your app in xcode, click on the file with your project name and choose reveal in finder. You can drag this app into into iTunes and sync and that point you can test your app on your device.
If you are getting such error, the only reason could be you using a Distribution profile rather than a development profile in Xcode or a missing Entitlement property. If you are not using the Entitlements.plist, then the only possible error could be the app is getting packaged with a distribution profile. You could verify this confirming the build logs. To change this, go to Build Setting of the project and verify Code Signing Entity setting. For debugging to work, this setting should be a developer profile for the configuration that you are currently using.
https://developer.apple.com/library/ios/#qa/qa1682/_index.html
For instant results, delete all mobile provisioning profiles from xcode and install the developer profile that you intend to use.
Almost 2hrs on this issue! And finally I solved it by replacing the
iPhone Developer
to
iPhone Developer: My Dev Account Name
for Debug's CODE_SIGN_IDENTITY:
Select Project Target
Build Settings
Search by "code sign"
Modify CODE_SIGN_IDENTITY section's Debug row with "iPhone Developer: My Dev Account Name", not just "iPhone Developer".
I've no idea why it works, but it does! At least for me!
Environment: Xcode 5.0 (5A1412).
Check ur code signing section.make sure that the code signing is iPhoneDeveloper code signe
Open Entitlements.plist and set the boolean value get-task-allow to YES - the debugger can attach now!
Go to Edit Schemes and under Run -> Info -> Build Configuration, change from Ad-Hoc to Debug. Click OK to save.
It might be that you have an expired development profile on your phone.
My development provisioning profile expired several days ago and I had to renew it. I installed the new profile on my phone and came up with the same error message when I tried to run my app. When I looked at the profile settings on my phone I noticed the expired profile and removed it. That cleared the error for me.
I received this error when I tried to launch app from Xcode as I figured I had selected distribution profile only. Build was successful so I created .ipa file. I used testflightapp.com to run the app. You can use iTunes as well.
As stated by Buffernet, you cannot use a distribution provisioning profile to debug. When I switched to a developer provisioning profile, I got the error "A Valid Provisioning Profile For This Executable Was Not Found".
A quick google for this lead me to the article listed below. From there, I realised that I hadn't got a valid development provisioning profile as my iPhone hadn't been added to the Provisioning Portal and all the other stuff involved.
Make sure you run an iPhone developer provisioning profile and your device has been added to the provisioning portal!
http://iosdevelopertips.com/xcode/a-valid-provisioning-profile-for-this-executable-was-not-found.html
Yes , Provisioning profiles which are for distribution purpose, i.e. Distrutions provisioning profiles do not support debugging and gives this error. Simply create and use debug provisioning profile (take care of this when creating provisioning profile from developer.apple.com account).
I just changed my bundleIdentifier name, that seemed to do the trick.
I've patched my project with JailCoder http://jailcoder.com/ and problem resolved.
Just download It and drag your xcode project to It.

Resources