Torch and other old versions compatible problem - blackberry

I developed an application with simulator 4.6 and 5.0 then a couple of weeks later, today I finished the Torch version of my application (JDE 6.0 and simulator 9800)
My application works great with Torch but for the other older versions I got a
class net.rim.device.api.ui.ScrollView error.
I googled and found some advices like a "try with JDE 5.0 or stg else" but I didn't work.
So how can I solve my problem? Is it possible for a application to works with every model of BlackBerry Device?

The ScrollView is not part of the API before version 6.0.
You will have to use a normal view(Manager) and send in the property to use scroll.
http://www.blackberry.com/developers/docs/5.0.0api/net/rim/device/api/ui/container/VerticalFieldManager.html
Behaviour A vertical field manager
lays out fields top to bottom in a
single column. You can build this
manager with Manager.HORIZONTAL_SCROLL
to accommodate fields wider than the
manager's visible frame; you can build
this manager with
Manager.VERTICAL_SCROLL to accommodate
collections of fields taller than the
manager's visible frame.

You want to use the BlackBerry Preprocessor, and generate a build for each version of BlackBerry OS you support.

Related

No map tiles loading when using Mapbox legacy when compiling with Xcode 7

I'm currently in charge of maintaining a legacy application, written in Xamarin (without .Forms, I code individual UIs per platform).
The code uses a rather very old version of Mapbox iOS Mapbox iOS SDK Legacy.
My problem is, the map remains white, even though all our custom map pins are all loaded without a hitch. It's as if the tiles are not loaded.
I have compiled old versions of the app that were released successfully, but the problem persists.
The only difference between my current setup and the guy who coded it before me is, that I'm using a newer XCode version (Version 7).
Due to time constraints and existing code, refactoring the whole solution to use a more modern Mapbox implementation would only be my very last resort.
Does anybody have an idea what may be wrong, or what I could do? (Also non-Xamarin suggestions are more than welcome)
Thanks in advance,
Cheers
Turns out the solution was in the URL the base tiles were fetched from.
Apparently the component fails quietly on iOS 9.2 when trying to load tiles from an http source.
I changed the url to https and now it works like a charm.

Do iOS/UIKit controls automatically change their styling for different iOS versions?

Sorry if I use the wrong terminology, I'm not an iOS developer so I'm mapping everything back to equivalent features in Windows ...
If I write an iOS application that creates controls using standard UIKit functions, and I run that exact same application on various versions of iOS, will the application look slightly different on the different versions of iOS? Or does the application always use the styling of the version of iOS I select for the target version in Xcode?
And in a related question, is there a web site somewhere showing how the various controls have changed their look through the various iOS versions?
Generally no. Since iOS7 to current iOS release - all standard UIKit controls look the same. On iOS6 and lower things are drastically different. If you target iOS7 and up (As most devs do now since hardly anyone is on iOS versions lower) - you can be rest assured that all usage of standard UIKit controls will look exactly the same.

Project is buggy after upgrading Xcode

I have an old app I maintaining. The app was first compiled on XCode 4.2. If I take the exact same project that works find and compile it on XCode 4.6 I'll get weird bugs such as ViewControllers not refreshing, Back doesn't work as it should etc'. If I'll take the same project and recompile it on xcode 4.2 on my other machine everything will work fine. Before I'm digging into the code, can someone give me an idea why something like this may happen? My main suspect is the Base SDK of each Xcode. Does that make sense?
I couldn't tell you if there will be a difference between 4.2 and 4.6, but historically the iOS frameworks on the device (and, to a lesser degree, the simulator) do adapt slightly depending on what version of the SDK an application was compiled against. You can't rule it out.
A classic (though now ancient) example is backgrounding. Apps built against older SDKs were quit when the Home button was pushed, rather than getting the newer behaviour. More recent (but subtle) examples have included several changes to table views and changes to device rotation.
You should not attempt to build with an older SDK using a newer compiler. Apple doesn't support that kind of configuration. You should always use the latest SDK. And you wouldn't want to pretend these problems don't exist, anyway: The bugs are real, they were just hidden before.
It's unlikely that you won't be able to fix those bugs in such a way that the older versions of iOS continue to function (though you may discover it opens a can of worms that you decide isn't worth fixing for older OSes).

iOS 6 Collection View

I love those collection views Apple introduced in iOS6 SDK. But my iPad is not getting an upgrade to 6.0, so theres a question. If I set the deployment target to 5.1, will I be able to use those new GUI elements they added in 6.0? Or do I have to code something like a Collection View myself?
You might want to take a look at PSTCollectionView.
Open Source, 100% API compatible replacement of UICollectionView for iOS4.3+
UICollectionView class is only available for iOS 6.0 or later. You have to set the deployment target to 6.0 (or later) in order to use it. Xcode 4.5 or later supports iOS 6 development.
Building on what ohho said, you don't have to build for 6.0 and later to use this, you can use it if it's available by checking the presence of the class at runtime, you can still set your deployment target to say 4.3.
All this means is that you must check at runtime if you have the UICollectionView class. If you don't then you must do whatever you did before, I usually used AQGridView.
To find out how to check at runtime for a class and or feature, please check out this post: https://stackoverflow.com/a/12590035/662605

Monodroid cleartask flag available?

I need to run an activity and remove all the other activities for my application to save memory. I have seen in the sdk that the flag FLAG_ACTIVITY_CLEAR_TASK does exactly this but I can't find it in the ActivityFlags enum in monodroid.
Is this possible to be done with monodroid?
ActivityFlags.ClearTask is available in Mono for Android. However, Android didn't introduce this flag until API version 11, so I'm guessing that you're targeting a previous version. In order to use this flag, you'll need to update the minimum version of Android you target to 3.1, which is configurable in the project's properties page.
Edit: This question has some other approaches you can take to do this on previous versions of Android.

Resources