Skip to content
This repository was archived by the owner on Mar 30, 2022. It is now read-only.

Adds a step for bypassing code signing problem - #352

Merged
dan-zheng merged 10 commits into
tensorflow:masterfrom
RahulBhalley:master
Jan 22, 2020
Merged

Adds a step for bypassing code signing problem#352
dan-zheng merged 10 commits into
tensorflow:masterfrom
RahulBhalley:master

Conversation

@RahulBhalley

@RahulBhalley RahulBhalley commented Dec 30, 2019

Copy link
Copy Markdown
Contributor

Users are experiencing problem with executing S4TF program in their Xcode project as being discussed in issue #177.

This PR adds a new installation step that resolves the issue #177 by enabling the Disable Library Validation option from Signing & Capabilities > Hardened Runtime. This option lets the Xcode project to add frameworks without requiring any code signing. Please see the official documentation for details.

cc @dan-zheng @rxwei

@dan-zheng

Copy link
Copy Markdown
Member

I'm curious how to reproduce the code signing issue (#351)?
It seems many users have encountered it but I haven't been able to reproduce it locally.

I tried creating and running an Xcode macOS Command Line Project with both the latest macOS development toolchain and the 0.6 macOS toolchain, and it worked fine in both cases.

Here's a video using the latest toolchain: https://youtu.be/EieYx8_mxkY

@RahulBhalley

RahulBhalley commented Jan 3, 2020

Copy link
Copy Markdown
Contributor Author

Hey @dan-zheng I have uploaded a video to demonstrate the issue. The S4TF program builds fine in Xcode but doesn't run and gives this run-time error. It is a run-time error for sure because whenever a Tensor is initialized Xcode report error although only importing TensorFlow doesn't give any error and the program even runs.

I don't know how you are not experiencing the issue but we are. 🤔 See this issue #276 (comment) also referring the same problem.

Also I am not able to find an issue where someone suggested to go to System Preferences > Security & Privacy and set something Open that worked as workaround this issue. I think maybe you might've made that setting on your Mac so is preventing your S4TF program from falling into this problem. Maybe you can do a fresh install of latest macOS Catalina & give this Xcode macOS project with S4TF a try again to reproduce the issue like ours.

Additional information that might be helpful:

  • Xcode: Version 11.3 (11C29)
  • Toolchain: Swift for TensorFlow Development Snapshot 2019-12-23
  • macOS Catalina: 10.15.2 (19C57)

Comment thread Installation.md Outdated
</p>

6. Selecting a Swift toolchain affects the Xcode IDE only. To use the Swift toolchain with command-line tools, use `xcrun --toolchain swift` and `xcodebuild -toolchain swift`, or add the Swift toolchain to your path as follows:
6. In Xcode's `Preferences > Components > Toolchains` selecting `Verify Code Signature` by clicking engine button next to Swift for TensorFlow toolchain gives a code signature error. Although Swift for TensorFlow program will build successfully but this prevents the program from running in Xcode. To resolve this problem go to `Signing & Capabilities > Hardened Runtime` and checkmark `Disable Library Validation` under target setting of your project. You can add `Hardened Runtime` by clicking `+ Capability` under `Signing & Capabilities`.

@dan-zheng dan-zheng Jan 11, 2020

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please clarify that these Instructions for bypassing code signing are specific to macOS Catalina?

Could you please also move these instructions to Usage.md instead of Installation.md?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. I have moved the instruction from Installation.md to Usage.md as specific to macOS Catalina.

Please check it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ping @dan-zheng.

@dan-zheng dan-zheng left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I edited the description and added an image.

@dan-zheng
dan-zheng merged commit 3c580ba into tensorflow:master Jan 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants