Skip to content

Commit

Permalink
patch
Browse files Browse the repository at this point in the history
  • Loading branch information
oligamiq committed Nov 23, 2023
1 parent fac1ab5 commit 916c1bf
Show file tree
Hide file tree
Showing 4 changed files with 227 additions and 2 deletions.
212 changes: 212 additions & 0 deletions examples/iphone/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions examples/iphone/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@ cacao = { version = "0.4.0-beta2", features = [
"autolayout",
], default-features = false }

# this library
nick-name = { path = "../../" }

[package.metadata.bundle]
identifier = "com.oligami.nickname-ios-test"
12 changes: 11 additions & 1 deletion examples/iphone/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ impl ViewDelegate for RootView {
fn did_load(&mut self, _view: View) {
LayoutConstraint::activate(&[]);
std::thread::spawn(|| {
println!("Hello from a thread!");
launch_handle();
});
}
}
Expand Down Expand Up @@ -72,6 +72,16 @@ impl WindowSceneDelegate for WindowScene {
}
}

fn launch_handle() {
println!("start");

if let Ok(device_name) = nick_name::NickName::new() {
println!("{:?}", device_name.get());
};

eprintln!("__finish__");
}

fn main() {
App::new(TestApp::default(), || Box::new(WindowScene::default())).run();
}
2 changes: 1 addition & 1 deletion rust/iphone/mod.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
mod objc;
pub use objc::*;
pub use objc::nick_name::NickName;

0 comments on commit 916c1bf

Please sign in to comment.