Installing iOS SDK 4.1 on xcode 3.2.5 - xcode

I've read through a lot of posts and couldn't really figure out the answer to this question. So I apologize if I duplicating it here.
I have installed xcode 3.2.5 to my machine and it comes with SDK 4.2. My iPhone is on 4.1 and I am not planning to move it to 4.2 just yet. Problem is that I can't use this phone for testing. Since the only SDK that I have installed is 4.2, when I try to run debug with my iPhone, I get this message:
Can't install application
The info.plist for application at /blabla/app.app specifies a minimum OS of 4.2, which is too high to be installed on this device.
So, I got to Targets -> Get Info and I see that it is indeed targeting 4.2 (but that is the only option available - since I don't have the other SDK's installed).
So, the question is: how to I keep xcode 3.2.5, but install SDK 4.1 in addition to 4.2?

It took a while to figure this out.
I couldn't see 'iOS Deployment Target' on the info.plist either. Here's what I did.
a) Project -> Edit Project Settings
b) go to 'deployment' section
c) Change
'Targeted Device Family' = iPhone/iPad
'iOS Deployment Target = 'iOS 4.1'

Open up your info.plist in your project. There is a place where you can define for iOS 4.1.

Just open the previous SDK dmg, then go to Packages, and install the SDK 4.1 package.
More info : Install sdk 2.0 to 3.1 for xcode 3.2
Note : the "Packages" directory is not visible in the dmg since xcode_3.2.5_and_ios_sdk_4.2_final. Just use the Terminal (or finder "Go to folder") to open "/Volumes/Xcode and iOS SDK/Packages".
Edit : the xcode4.1 for Snow Leopard create an app called "Install Xcode.app". The packages directory is inside the app package.

The best way to do this is to find a copy of Xcode 3.2.4, with iOS 4.1, and install it in a separate directory. When you install, take the dropdown that's set to Developer and switch it to DevOld, or something similar. As there's no way to install new SDKs in the new version of Xcode, keeping multiple versions is the best you can do.
If you simply want to be able to run your app in 4.1, not necessarily develop in it, go into your target's settings, and under the build tab, set the iOS Deployment Target key to 4.1 or below.
Good luck!

What you need to do is:
In the BUILD section of the Project info click on Show and change its value from Setting defined at this level to All Settings.
In the updated list of settings you will surely locate the desired one.
Good Luck!

Related

Missing entitlement - 'UIBackgroundModes' value 'workout-processing' without the required entitlement 'com.apple.developer.healthkit'

I have released my app a couple of times and had the process under control until most recently when I updated from XCode 9 to XCode 10 due to a 3rd party lib requirement.
Everything seems fine when I compile and run on the emulator; but, when I come to the "Validate" (Archive) the app prior to uploading to the app store I am getting an error.
My Setup:
MacOS 10.14.2 (Mojave)
Using XCode 10.1 (10B61)
Error message:
Missing entitlement. watchOS extension
'XXX.app/Watch/aw-xxx.app/PlugIns/aw-xxx Extension.appex' uses
'UIBackgroundModes' value 'workout-processing' without the required
entitlement 'com.apple.developer.healthkit' signed into the bundle.
Watch Extension Capabilities:
The app is built using cordova-8.1.1 and cordova-ios-4.5.5
cordova build ios --buildFlag='-UseModernBuildSystem=0'
In addition to that, the project on XCode 10 has been set to 'Legacy Build System' on File -> Project Settings.
Lastly, the 'aw-xxx Extension.entitlements' has the 'HealthKit' key value set to 'YES' under the 'aw-xxx Extension' folder as one could expect.
Any help or pointers would be much appreciated.
I'm happy to provide more info, logs, etc as well, thanks!
After following the comment below I managed to get my app to validate once again on XCode 10:
Hi #guikeller Just wondering if it is related. I had similar issue while doing a ionic cordova app release. I figured the
com.apple.developer.healthkit
is missing in my platforms/ios/myApp/Entitlements-Release.plist. It does exist in Entitlements-Debug.plist. All I did is copied the key from the debug file to release and app store accepted it.
Source: https://github.com/apache/cordova-ios/issues/475#issuecomment-450174628
In addition to that, I was also able to submit my app into the app store.

How to require specific version of macOS?

