Is there any tool to generate Object Graph on iOS app runtime? - objective-c

I know there are Class Model tools (OmniGraffle, Doxygen) to generate Class model diagrams from the existing Xcode projects. But i'm looking for a tool which generates Object Graph on running iOS app in Simulator or Device.

You may be interested in
ObjectGraph-Xcode
objc_dep

I would recommend to use KSHObjcUML here.
It creates a nice interactive dependency graph to analyze in your browser.
Easiest to install with Alcatrazhere, a plugin package manager for Xcode 7. It is as easy to install plugins as it is to click a green button. And it does even support ObjectGraph-Xcode too.

Related

How to compile ios example in tensorflow

I just realized the tensorflow has supported ios now. But how to compile the example in contrib/ios_examples directory?
thanks!
josh
We're still finishing off all the documentation, but here's a draft of the README I'll be adding to the ios_examples directory. I'd be interested to hear if this helps, and if you have ideas for improvements.
TensorFlow iOS Examples
This folder contains examples of how to build applications for iOS devices using TensorFlow.
Building the Examples
You'll need Xcode 7.3 or later, with the command-line tools installed.
Follow the instructions at tensorflow/contrib/makefile to compile a static library containing the core TensorFlow code.
Download Inception v1, and extract the label and graph files into the data folders inside both the simple and camera examples.
Load the Xcode project inside the simple subfolder, and press Command-R to build and run it on the simulator or your connected device.
You should see a single-screen app with a "Run Model" button. Tap that, and you should see some debug output appear below indicating that the example Grace Hopper image has been analyzed, with a military uniform recognized.
Once that's been successfully run, make sure you have a real device connected and open up the Xcode project in the camera subfolder. Once you build and run that, you should get a live camera view that you can point at objects to get real-time recognition results.
Troubleshooting
If you're hitting problems, here's a checklist of common things to investigate:
Make sure that you've run the download_dependencies.sh and compile_ios_protobuf.sh scripts before you run compile_ios_tensorflow.
Check that you have version 7.3 of Xcode.
If there are Eigen errors, look inside the build settings of your Xcode project. In the Search Paths section, you'll see an Eigen include directory that changes with each version of the framework. You may need to update this to may the version in your tensorflow/contrib/makefile/downloads folder.
If there's a complaint about no Session's registered, that means that the C++ global constructors that TensorFlow relies on for registration haven't been linked in properly. You'll have to make sure your project uses force_load, as described below.
Creating your Own App
You'll need to update various settings in your app to link against TensorFlow. You can view them in the example projects, but here's a full rundown:
The `compile_ios_tensorflow.sh' script builds a universal static library in tensorflow/contrib/makefile/gen/lib/libtensorflow-core.a. You'll need to add this to your linking build stage, and in Search Paths add tensorflow/contrib/makefile/gen/lib to the Library Search Paths setting.
You'll also need to add libprotobuf.a and libprotobuf-lite.a from tensorflow/contrib/makefile/gen/protobuf_ios/lib to your Build Stages and Library Search Paths.
The Header Search paths needs to contain the root folder of tensorflow, tensorflow/contrib/makefile/downloads/protobuf/src, tensorflow/contrib/makefile/downloads, tensorflow/contrib/makefile/downloads/eigen-eigen-, and tensorflow/contrib/makefile/gen/proto.
In the Linking section, you need to add -force_load followed by the path to the TensorFlow static library in the Other Linker Flags section. This ensures that the global C++ objects that are used to register important classes inside the library are not stripped out. To the linker, they can appear unused because no other code references the variables, but in fact their constructors have the important side effect of registering the class.
The library doesn't currently support bitcode, so you'll need to disable that in your project settings.

Where has the JavaFX scene builder gone?

I am trying to find the elusive JavaFX scene builder so I can use it in Intellij. I am on Windows OS.
Oracle have stated that the JavaFX scene builder is included in a new download, but no matter how I search I cannot find it (see http://www.oracle.com/technetwork/java/javafx/downloads/index.html). I think they have linked to the incorrect page and Googling for it is getting me nowhere.
I already have Java 8 SDK installed and working fine. Apparently JavaFX is now included in that, but nowhere in the Java folder can I find the scene builder and it seems to be completely missing online.
Please can anyone help? I am just wanting to write a small GUI program and it seems like JavaFX is the way to go (if it isn't then feel free to disabuse me of this notion!)
With JDK8u40, according to this:
Starting with Oracle Java SE 8u40, Oracle does not provide a separate set of accompanying JavaFX Scene Builder binaries. If you would like to contribute changes, ideas or just let us know what you have done with the code, please consult the OpenJDK Community contribution guidelines and join the openjfx-dev mailing list.
You can still download the last binary at Oracle in this link. But check this warning:
WARNING: These versions of JavaFX Scene Builder may include components that do not contain the latest security patches and are not recommended for use in production.
This means it doesn't include the last changes of 8u40, like the new Spinner control.
Alternatives
The project is open source, and you can find the updated code at the OpenJFX repo. So you are free to download it and build it.
Since its released under BSD license, Gluon is offering support for an updated version of Scene Builder, and you can download an installer for your platform or an executable jar from here.
Besides, they have an open repository where anybody can contribute.
Install JavaFx Scene Builder (Gluon) with Intellij 14 on Windows with JDK7
This will probably work with Java 8 as well but I am using 7 so I didn't test 8.
I know this has been answered but this might be helpful for future Intellij users. To get scene builder to work with Intellij 14 use the following steps.
Install Scene Builder for Windows. Download/Install From Here (Windows Installer (x64))
Set Scene Builder path to executable in Intellij. File -> Settings
-> Languages And Frameworks -> JavaFx By default mine installed under C:\Users\kris\AppData\Local\SceneBuilder\
Open your .fxml file. Click on the scene builder tab.
UPDATE 2019:
The default install path appears to know be "Program Files" C:\Program Files\SceneBuilder\SceneBuilder.exe
JavaFX plugin might need to be enabled in Intellij 2019
On a mac, in Intellij, you need to go to preferences, then type JavaFX and then do this. Please look at the attached Image.

Can IDEA automatically add Android support library?

Is it possible with IDEA 12 (like with Eclipse) to automatically add Android support library either on demand or on project creation (like in Eclipse)?
So far we had to go to extras directory in Android SDK and copy the library manually. I wonder if it had changed?!
This functionality is missing right now, please submit a feature request.

How to unlink a framework on program start

I am developing for iPhone OS 3.1.3 and I need to use Dropbox API.
The problem is the Dropbox API requires at least iOS 4.2. Ok.
I decided to save the possibility of using the program under 3.1.3, but if it is 4.2 and higher, there will be Dropbox functionality.
To use Dropbox framework I needed to link another frameworks:
Security.framework
QuartzCore.framework
I have done this.
When I link Dropbox.framework to my project, the program works great on iPhone Simulator, but it cannot be started on my iPhone 3.1.3. There is an error in Output:
dyld: Symbol not found: _kSecAttrAccessible
Referenced from: /var/mobile/Applications/C1FC10E5-0A36-4DEB-BD27-5028C205C89D/Bus Time.app/Bus Time
Expected in: /System/Library/Frameworks/Security.framework/Security
in /var/mobile/Applications/C1FC10E5-0A36-4DEB-BD27-5028C205C89D/Bus Time.app/Bus Time
So the question is:
Can I detect the iOS version on the program start and unlink the framework?
Or could you offer an another way to use dropbox for 3.1.3?
Thank you for your answers. I appreciate it.
You cannot programmatically unlink a framework at runtime.
You can programmatically link a framework at runtime, e.g. by using the NSBundle APIs, or dlopen, or various other ways. If you do so, you have to then manually load the ObjC objects and/or C symbols you want.
Alternatively, you can weak-link the framework, which makes the runtime do most of the work for you. If it's there, it will be loaded in at startup, and all of its ObjC objects and C symbols will be available to you. Otherwise, all of its ObjC objects and C symbols will be null. So, all you have to do is check for null to decide whether to run the code that needs that framework.
Select the Security framework in your file list.
Expand the right sidebar (View > Utilities > Show Utilities).
Under 'Target Membership' change 'Required' to 'Optional.'

Can I produce a native exe using flash builder and air

Can I produce a native exe using flash builder and air.
I don't want the user to have to get any other dependencies such as air etc. I want everything bundled into a native application, a single exe perhaps that I could produce my own installer using nullsoft or similar.
I've searched around and spoken to people and come to the conclusion that no one is sure, seen some yes and no's.
With flash builder 4.6 they have included the captive build process in the gui. This enables you to produce an exe that is bundled with the AIR Dll's and requirements without the end user ever needing to install Adobe AIR.
Correct: Flash Builder 4.6 has the option right there in the Project menu option, when selecting "Export Release build" :-)