Is it possible to have the titanium build command leave out certain parts of code?
We have a demo version app, and I would like to be able to leave this part out when building for the AppStore so I do not have to take it out by hand.
Does anyone know of a way to do this ?
Thanx for your help.
Chris
Is this code you want to have only on Android or is it just code in general that you want to leave out?
When the Appcelerator CLI builds the code it will automatically discard code that does not actually get run by any other code, for example if you have a function like the function below or even just a variable that never gets used when you compile you will see that that code is not even in the final compiled code. This is what I have learned from checking the build for Android and I believe it would be the same for iOS
function neverUsed(){
var neverUsedVar = "blank";
}
Related
I have set my development environment on another system with everything new. Latest android studio version, flutter, and everything.
Now I am trying to run my previous code but the whole code is full of errors. The code was working perfectly fine on my previous version of flutter. I didn't get the issue with this new version.
Here is the screenshot of my code:
1
Anyone please help me to solve this issue. This is my whole project with some other code as well and there are nearly 70 files of code.
I would be thankful if anyone can help me with this issue.
Thanks
Well, you semed to have had a really, really old version of Flutter (and Dart) before.
One way to fix those errors is to read and understand the guide to null safety and modify your project. It will be better after you do it, null safety is an amazing feature.
If you don't have the time to do that right now, you should be able to just constrain your SDK to an earlier version. Quite frankly I'm surprised that you got null safety out of the box because your project should have had constraints. If you set the minimum SDK version to something smaller than 2.12 you should be running without that feature. But please note that sooner or later you will need to enable it, you cannot stay on an obsolete version. So maybe it's time to do that now.
This is because Dart introduced null safety. You have to make your code null safe by using various annotations and operators. You can learn more about them here -
https://dart.dev/null-safety
https://dart.dev/codelabs/null-safety
https://dart.dev/null-safety/understanding-null-safety
This seems like a basic request, but I can't find the answer to it anywhere. I want to wrap some existing iOS code that I wrote, in a Appcelerator module. That's it. Important points:
I am NOT wrapping a pre-existing 3rd party iOS SDK.
I wrote the iOS code being wrapped.
Code is verified as working within xcode.
There are no .a files. There are 2x .h files and 2x .m files though.
There are no UI elements in the iOS code as it is only designed to connect the native bluetooth hardware to the app.
I have created a generic appcelerator iOS module project, built it, and successfully called the generic ID function within my app.
I cannot figure out how to successfully edit the generic module so that it utilizes my code. Every attempt results in it refusing to compile, and it's maddening.
I do not have access to Hyperloop.
Once I can successfully build the wrapped module, I would call an initialization function which triggers a native bluetooth hardware search. Once connected, there are functions within the module to send commands to the hardware and receive data back. This is the official documentation I've followed so far:
http://docs.appcelerator.com/platform/latest/#!/guide/iOS_Module_Quick_Start
That helped me build the blank module, include it in the app, and ensure that it worked by calling the built in test property. From there it stops short of actually telling me what I need to know. These are the closest things I've found so far, while still not being what I need:
http://docs.appcelerator.com/platform/latest/#!/guide/iOS_Module_Project-section-43288810_iOSModuleProject-AddaThird-PartyFramework
appcelerator module for existing ios project sdk
Heck, I still don't even know if I can do this within studio or if I have to edit the generic module in Xcode. Help! :) Many thanks in advance.
so first of all, this is not best practice and will cause possible problems in the future when the SDK changes and your module still relies on outdated core API's.
Regarding your question, you could either create a new component that subclasses the existing class, e.g.
class TiMyModuleListViewProxy : TiUiListViewProxy {
}
and call it with
var myList = MyModule.createListView();
or you write a category to extend the existing API with your own logic, e.g.
#interface TiUIListViewProxy (MyListView)
- (void)setSomethingElse:(id)value;
#end
#implementation TiUIListViewProxy (MyListView)
- (void)setSomethingElse:(id)value
{
// Set the value of "somethingElse" now
}
#end
I would prefer the second option since it matches a better Objective-C code-style, but please still be aware of the possible core-changes that might effect your implementation in the feature. Thanks!
Is it possible to create an iOS library or framework using libgdx (RoboVM) that can be imported into Xcode?
Background:
One of my colleagues has created a 3D visualisation app as a libgdx project for android and windows desktop. It can be compiled to run on iOS using RoboVM. However, I would like to wrap extra native user interface elements around it using Xcode. I know its possible to build the user interface programmatically via RoboVM but I would be keen to investigate if its possible to bring the existing work into Xcode. I don't need to edit the 3D visualisation component but add extra GUI elements around the 3D Vis window. I thought compiling the libgdx (RoboVM) code to a framework or library might be a solution that could be imported?!
Yes you can do it.
All you need to create a method, say initRoboVM(), This will be called by your code when you want to initialize libgdx. You'll need to pass the app path in, which you can hardcode when you're testing.
initRoboVM() will need some modifications, namely it should not call your Java app's main method, well, at least, that's what well behaving libraries should not do IMO. It should also not call rvmShutdown.
You can get further information from here
Thanks :)
I asked the RoboVM team directly. Their answer: It's not a native function, but it certainly can be done.
The complete message...
Hi,
Sorry for the late reply. This use case is not something we're going
to do now. It is possible though if you're prepared to do some
patching of RoboVM. Search the RoboVM Google Group and you should find
others who have managed to get this working.
We get this request every know and then so we will add support for
this eventually.
Regards, Niklas
Does the G'MIC (Grey's Magic Image Converter) library work on iOS ?
what steps i should take in order to begin adapting it?
this is library link http://gmic.sourceforge.net/gimp.shtml
So long as it's written in C++, it should have no problem running on an iOS device. You could even write a thin ObjC++ wrapper for it to make your life a bit easier, but in it's current form, it should work smashingly.
so I followed the tutorial at
http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray/
It compiles and run successfully but it only shows Fruits at the top and no items.
Same thing happened when I followed another tutorial. Does anyone know how to fix this or what the problem is?
brute force:
run the code in the debugger with breakpoints on the entry and exit of every function learn what it's doing and see where it's failing. (At least on all the functions that display data or build data to be displayed)
optionally (since the code you linked to is 2 years (and 2 OS versions) old):
pick the sample code from apple that does the same thing (sorry, I don't know which one off the top of my head)
Did you perhaps miss some code in the applicationDidFinishLaunching block in the example at the link provided?
Or perhaps didn't link the FruitViewController to the view?
So I dont think it has to do with the guide. It has to do with some settings maybe? Somehow the xcode is not connecting to the iPhone simulator?