Giter VIP home page Giter VIP logo

embed-plist-rs's Introduction

Hey there! ๐Ÿ‘‹

I'm a software engineer and designer making a plethora of creative works.

embed-plist-rs's People

Contributors

nvzqz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

embed-plist-rs's Issues

Embedded Info.plist doesn't seem to be recognised

Hello,
I'm not very familiar with Mac OS, so it's entirely possible I'm misunderstanding or doing something wrong, but it appears that the Info.plist embedded by this crate isn't being recognised by the OS.

Context:
I'm working on a Rust Bluetooth library. Since Big Sur, accessing CoreBluetooth APIs apparently requires that the Info.plist contain a string NSBluetoothAlwaysUsageDescription saying why the program wants to use it. When I embed an appropriate Info.plist with this crate and then run my binary from the command-line (either via cargo run or directly), it crashes with Abort trap: 6. If I run it inside lldb, I get an error message:

(lldb) run
Process 76410 launched: '/Users/qwandor/src/btleplug/target/debug/examples/lights' (x86_64)
2021-02-11 17:44:15.350059+0000 lights[76410:891761] [access] This app has crashed because it attempted to access privacy-sensitive data without a usage description.  The app's Info.plist must contain an NSBluetoothAlwaysUsageDescription key with a string value explaining to the user how the app uses this data.
Process 76410 stopped
* thread #12, queue = 'com.apple.root.default-qos', stop reason = signal SIGABRT
    frame #0: 0x00007fff2059a792 libsystem_kernel.dylib`__abort_with_payload + 10
libsystem_kernel.dylib`__abort_with_payload:
->  0x7fff2059a792 <+10>: jae    0x7fff2059a79c            ; <+20>
    0x7fff2059a794 <+12>: movq   %rax, %rdi
    0x7fff2059a797 <+15>: jmp    0x7fff205796a1            ; cerror_nocancel
    0x7fff2059a79c <+20>: retq
Target 0: (lights) stopped.

If I instead copy the Info.plist to target/debug/examples/ alongside the binary, then running it directly still fails, but running in lldb then it prompts for the permission and runs correctly.

I'm on MacOS 11.2, x86_64, Rust 1.49.0, embed_plist 1.2.0. You can see my code trying to use it in deviceplug/btleplug#116.

So I guess there are two questions:

  • Why does embedding the Info.plist not work, while putting it in the same directory does? (Is this a bug in the embed_plist crate?)
  • Why does it only work when I run my binary under lldb? (Am I doing something wrong?)

symbol `_EMBED_INFO_PLIST` is already defined

Type: Bug
Getting error on making a call to

embed_plist::embed_info_plist!("../Info.plist");

Here's a screenshot let me know if I am doing something wrong.
I am actually new to rust and still learning and finding my way around let me if I am missing something.

Screenshot 2022-01-15 at 11 34 50 PM

Rust Version: 1.57.0
Tauri: { version = "1.0.0-beta.8", features = ["api-all"] }
OS: Mac Os Big Sur (11.6.1)
embed-plist: 1.2.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.