For example: My Xcode project deployment target can be iOS 10.3 — Is there an equivalent to require macOS 10.12.4? (Latest SDK)
• iOS 10.3 is the latest update (can be targeted in Xcode).
• macOS 10.12.4 is the latest update
My goal/hope is to target the latest macOS update in the same way I can target the latest iOS update.
Verdict: It’s not (yet?) possible in Xcode. :(
While building you can define a deployment target. This is a specific API level for the minor versions of the operating system. This will run on all patch level versions for this particular minor version. So there is little point to set deployment targets on patch level.
You can check that you run your applications on certain operating system versions only though with a little code.
operatingSystemVersion and isOperatingSystemAtLeast(_:)seem to do what you want to achieve:
https://developer.apple.com/reference/foundation/processinfo/1414876-isoperatingsystematleast
You can then exit and deny using the application if the desired criteria is not met.
P.S. iOS deployment lets you chose iOS version 10.3 only too. There is no specific option for iOS 10.3.1 for example.
Can't you select such an option when you set your deployment target?
The page linked to also states:
Xcode sets the Minimum System Version key in the app’s information
property list to the deployment target you choose. When you publish
your app to the store, it uses this property value to indicate which
versions your app supports.
So you might change it by adapting the information property list as well I presume..
I was able to set a minor release version by editing my project's project.pbxproj file, located within your xcodeproj bundle.
Once you've located your project.pbxproj file, open it and
search for MACOSX_DEPLOYMENT_TARGET. You can set its value to any valid macOS version (no quotes needed).
The result is correctly displayed within Xcode's UI, and most importantly, is respected when compiling. I've confirmed this by using #available directives.

Is it possible to build iphoneos6.1 projects in Xcode 5, preserving the behaviour of views laid out in an Xcode 4.6.3 storyboard?

Our build server was recently updated to use Xcode 5's xcodebuild. We've installed the iphoneos6.1 so that we can still use iPhone SDK 6.1 for some legacy projects that do not yet support iOS7. However, when we use xcodebuild to build these projects using -sdk iphoneos6.1, we still see problems with UIViewController's contents being laid out underneath navigation bars and tab bars.
Is there some way to build these projects that were developed with Xcode 4.6.3/base sdk iOS 6.1 using Xcode 5's xcodebuild, but preserving the views as they were laid out in the storyboard developed using Xcode 4.6.3? I took a look at the man page for ibtool, but I'm not seeing any option related to choosing a target SDK, or anything else that seems relevant to the "extends edges" problem I noted above.
Note that we haven't updated the storyboard using Xcode 5 - the project is continuing to be developed in Xcode 4.6.3, and only touches the Xcode 5 toolchain when our build server clones the project's git repo and builds using xcodebuild.
Yes. On the Storyboard, go to the Interface Build Document section and there are two selection items. One for Builds For and one for View As. You can select anything from 7.0 down to 4.3 for the Builds For and you can select '7.0 and later' or '6.1 and earlier'.
While it isn't exactly what you are looking for, you can keep both Xcode 4 and Xcode 5 in the same build environment and control which xcodebuild is run by using an environment variable (see man page for xcrun. We have just set this up on one of our build servers. In your build definition, just set the following environment variable:
DEVELOPER_DIR=<path to Xcode 4.app>/Contents/Developer
For us, it ended up as:
DEVELOPER_DIR=/Applications/Xcode-4.app/Contents/Developer
This overrides the xcode-select setting and allows you to use the correct Xcode environment. Again, this depends on the ability of your build system to set environment variables, plus having both versions of Xcode installed. You can download older versions of code at Downloads for Apple Developers

Flurry Analytics

I've used a previous version of Flurry SDK with xCode 3.2.5 in my mobile application.
Recently, I upgraded to Mac OSX Lion and xCode 4.1. However, I'm finding it hard to integrate the Flurry SDK 3.0.0 with xCode 4.1.
I copied the FlurryAnalytics directory to my project directory, then added it in my xCode project. I changed every occurrence of FlurryAPI with FlurryAnalytics.
The ERROR that I get is:
"*No such file or directory FlurryAnalytics.h"
when I try to add
import "FlurryAnalytics/FlurryAnalytics.h"
in my Plugins/Flurry.m file or Classes/MyApplicationAppDelegate.m
I'd really appreciate some instructions to add FlurryAnalytics SDK 3.0.0 to my Xcode 4 project.
Well, the solution was simple.
I just had to add [drag and drop the folder] the Flurry SDK library/folder with the option "Create groups for any added folder". So that the folder gets added as a yellow folder.

Getting "Missing SDK in target picChoice: iphoneos4.0" error when building a test release of my app in Xcode 4, pvw 5

I have opened a functioning Xcode 3x project in Xcode 4.0 pvw 5 and am getting the following error whei I try to build a debug version of the app: "Missing SDK in target picChoice: iphoneos4.0"
I am trying to find where and how to remedy this, and I am coming up with bupkus.
I apologize if this is not very clear, but I am rather flummoxed by Xcode 4 so far....
Your problem was probably that Xcode 4 only came with SDK 4.2, and the project pointed to 4.0.
It's pretty common!
The solution is to go to the project info | Build settings | Base SDK and setting it to "Latest iOS" so that you don't have to touch it for future updates.
When you close the window, you'll have to switch config from debug to release or distribution and back so that it updates and Xcode removes the "Missing SDK" problem.
I just wanted to put the full answer up here to help others who have the same problem ;)
Ok...I resolved this, but I did not properly track HOW I resolved it....
I think my Target's Base SDK was not set, and I set it to: Latest iOS (iOS 4.2)....
I think that's how I did it....
But, now it builds with no errors and loads onto my iPhone as expected.
That is exactly what you needed to do. Xcode 4 introduced the Latest iOS. If you wish to test the app for older versions, select target > summary > deployment target and set that to an older iOS version and then in simulator you will see more version options available to you.

Resources