Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Injection doesn't seem work when foldername starts with an uppercase character #95

Closed
nilsnilsnils opened this issue Dec 21, 2018 · 8 comments

Comments

@nilsnilsnils
Copy link

Using App Store Version, XCode 10.1, macOS mojave

When I am saving the swift file the following error is shown in the console:

💉 *** Compiling /Users/XXXXX/Documents/git/project/MainCell.swift ***
💉 *** Re-compilation failed (/Users/XXXX/Library/Containers/com.johnholdsworth.InjectionIII/Data/command.sh)
:0: error: error opening input file '/Users/XXXX/Documents/git/editor/SelectionViewController.swift' (No such file or directory)


The path to the SelectionViewController is '/Users/XXXX/Documents/git/Editor/SelectionViewController.swift'

The foldername starts with an uppercase character -> E (Editor)

@nilsnilsnils nilsnilsnils changed the title Injection doesn't seem work when foldername starts in uppercase Injection doesn't seem work when foldername starts with an uppercase character Dec 21, 2018
@johnno1962
Copy link
Owner

Hi, looks like you found the answer. The recompilation in injection is case sensitive.

@nilsnilsnils
Copy link
Author

Will you fix this for the next version ?

@johnno1962
Copy link
Owner

It is not possible to fix this. You need to make sure your project/workspace follows the correct capitalisation when you add the file.

@nilsnilsnils
Copy link
Author

You mean that I need to rename all my folders in my project?

e.g. rename
'/Users/XXXX/Documents/git/Editor/SelectionViewController.swift'
to
'/Users/XXXX/Documents/git/editor/SelectionViewController.swift'

====
The files above are already in the project and I only edited them.

@johnno1962
Copy link
Owner

johnno1962 commented Jan 7, 2019

Renaming the folder is probably going to cause you confusion with git. The easier thing to do is carefully edit the 'project.pbxproj' project file in your project/workspace. They have to be the same.

@nilsnilsnils
Copy link
Author

Okay I found it.

I saw the "wrong" path in the XCode Inspector on the right side.
The path was not the same one as in the file system.

I re add all files which causes this problem and now a new problem occur:

💉 *** Link failed, check /Users/XXXX/Library/Containers/com.johnholdsworth.InjectionIII/Data/command.sh
ld: warning: -undefined dynamic_lookup is deprecated on iOS Simulator
ld: illegal text reloc in '$S7Base16HomePageFlapCellC7setText4textySSSg_tF' to '$S7Base12TextFlapViewC10_textLabelSo7UILabelCvpWvd' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)


Any ideas ?

Thanks for your help.

@johnno1962
Copy link
Owner

I’m sorry but I’ve never seen an error like that before. What version of Xcode is this. If you do a which ld, what do you get?

@nilsnilsnils
Copy link
Author

XCode Version 10.1 (10B61)
macOS Mojaave 10.14.2 (18C54)

$ ld -v

@(#)PROGRAM:ld  PROJECT:ld64-409.12
BUILD 17:47:51 Sep 25 2018
configured to support archs: armv6 armv7 armv7s arm64 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em arm64e arm64_32
LTO support using: LLVM version 10.0.0, (clang-1000.11.45.5) (static support for 21, runtime is 21)
TAPI support using: Apple TAPI version 10.0.0 (tapi-1000.11.8.2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants