SDK Verision dont match - iphone

hi my IPhone device has 4.2.1 version, my xcode is saying 4.2 version. Is this any issue because i cant debug my app on device. also the developer folder has iphoneentitlements401 folder, shouldnt it be 4.2 instead of 401?
i am getting cannot read entitlements data ERROR. please help!

SDK Support:
You need to set your IOS Deployment Target to the lowest SDK you want to support. So you would need to set yours to at least 4.2.
Go to Project -> Edit Project Settings -> Scroll down to Deployment, then find IOS Deployment Target
For Entitlements:
Your entitlements file, if it exists, may be corrupt, remove it if you have it, then add a new one:
Right-click on your Project, then click Add, then New File and under iOS click on Code Signing and choose Entitlements.

Related

Invalid Swift Support when submitting App

A while back I was trying to submit an App using Xcode version 11.1 (11A1027) but I received an email from Apple with the following message:
ITMS-90424: Invalid Swift Support - The SwiftSupport folder is empty. Rebuild your app using the current public (GM) version of Xcode and resubmit it.
From what I know, 11A1027 is already a released version and so I am not very sure why there is a need to use the GM version of Xcode. Does anyone have any idea?
I tried some of the methods suggested in other posts but somehow could not resolve it.
Is this a bug in Xcode?
Solved for me in June 2020.
MacOS Catalina 10.15.5
Xcode Version 11.5 (11E608c)
Check that Command line tools(Xcode->Preferences->Locations) have this value
Configure PROJECT in project settings
Click to you project in Xcode.
Select project name
Set filter to Basic and Levels
Find Always Embed Swift Standard Libraries field (if not found - play with filters)
Set YES to this field for PROJECT(debug and release)
Configure TAGET in target settings
Click to you project in Xcode.
Select target name
Set filter to Basic and Levels
Find Always Embed Swift Standard Libraries field (if not found - play with filters)
Set YES to this field for PROJECT(debug and release) and set NO to this field for TARGET(debug and release)
see example
Clean project and create archive(Product->Archive)
In the dialog window right click to the created archive name -> Show in Finder
Right click to the archive name in Finder -> Show Package Contents
Delete SwiftSupport folder here
After that upload your build using AppStore Connect in Xcode with default settings.
I received this same email after uploading an .ipa file to App Store Connect through the Transporter app. The following is where I went wrong: I distributed the app using ad hoc.
The following steps are the solution for my error:
Archive app
Distribute on TestFlight and the App Store
Export
Open ExportOptions.plist in the newly created folder from the export.
Make sure the method property has the value app-store if you are uploading to App Store Connect/TestFlight like me.
Drag and drop the exported .ipa file to Transporter.
Deliver your app to upload it.
And that's it!
Original answer here: https://stackoverflow.com/a/62568526/10374366
I don’t think it’s a bug. But the best thing you can do is to just reinstall Xcode from the AppStore.
The solution here was in this "Invalid Swift Support - The SwiftSupport folder is missing" with Xcode 7.3.1. We needed to use the new -exportOptionsPlist flag with xcodebuild instead of the older -exportFormat and -exportWithOriginalSigningIdentity flags. The plist just needs to have the method key set to app-store.
Try upgrading to swift 5.0 and going to workspace settings, build system and set it to New Build System. This solved it for me in a React Native project using native iOS views. As far as I know swift 5 makes doesn't use the swift support folder any more.

Unable to debug in ipad

I am using Xcode 4.6.x and the iPad iOS version is 6.1.3. I have added the device in Provisioning Profile. But when i connect it does not allow me to debug.
I have checked the Base SDK, it is 6.1 and Deployment Target is 6.1. I have tried to switch off and restart the iPad, but it's not working yet.
Can anyone help me ?
First clean your project [alt + clean] i.e. Clean Build Folder, Quit xCode, then remove app from your device.
Now build project and run. Delete all data from Derived Data folder. Also make sure you are not using distribution profile.
Hopefully this will work.
Check it once again the device id, add to provisioning profile.
Remove old provisioning profile.
Remove the app from the device. and remove form DerivedData folder also
Than add latest provisioning profile.
Than try to debug hopefully its work.

Run on device gets "Finish running on device" message but never runs

