Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • in reply to: Login Session failed #43529
    ul
    Participant

    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 sharedInstancesetCliend_id:@”4b5ac28b-28f9-4695-b784-b7665dfe3763″];
        [[CPScioCloud sharedInstancesetRedirect_uri:@”https://www.consumerphysics.com”];
        [[CPScioCloud sharedInstancesetEnableLogs:YES];

     

        [[CPScioDevice sharedInstancesetEnableLogs: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. :wacko:

    • This reply was modified 8 years ago by ul. Reason: I had forgotten 4a. step
    • This reply was modified 8 years ago by ul.
    • This reply was modified 8 years ago by ul.
    in reply to: Login Session failed #43419
    ul
    Participant

    Yes, 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.

    in reply to: Login Session failed #43415
    ul
    Participant

    Is this problem resolved? I have same problem in swift 2.2.

    • This reply was modified 8 years, 2 months ago by ul.
    in reply to: What about Alcohol? #43409
    ul
    Participant

    Bernard, 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.

     

    • This reply was modified 8 years, 2 months ago by ul.
    • This reply was modified 8 years, 2 months ago by ul.
    in reply to: Beer Classification #43233
    ul
    Participant

    Hello 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

Viewing 5 posts - 1 through 5 (of 5 total)