DevUtils-app
DevUtils-app copied to clipboard
Error while running project in XCode
After carthage bootstrap --platform macOS has run successfully and signing & capability is configured fine, I try to run the project in Xcode and face the following error:
Showing All Messages DevUtils-app-master/TINOBHNYWE/DevUtils-Bridging-Header.h:5:9: 'DiffMatchPatch/DiffMatchPatch.h' file not found
Is there a build or inclusion step I am missing here? Thank you for your support.
MacOS version: macOS Catalina version 10.15.7 Xcode Version 12.1 (12A7403)
Hi there, Sorry about the missing build instruction, this is a new framework introduced recently and I haven't updated the doc yet.
You need to build the diff-match-patch
framework manually by opening the XCode project in the google-diff-match-patch-Objective-C
directory. Then add the framework to the "Frameworks" folder in the main project like so:
I'll update the doc soon (or maybe better: make this step unnecessary).
Thank you,
I built the project separately in a separate XCode window and then observed that it was already in there:
It still gives me the same error. Thanks again for helping with build.
I was able to get this working by removing the reference to the DiffMatchPatch.framework. I built that project as described and then referenced the DiffMatchPatch.framework artifact after a successful build from Products within the google-diff-match-patch-Objective-C
Xcode project. Once it's referenced in the DevUtils project make sure it's set to Embed & Sign
so that it's appropriately linked when building/running DevUtils. If you want specific steps, please let me know and I can expand here.
@varunarang Just checking, have you been able to build the app? The description by @SalmonKing72 is very helpful as well. (Thanks, @SalmonKing72 !)
in my case, i'm using Xcode Version 11.6 (11E708)
- Remove the reference of the old DiffMatchPatch.framework.
- Open the google-diff-match-patch-Objective-C project, then build it.
- On the left Menu, there is Product Folder, and have a DiffMatchPatch.framework.
- Drag into the DevUtils Xcode Project, to replace the already removed DiffMatchPatch.framework.
- If you are doing it correctly, you will have the framework with Colored Brick Icon.
- Build the App as you usually do , and do forget to set the Team in Signing & Capabilities.
And thank you for the creator of this App for creating this useful Tools.
Thank you for the followup @trungdq88. I kept struggling with Xcode v12. After following through the setups by @ace3, I ended up getting this error:
DevUtils-app/TINOBHNYWE/Components/HotkeyRecorder.swift:10:8: No such module 'ShortcutRecorder'
And then, I retried using Xcode v11.6 after resetting the project code-base to revert changes. Though the project built successfully, it continued to show the below error on running:
Fatal error: 'try!' expression unexpectedly raised an error: Error Domain=NSCocoaErrorDomain Code=260 "The application “DevUtils” could not be launched because it was not found." UserInfo={NSURL=file:{...}/Library/Developer/Xcode/DerivedData/DevUtils-dbiyzeuotskvinfmnynvabpzxmkd/Build/MacOS/DevUtils, NSLocalizedDescription=The application “DevUtils” could not be launched because it was not found., NSUnderlyingError=0x600000c4a790 {Error Domain=NSOSStatusErrorDomain Code=-43 "fnfErr: File not found" UserInfo={NSURL=file:{...}/Library/Developer/Xcode/DerivedData/DevUtils-dbiyzeuotskvinfmnynvabpzxmkd/Build/MacOS/DevUtils}}}: file {...}/Documents/code/tools/DevUtils-app/LauncherApplicationTINO/AppDelegate.swift, line 40 2020-11-12 20:02:42.887407+0530 DevUtilsLauncher[60456:2316449] Fatal error: 'try!' expression unexpectedly raised an error: Error Domain=NSCocoaErrorDomain Code=260 "The application “DevUtils” could not be launched because it was not found." UserInfo={NSURL=file:{...}/Library/Developer/Xcode/DerivedData/DevUtils-dbiyzeuotskvinfmnynvabpzxmkd/Build/MacOS/DevUtils, NSLocalizedDescription=The application “DevUtils” could not be launched because it was not found., NSUnderlyingError=0x600000c4a790 {Error Domain=NSOSStatusErrorDomain Code=-43 "fnfErr: File not found" UserInfo={NSURL=file:{...}/Library/Developer/Xcode/DerivedData/DevUtils-dbiyzeuotskvinfmnynvabpzxmkd/Build/MacOS/DevUtils}}}: file {...}/Documents/code/tools/DevUtils-app/LauncherApplicationTINO/AppDelegate.swift, line 40
This may be a stupid question, thanks in advance for helping answer.
Thank you for the followup @trungdq88. I kept struggling with Xcode v12. After following through the setups by @ace3, I ended up getting this error:
DevUtils-app/TINOBHNYWE/Components/HotkeyRecorder.swift:10:8: No such module 'ShortcutRecorder'
And then, I retried using Xcode v11.6 after resetting the project code-base to revert changes. Though the project built successfully, it continued to show the below error on running:
Fatal error: 'try!' expression unexpectedly raised an error: Error Domain=NSCocoaErrorDomain Code=260 "The application “DevUtils” could not be launched because it was not found." UserInfo={NSURL=file:{...}/Library/Developer/Xcode/DerivedData/DevUtils-dbiyzeuotskvinfmnynvabpzxmkd/Build/MacOS/DevUtils, NSLocalizedDescription=The application “DevUtils” could not be launched because it was not found., NSUnderlyingError=0x600000c4a790 {Error Domain=NSOSStatusErrorDomain Code=-43 "fnfErr: File not found" UserInfo={NSURL=file:{...}/Library/Developer/Xcode/DerivedData/DevUtils-dbiyzeuotskvinfmnynvabpzxmkd/Build/MacOS/DevUtils}}}: file {...}/Documents/code/tools/DevUtils-app/LauncherApplicationTINO/AppDelegate.swift, line 40 2020-11-12 20:02:42.887407+0530 DevUtilsLauncher[60456:2316449] Fatal error: 'try!' expression unexpectedly raised an error: Error Domain=NSCocoaErrorDomain Code=260 "The application “DevUtils” could not be launched because it was not found." UserInfo={NSURL=file:{...}/Library/Developer/Xcode/DerivedData/DevUtils-dbiyzeuotskvinfmnynvabpzxmkd/Build/MacOS/DevUtils, NSLocalizedDescription=The application “DevUtils” could not be launched because it was not found., NSUnderlyingError=0x600000c4a790 {Error Domain=NSOSStatusErrorDomain Code=-43 "fnfErr: File not found" UserInfo={NSURL=file:{...}/Library/Developer/Xcode/DerivedData/DevUtils-dbiyzeuotskvinfmnynvabpzxmkd/Build/MacOS/DevUtils}}}: file {...}/Documents/code/tools/DevUtils-app/LauncherApplicationTINO/AppDelegate.swift, line 40
This may be a stupid question, thanks in advance for helping answer.
can you try to clean the derivated data first. then try redo building the app.
Thanks, I did remove/delete the Derived data directory and rebuilt the project. Still facing the same issue.
in my case, i'm using Xcode Version 11.6 (11E708)
- Remove the reference of the old DiffMatchPatch.framework.
- Open the google-diff-match-patch-Objective-C project, then build it.
- On the left Menu, there is Product Folder, and have a DiffMatchPatch.framework.
- Drag into the DevUtils Xcode Project, to replace the already removed DiffMatchPatch.framework.
- If you are doing it correctly, you will have the framework with Colored Brick Icon.
- Build the App as you usually do , and do forget to set the Team in Signing & Capabilities.
And thank you for the creator of this App for creating this useful Tools.
This solution resolved my issue, with one additional step not mentioned.
- Go into the target's General tab. From there select the Embedded Binaries field and add the dragged-and-dropped framework from step 4. You can read more here: https://stackoverflow.com/questions/24333981/ios-app-with-framework-crashed-on-device-dyld-library-not-loaded-xcode-6-beta
Thanks, I did remove/delete the Derived data directory and rebuilt the project. Still facing the same issue.
try
carthage bootstrap --platform macOS --no-use-binaries
in my case, i'm using Xcode Version 11.6 (11E708)
- Remove the reference of the old DiffMatchPatch.framework.
- Open the google-diff-match-patch-Objective-C project, then build it.
- On the left Menu, there is Product Folder, and have a DiffMatchPatch.framework.
- Drag into the DevUtils Xcode Project, to replace the already removed DiffMatchPatch.framework.
- If you are doing it correctly, you will have the framework with Colored Brick Icon.
- Build the App as you usually do , and do forget to set the Team in Signing & Capabilities.
And thank you for the creator of this App for creating this useful Tools.
thx, works for me
Just a note that when dragging DiffMatchPatch.framework
into the DevUtils Xcode project, it only worked for me when I checked "Copy items if needed".
I just pushed the prebuilt DiffMatchPatch.framework
to the repo so I hope this won't be a problem anymore. The project should be build and run-able without a manual build for the DiffMatchPatch library. (But you can rebuild it anytime if you want to).
I'll try to make the build process better in the future. Feel free to reopen this if you still have problems with it.