I'm trying to run for the first time an app in a device.
XCode 4.2
iPhone 3G 4.2.1
I have a provisioning profile showing under Xcode organizer installed with a wildcard app identifier (DQQVZJ94G3.*).
The device lists in XCode organizer.
I have certificates installed in my Mac keychain and they show the private key.
I have created a new project from template and didn't add a single line of code.
I have set iPhone as my schema.
I have set under Build Settings->Code Signing->Code Signing Identity->Debug->Any iOs SDK-> the iOS Development Certificate/Provisioning Profile pair.
I have set the tagert deployment target as 4.1.
I have set Bulid Settings->Architectures to Standard(armv6)
I have removed from plist file "required devices capabilities"->armv7
All the previous settings are set up in the Target settings.
I have realunch xCode and reinstalled certificates and profiles.
Whenever I hit Run, I just get "Finish running myApp on iPhone", but nothing happens, not even a log to get a cue of what's happening.
Build settings are duplicated: there are project build settings and target build settings. Generally, if you change the project settings, the target settings are automatically changed, and this is useful if the project contains multiple targets. But sometimes, that doesn't work and you have the manually change the target settings which are the actual settings used to build the target. So start with that and verify that the target settings look like this:
Architectures : $(VALID_ARCHS)
Valid Architectures: armv6 armv7 (default value)
iOS Deployment target : iOS 4.2.1 or lower
If that doesn't work, then the problem is probably that the provisioning profile isn't correctly setup. An easy way to make sure it works correctly is to make Xcode manage it for you. So remove the provision profile from your device and from Organizer, also remove the developer profile from Organizer. Then plug the iPhone, right click on it in Organizer and select: Add Device to Provisioning Portal.
Edit
Make sure you remove the other values in Architectures. For example, in the screenshot below, you have to remove the selected line armv7.
I added armv6 as described in the other answer, then under Target, I had to remove "armv7" from "Required device capabilities"
I had the same problem and my solution ended up being that I didn't have my iPad's device ID added to my devices list.

Steps to test iphone app on device (profile/certificate already created)

I want to test my app on my itouch which has ios 4.2.1 .
I have completed the steps for provisioning profile/certificate. So under Organizer,
when I select my device, I am seeing the provisioning profile
and under Developer profile, I see 2 entries; iPhone Developer and iPhone Distributor
Now I want to just test the app on my device (NOT looking for steps to submit the app for distribution at this stage)
I think there are some Project settings that I need to do under XCode. But I am unable to figure it out. Please provide me the steps to test on device.
My XCode ver is 3.2.5
I was hitting an issue following this and the documentation where my app would not deploy to my iPhone 3G running iOS 4.2.1 using XCode 4.2. I hope this helps others who end up on this question trying to get their apps to deploy to a real device through XCode.
I kept fiddling with the Base SDK setting along with the Deployment Target setting in the project and target settings area. However, I had them correct to start with so that wasn't the answer (I want to target iOS 3.2+, so I kept all set to that). In addition, I messed with the provisioning profiles, certificates, etc. multiple times even though they looked right to me. They weren't the issue, either.
The key was changing the architecture settings that are scattered throughout the interface.
First, since I am testing it on an iPhone 3G, I needed to support the armv6 architecture as well as armv7 for later models. So I added "armv6" to the "Valid Architectures" entry on the project's "Build Settings" tab.
Next, I made sure it was showing "armv6 armv7" under "Architectures" in the "Build Settings" tab of the target for my project.
Finally, I clicked on the -Info.plist file for my project and removed the "armv7" entry for the "Required device capabilities" that is put there by default for new projects in XCode 4.2.
After this, my app ran successfully on the device using Command + R for Run.
Double click your app under targets in Xcode
Make sure that for the configuration 'Development' you have the right development provisioning
profiles selected.
click on the properties tag and make sure that the identifier is the same as the identifier used in
the development profile.
clean all targets, in Xcode make sure you are building for Device, Debug, and than click 'build and run'.
If the development profile is on your iPhone and you have installed it into Xcode correctly it should work. However sometimes after installing a profile on your iPhone it doesn't register everywhere it needs to and I have found that this is fixed by restarting the iPhone (not Xcode).
Good luck.

Base SDK missing - red .app portion?

I am reading the provisioning profile stuff on the app store website and am having a heck of a time figuring everything out. I have my distribution certificates and everything but I think that something is massively messed up in xcode. When I switch to my distribution profile in the overview pulldown - it immediately changes to "Base SDK Missing". AND - when I scroll down to the projects portion on the left side - my .app file is red? Very confused.
The .app file is red because it hasn't been built yet for that specific set of build settings, which is normal behavior. The error is the "Base SDK Missing" message.
Have you installed multiple versions of Xcode? Are you perhaps editing a project with Xcode 3.2.3 that was created with an earlier version of Xcode? Xcode 3.2.3 only ships with the iOS 3.2 and 4.0 SDKs, meaning if your project was targeted for iOS 3.1.3 (for example), the new version of Xcode wouldn't have the correct SDK installed to build, resulting in that error message. You can try changing the "Base SDK" setting of the project to 3.2 or 4.0, make sure the correct "Configuration" option is selected from the drop down.
Distribution file is just for when you want to build for the AppStore, in which case all you can do is build the .app file (which is stored in the build directory of your project folder). You cannot run or debug that version of the app on a device since it is codesigned by Apple specifically for release in the AppStore only.
If you're just testing the waters or working on tutorials, try out the "Debug" option so you can install it on the device (iPod Touch, iPhone, iPad) in which case the provisioning profile is used to allow you to run the app on the device.
You can use whatever SDK you want via the same drop-down menu for the overview pulldown (i.e. 3.0, 3.1.3, 3.2, etc). You can also change this option in the Project settings menu for both the target and the project settings. There is a section called "Base SDK" in the Build menu I think.
The .app file will be red there in the project tree so don't worry about it and you'll never really need to do anything to that file in XCode. Just realize that it builds the actual .app file in your project folder in the Mac OS Finder.