Forum Replies Created
-
AuthorPosts
-
ulParticipant
Hi Ayelet,
Thank you for pointing out about code in AppDelegate.m.
I manage to make it work, however not in pure Swift code, but I had to write objective-C wrapper.
For those who struggle with same problem in Swift:
1. Add new File -> Cocoa Class -> Name Your Class (Mine is “Wrapper”), Subsclass: NSObject, Language: Objective-C -> allow Birgde-Header to be added.
2. Add Method to your Objective-C .m and .h file, for Example -(void)test;
3. Copy following code to newly created method in Objective-C to .m file:[[CPScioCloud sharedInstance] setCliend_id:@”4b5ac28b-28f9-4695-b784-b7665dfe3763″];[[CPScioCloud sharedInstance] setEnableLogs:YES];[[CPScioDevice sharedInstance] setEnableLogs:YES];This code is from SampleApp
4. Go to your Bidging-Header file, and add #import “Name Your Class.h” (mine is: #import “Wrapper.h”)
4a. Also add #import <ScioSDK/ScioSDK.h> on top of your .h file
5. Go to your AppDelegate.swift, add the following code to func application: UIAplication, did FinishLaunchingWithOption… it is the first method in this file:var someName = Wrapper();
someName.MethodName(); (mine is: someName.test();)6. Run the App, don’t forget to turn Wifi on, on your iPhone/iPod.
and Voila it should work.ulParticipantYes, I see that there is no way to call a Class Method from framework. I also tried with Bridge-header, but it is not working.
Maybe solution is simple: this framework is written only for Objective-C usage and simply cannot be used in Swift.
If you find solution in Swift, please post it.
ulParticipantIs this problem resolved? I have same problem in swift 2.2.
- This reply was modified 8 years, 1 month ago by ul.
ulParticipantBernard, I would like to recommend a book:
The Handbook of Organic Compounds by Jerry Workman, Jr.
In this book it is clearly stated that (Page 140):Acetic Acid can be detected at 895 and 995 nm
Lactic Acid can be detected at 925 and 1035 nm
I also built model that measure Ethanol in spirits, range 0-96% with results: R2 = 0.988 | RMSE = 3.409. However I would like to repeat experiment with accessory for liquids.
ulParticipantHello there, I would like to give some contribution for developing a beer model. I’m experienced brewer and software developer, so I think we can help each other. Please contact me at jankopovolny@yahoo.com.
Best regards,
Janko
-
AuthorPosts