Skip to content

A sample App Project that call an ObjectiveC Package (built base on CasperObjectiveCSDK)

Notifications You must be signed in to change notification settings

hienbui9999/SampleCallToObjectiveCPackage2

Repository files navigation

SampleCallToObjectiveCPackage2

This is an ObjectiveC project that call an ObjectiveC package at this address:

https://github.com/hienbui9999/ObjectiveCPackageCallCasperSDK

This sample project is just to demonstrate the ability of calling ObjectiveC package that is built base on ObjectiveCCasperSDK.

The flow of using is somehow like this.

The Casper ObjectiveC SDK is at this address:

https://github.com/tqhuy2018/Casper-ObjectiveC-sdk

There is an ObjectiveC package that is built base on that Casper ObjectiveC SDK, which can be found at this address:

https://github.com/hienbui9999/ObjectiveCPackageCallCasperSDK

This ObjectiveC project call this package just to do the work of get the state root hash.

Download the source code, select a target for this project (For example Ipad (8th Generation)), build and run the project, you will see the State root hash is retrieved and printed out in the Log panel.

Press Cmd + Shift + Y to show the log to see the State root hash.

The package is loaded into the App Project like in this image

Screen Shot 2022-06-03 at 15 51 13

If you wish to load the ObjectiveC package yourself, follow the step as described below

Screen Shot 2022-06-03 at 16 00 29

Do the next steps

Screen Shot 2022-06-03 at 16 12 54

Check all the check box when they are shown, then click "Add Package"

Screen Shot 2022-06-03 at 16 14 40

You will see the working region has changed a bit with the detail information as shown

Screen Shot 2022-06-03 at 16 16 40

Click the "ViewController.m" file to see the import of the ObjectiveC Package with this two lines:

@import LibCoreTarget; @import LibFullTarget;

A more detail of what is used from the imported Package can be seen in this image

Screen Shot 2022-06-03 at 16 19 41

Choose a target for the project to run

Screen Shot 2022-06-03 at 16 27 44

Then run the project and see the result as shown in this image

Screen Shot 2022-06-03 at 16 24 18

About

A sample App Project that call an ObjectiveC Package (built base on CasperObjectiveCSDK)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published