Detecting air printers - xcode

I want to detect air printers in my app and connect to them. How can I do this for iOS3.1, 3.2, 3.3, ... ??? For iOS4.2 is supported the UIPrintInteractionController but this don't work on lower versions.

You can't. It's an iOS 4.2 feature; the relevant code is in iOS 4.2 only. You'd have to reverse engineer and reimplement the entire protocol.

Related

Swift OptionSetType protocol availability

I'm writing an app in SWIFT 2.0 using Xcode 7, but my deployment target is iOS7.
While writing and OptionSetType struct, I've seen in the Quick Help that the availability of this protocol is iOS9.
In the "header" and official documentation nothing is mentioned, but I'm really wondering if this protocol is also available in lower iOSes versions since SWIFT 2.0 should be fine until iOS7.
Since all swift standard library ships with your app to AppStore, all this protocol will be available on iOS 7 and above.

Adding maps to osx application using xcode 6

Is there a way to add google maps or mapbox to osx app built with swift in xcode? Both websites only show api for ios. Is there any option to add maps to osx app without using apple maps?
I recently ported the Mapbox iOS SDK to OS X. It can be used with either Objective-C or Swift on OS X 10.10.0 and above. Until there’s an official release, you’ll need to clone the mapbox/mapbox-gl-native repository on GitHub and build the project from source. Most of the Mapbox iOS SDK documentation applies equally to the OS X port. The project comes with a demo application as well (via make xproj).
Update: You don’t have to build it from source anymore! See https://github.com/mapbox/mapbox-gl-native/releases/ for prebuilt releases of the Mapbox macOS SDK. (Look for releases beginning with “macos-”.) See the SDK’s homepage for more information and an API reference.
There is no google-maps SDK for OS X. Your only way to go to is add a webView into your app and load a html that contains maps api calls linked to your AUTHORIZATION TOKEN.
Technically Mapbox GL runs on OS X, but it's direct C++, which means that you'd have to wrap it in Objective-C in order to use it with Swift, but it is possible.

OSX and OpenGL 4.x compatibility

I'm working on a portable application that should run on OSX-Lion as well.
From what I read here OpenGL/GLSL support seems to be 3.2/150 can someone confirm this?
My application requires at least GLSL ver 400. Is there a way to have it running on Lion? Some cards (i.e. ATI HD6770) are OpenGL 4.1 compliant. Does it mean it can go only as far as 3.2/150 under OSX?
confirmed by alternate source, osx opengl 4.x support is still TBA

Explicitly set base SDK to 3.2 to catch compiler errors

We're building an iPad app and don't plan to use any APIs that are not available in iOS 3.2. Our deployment target is already set to 3.2, but I would like to set our base SDK to 3.2 so that we get compiler warnings/errors if we accidentally invoke APIs not available in 3.2, rather than runtime failures.
Is this a good idea? If so, is the 3.2 sdk still available for download, and will older sdks work with newer XCode versions, like 4? Thanks.
There's no guarantee Xcode will support older SDK versions but as an example the current install of Xcode 4 goes all the way back to 3.0. I would drop 3.2 if I were you (few iPad users are on that; most iOS apps enforce 4.X in the App Store so I'd bet most people have upgraded) but if you are going to support it perhaps you should consider using conditional code for different OS' versions.

Debug for iOS 3.x in xcode with SDK 4.1

I've downloaded the latest SDK from developer.apple.com and can only pick 3.2 or 4.1 from Project > Properties > Base SDK.
My iPhone is 4.1
My client have iPhone 3.x
You feel the problem...
How can I debug for iOS 3.x in xcode with the 4.1 SDK installed?
Actually that's a very frequent question (was lazy, only linked one).
Short version: you need to set your Base SDK to the highest SDK version you've got and your project's Deployment Target to the lowest version you like to support, e.g. 3.0. This means, the Deployment Target specifies the oldest version your app should be able to run on. But beware, this setting does not prevent you from accidentially calling, say, methods available since 4.0 on an 3.0 iPhone and thus causing a method missing exception.
This isn't possible have I come to understand.
You have to buy a old iPhone 3.x.
If you want my opinion on this, then I think this is horrible, frustrating and completely not understandable.

Resources