I have a Utility Cocoa Framework, a class with a bunch of utility methods. I use this framework in several other app, without any problem. I just created a new app, and app is not able to recognise methods. Any idea why? I have not upgraded Xcode.
Embedded library set:
Utility method is public:
I have go though on this tutorial: https://www.youtube.com/watch?v=86cPaa3FrRg
ahh, .. I forget to select to run on Device, simulator not an option for me
Related
Im currently working on a Swift Framework using OpenCV (3.4.3), and im having some troubles or getting confused about how the build processes work.
Note I'm not using CocoaPods, Im using the framework file/folder provided by OpenCV
So my problem is that I'm creating the swift framework that depends on OpenCV, once I've built my framework and add/link it to a App (Its added to the embedded frameworks section), the app runs fine with no errors. This is where my confusion lies, I would expect to also add OpenCV to my app then have them link at runtime/compile time, but that's not the case OpenCV is magically linked and working. I have also double, triple checked that there is no references of OpenCV in the app to ensure its not getting pulled in anywhere.
For some sanity checks I created a basic framework called TestFramework, which had 1 class, with a static function just so I can test the above process. I added TestFramework to the main framework im working on, and built it. I then added that Framework to my app, and it would not build because the TestFramework was not present in the App as a dependency. Then adding the framework allowed it to build, and the main framework then was able to call the code within the TestFramework.
There seems to be some discrepancy between how the two work, unless the OpenCV framework is built in a different way allowing it to work without the app depending on it.
Any help or thoughts would be great, thanks.
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!
How does the minimal setup and usage of a custom iOS framework look like? I starting to look into this in order to share code with a Today Extension.
Here's what I did so far
Added a new Target choosing the Cocoa Touch Framework template and called it TesterKit
Inside the framework I created a new class TestClass.swift
Inside TestClass.swift I created a simple class method class fund tester() printing a string for testing
Looking at my app I can see that TesterKit has been added as Embedded Binaries and Linked Frameworks and Libraries, however it is red
In order to use this new Framework in the app, I added import TesterKit to the top of my AppDelegate
Then I tried to call the class method from the Framework using TestClass.tester(). But instead of showing the log message I get a …
"Use of unresolved identifier"
→ What am I doing wrong? Any wrong assumptions here?
Note: I already watched the WWDC sessions 416 "Building Modern Frameworks" and found the Framework Programmign Guide. If there are any example projects showing how to use such new custom iOS Frameworks, ideally using Swift + integrating this with Today Extensions, that might be helpful, too.
It seems like your import is not failing which means the framework is actually set up correctly...try making the function public.
public func tester() { print("tester()" }
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
I'm trying to create a static library of Openfeint for iOS, to use it in apps with only C++ calls. When I try to run the cocos2d-x test project with that library linked, the app is going frozen with any OpenFeint call. However, if I don't create the library and I add the sources directly to the test project, it works perfectly. I'm working with SDK 5.0, Xcode 4.2 and deploying target 4.2 (I think that it doesn't really mind, because I can run it without creating the library)
Thanks, regards!
Alternative: Use a wrapper provided on the official web to use ScoreLoop, like OpenFeint: HERE. It´s cross-plarform, work on Android, Blackberry and iOS.