Error in using Speech to text functionality in xamarin ios - ios

I am trying to use "speech-to-text" functionality in xamarin ios. But I am getting following error after adding "Using Speech;" in my class file.
Your application is using the 'Speech' framework, which isn't included in the iOS SDK you're using to build your app (this framework was introduced in iOS 10.0.0, while you're building with the iOS 10.0 SDK.) This configuration is only supported with the legacy registrar (pass --registrar:legacy as an additional mtouch argument in your project's iOS Build option to select). Alternatively select a newer SDK in your app's iOS Build options.
How I can use "Speech" in xamarin ios app?

Check your Xcode version first. Whether is the latest version.
Check also iOS project Options->iOS Build->SDK Version, whether is using correct SDK version. For mine, it is set to Default which is 10.3 now.

Related

Does user's iOS version limit their ability to install an app from the app store, is there a way to make it universal? [duplicate]

I wanted to ask how compatibility on different iOS operation systems works in iOS. For example If I develop an app on Xcode 9.2 and Swift 4 for iOS 11, should it work on iOS 9?
I am coming from Android background which you specify the minimum Android OS that is needed for the app to run in the Gradle file. Does anything similar exist on iOS?
Very simple solution:
Set deployment target as 9.0 in your build target general settings. iOS will automatically handle support from 9.0 onwards for a build (your app).
Your app/build will be allowed to use/import frameworks and other libraries, compatible to minimum deployment target, only.
More detail about App Deployment Target from Apple.
Please set your deployment target to 9.0
Yes, it will work on iOS9
With Xcode 9.2 and swift4 you can develop an application for ios8.0 and above.
In your project setting, you have to select your development target
Yes, there is backward compatibility, but for older iOSes you have to check version when using newer API. Luckily we've got availability attributes (#available)
If you want to know HOW it works, basically for Swift your application has its own swift standard library embedded into binary of your application. In case of Objective C – newer iOSes keep sdk's of older versions to maintain backward compatibility.

How build Xamarin against older version of iOS SDK

I'm trying to build my Xamarin Forms app for the Apple store using Xamarin Studio on my MacBook. This worked fine until recently.
The only options available to me on the SDK version dropdown on the iOS Build tab are Default and 8.3. If I build using either of these and try to upload to the store I get the following error:
ERROR ITMS-90068: "This bundle is invalid. The value provided for the
key MinimumOSVersion '8.3' is not acceptable."
I guess this is due to updating all Xamarin and Xcode components to their latest versions recently.
I'm trying to figure out how to get the 8.2 SDK back.
I tried downloading the iOS 8.2 Simulator from Xcode > Preferences > Downloads but that doesn't seem to have added anything in the Xamarin SDK version dropdown.
Any ideas?
You're confusing the SDK version used to build your app with and the minimum iOS version your app requires.
It's perfectly possible to build an app using the iOS 8.3 SDK and target iOS 5.1.1 for instance.
You need to set the minimum iOS version for your app instead of changing the SDK version; this is done in the project's iOS Application options, by setting Deployment Target to your app's minimum iOS version.
This is what I did to resolve the issue:
Right click on the .iOS project > Options
Set Build > iOS Build > Link behaviour to Link Framework SDKs Only.

XCode base SDK version in code

How can I get the version of the base SDK in code? I am currently building for iOS in XCode 6 and using the base SDK 8.1 . I would like to know if there is any define with the value of the SDK to be able to test it and allow building with different base SDKs.
You can find out the version of the current Foundation framework that the code is running against by checking the value of NSFoundationVersionNumber.
If you check out the NSObjCRuntime.h you will find the various version numbers listed in there.
As in regards to building against different versions of the SDK; Apple stops App Store uploads if you don't build against the latest SDK once the cut off date has come into effect - i.e. new apps submitted now must be build against iOS 8 SDK.
What you can however do, is have a lower iOS Deployment Target (this you can find in your project's settings). This will allow for your app to run on older iOS versions, but it will still be built against the latest SDK. Do note though, it is your responsibility to ensure that you do not use any new APIs without first ensuring the current environment supports them e.g. UITextField's selectable property.
If you call that whilst running on iOS 6, your app will crash.
This can be done using __IPHONE_OS_VERSION_MAX_ALLOWED (which is the same version as the base SDK version). That can be compared to __IPHONE_8_0 where 8_0 is the iOS release.
For example, at this point you can use the baseSDK 8.0 or 8.1.

ios 5 xcode 4.2 doesn't have ios 4.3 as a base sdk option

in xcode 4.2 I don't have any option to choose a different base sdk other than ios 5. I want to make sure my app works for ios 4.2 and higher. How can I get these to show up?
In Xcode choose the deployment target OS:
From Apple's documentation:
iOS Deployment Target
Code will load on this and later versions of iOS. Framework APIs that are unavailable in earlier versions will be weak-linked; your code should check for null function pointers or specific system versions before calling newer APIs.
Base SDK
The name or path of the base SDK being used during the build. The product will be built against the headers and libraries located inside the indicated SDK. This path will be prepended to all search paths, and will be passed through the environment to the compiler and linker.
In Target sdk select a lower version of iOS.

how can I change ios sdk?

I want to change my iOS SDK. I have ios 5 and xcode 4.2 but I have to decrease it to iOS 4.2 SDK because of my application. In developer.apple.com the xcode 4.1 with iOS 5 so it is not available. How can I find xcode 4.1 with ios sdk 4.2 or how can I setup the ios sdk 4.2 without download xcode again. If it is not possible can you give me a linq for download xcode 4.1 with ios sdk 4.2
The base SDK should be the currently available one - it's the version of the SDK that you have installed to compile against.
However, further down the settings list you'll see that you can set the "Deployment Target" to be for lower versions iOS. That's the one that specifies the lower version of the OS that you app will run on.
Latest SDK included all required features from previous SDK versions. You shouldn't worry about it. If you want to support previous versions of iOS just set iOS Deployment Target to iOS 4.2 (or another would you like) in project settings at Build Settings tab.

Resources