How can I update the copyright information of files in Xcode?
I want to change all copyright information of my whole project. For this, I changed the template of the copyright, but this change does not affect my existing project files, only newly created files.
Do you know how can I update all copyright information in a whole project?
xcode copyright-display
|
show 3 more comments
I want to change all copyright information of my whole project. For this, I changed the template of the copyright, but this change does not affect my existing project files, only newly created files.
Do you know how can I update all copyright information in a whole project?
xcode copyright-display
4
Mass find/replace (?)
– Alladinian
Nov 20 at 9:55
hmm I think in my case this is not a good idea.. Is there no way, to recreate all copyright information?
– Marcel Gangwisch
Nov 20 at 9:56
2
We are talking about the comments that are included automatically on top of the source files right?
– Alladinian
Nov 20 at 9:56
@Alladinian yes exactly!
– Marcel Gangwisch
Nov 20 at 9:58
1
Then use a regular expression that makes sure that is on the top of the file and marked as a comment. Xcode doesn't keep track of these things in a structured way, so I really think that's your only solution.
– Alladinian
Nov 20 at 10:05
|
show 3 more comments
I want to change all copyright information of my whole project. For this, I changed the template of the copyright, but this change does not affect my existing project files, only newly created files.
Do you know how can I update all copyright information in a whole project?
xcode copyright-display
I want to change all copyright information of my whole project. For this, I changed the template of the copyright, but this change does not affect my existing project files, only newly created files.
Do you know how can I update all copyright information in a whole project?
xcode copyright-display
xcode copyright-display
edited Nov 20 at 12:45
Tamás Sengel
26.2k146592
26.2k146592
asked Nov 20 at 9:53
Marcel Gangwisch
855518
855518
4
Mass find/replace (?)
– Alladinian
Nov 20 at 9:55
hmm I think in my case this is not a good idea.. Is there no way, to recreate all copyright information?
– Marcel Gangwisch
Nov 20 at 9:56
2
We are talking about the comments that are included automatically on top of the source files right?
– Alladinian
Nov 20 at 9:56
@Alladinian yes exactly!
– Marcel Gangwisch
Nov 20 at 9:58
1
Then use a regular expression that makes sure that is on the top of the file and marked as a comment. Xcode doesn't keep track of these things in a structured way, so I really think that's your only solution.
– Alladinian
Nov 20 at 10:05
|
show 3 more comments
4
Mass find/replace (?)
– Alladinian
Nov 20 at 9:55
hmm I think in my case this is not a good idea.. Is there no way, to recreate all copyright information?
– Marcel Gangwisch
Nov 20 at 9:56
2
We are talking about the comments that are included automatically on top of the source files right?
– Alladinian
Nov 20 at 9:56
@Alladinian yes exactly!
– Marcel Gangwisch
Nov 20 at 9:58
1
Then use a regular expression that makes sure that is on the top of the file and marked as a comment. Xcode doesn't keep track of these things in a structured way, so I really think that's your only solution.
– Alladinian
Nov 20 at 10:05
4
4
Mass find/replace (?)
– Alladinian
Nov 20 at 9:55
Mass find/replace (?)
– Alladinian
Nov 20 at 9:55
hmm I think in my case this is not a good idea.. Is there no way, to recreate all copyright information?
– Marcel Gangwisch
Nov 20 at 9:56
hmm I think in my case this is not a good idea.. Is there no way, to recreate all copyright information?
– Marcel Gangwisch
Nov 20 at 9:56
2
2
We are talking about the comments that are included automatically on top of the source files right?
– Alladinian
Nov 20 at 9:56
We are talking about the comments that are included automatically on top of the source files right?
– Alladinian
Nov 20 at 9:56
@Alladinian yes exactly!
– Marcel Gangwisch
Nov 20 at 9:58
@Alladinian yes exactly!
– Marcel Gangwisch
Nov 20 at 9:58
1
1
Then use a regular expression that makes sure that is on the top of the file and marked as a comment. Xcode doesn't keep track of these things in a structured way, so I really think that's your only solution.
– Alladinian
Nov 20 at 10:05
Then use a regular expression that makes sure that is on the top of the file and marked as a comment. Xcode doesn't keep track of these things in a structured way, so I really think that's your only solution.
– Alladinian
Nov 20 at 10:05
|
show 3 more comments
1 Answer
1
active
oldest
votes
I changed the template of the copyright, but this change does not affect my existing project files, only newly created files.
Right. It's like when you bend your cookie cutter into a new shape: you don't expect the cookies you've cut out previously to assume the new shape. ;-)
The templates in Xcode don't retain any association with the files that are created from them: once a file is created, it's just a plain old text file, and the templated fields like your name and the copyright year are just plain text.
Do you know how can I update all copyright information in a whole project?
I assume that we're talking here specifically about the copyright notice in the header comment of each file, like:
//
// FirstViewController.swift
// TestThis
//
// Created by Marcel Gangwisch 11/19/17.
// Copyright © 2017 Marcel Gangwisch. All rights reserved.
//
And you want to update that copyright notice to say 2018, right? Find and replace should do the job here. If you use the Find Navigator in Xcode, you can easily search using patterns, and all the files that match the pattern will be listed in the navigator.
Just to be clear, remember that the copyright notice in your source code comments doesn't affect the final product at all. If you're updating the source code copyright, you'll likely also want to update any copyright notices in the product(s) you're building. That's a little less straightforward because where you display a copyright notice in your app is up to you. But you should still be able to find the relevant files by searching for the ©
symbol, and of course just looking at the UI in your app will probably help.
If your app is distributed through Apple's App Store, you may need to update the app description and other metadata there. Same goes for your own web site, and also Github or whatever code repository you use.
But I would also like to restore some copyright information - so with the date, when the file was created, which I dont have.. - so I thought xcode can do some magic here
The current Xcode template does include a separate line for creation date, and if your files have that, changing the copyright year shouldn't affect the creation date line. If you need to preserve the existing year, you can again use regular expressions, and this time insert the matched pattern. For example, if you want to add an "Original copyright xxxx" comment line, you could do this:
That adds a line break at the end of the first line, and then adds a second line that re-uses the captured year.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53390334%2fhow-can-i-update-the-copyright-information-of-files-in-xcode%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I changed the template of the copyright, but this change does not affect my existing project files, only newly created files.
Right. It's like when you bend your cookie cutter into a new shape: you don't expect the cookies you've cut out previously to assume the new shape. ;-)
The templates in Xcode don't retain any association with the files that are created from them: once a file is created, it's just a plain old text file, and the templated fields like your name and the copyright year are just plain text.
Do you know how can I update all copyright information in a whole project?
I assume that we're talking here specifically about the copyright notice in the header comment of each file, like:
//
// FirstViewController.swift
// TestThis
//
// Created by Marcel Gangwisch 11/19/17.
// Copyright © 2017 Marcel Gangwisch. All rights reserved.
//
And you want to update that copyright notice to say 2018, right? Find and replace should do the job here. If you use the Find Navigator in Xcode, you can easily search using patterns, and all the files that match the pattern will be listed in the navigator.
Just to be clear, remember that the copyright notice in your source code comments doesn't affect the final product at all. If you're updating the source code copyright, you'll likely also want to update any copyright notices in the product(s) you're building. That's a little less straightforward because where you display a copyright notice in your app is up to you. But you should still be able to find the relevant files by searching for the ©
symbol, and of course just looking at the UI in your app will probably help.
If your app is distributed through Apple's App Store, you may need to update the app description and other metadata there. Same goes for your own web site, and also Github or whatever code repository you use.
But I would also like to restore some copyright information - so with the date, when the file was created, which I dont have.. - so I thought xcode can do some magic here
The current Xcode template does include a separate line for creation date, and if your files have that, changing the copyright year shouldn't affect the creation date line. If you need to preserve the existing year, you can again use regular expressions, and this time insert the matched pattern. For example, if you want to add an "Original copyright xxxx" comment line, you could do this:
That adds a line break at the end of the first line, and then adds a second line that re-uses the captured year.
add a comment |
I changed the template of the copyright, but this change does not affect my existing project files, only newly created files.
Right. It's like when you bend your cookie cutter into a new shape: you don't expect the cookies you've cut out previously to assume the new shape. ;-)
The templates in Xcode don't retain any association with the files that are created from them: once a file is created, it's just a plain old text file, and the templated fields like your name and the copyright year are just plain text.
Do you know how can I update all copyright information in a whole project?
I assume that we're talking here specifically about the copyright notice in the header comment of each file, like:
//
// FirstViewController.swift
// TestThis
//
// Created by Marcel Gangwisch 11/19/17.
// Copyright © 2017 Marcel Gangwisch. All rights reserved.
//
And you want to update that copyright notice to say 2018, right? Find and replace should do the job here. If you use the Find Navigator in Xcode, you can easily search using patterns, and all the files that match the pattern will be listed in the navigator.
Just to be clear, remember that the copyright notice in your source code comments doesn't affect the final product at all. If you're updating the source code copyright, you'll likely also want to update any copyright notices in the product(s) you're building. That's a little less straightforward because where you display a copyright notice in your app is up to you. But you should still be able to find the relevant files by searching for the ©
symbol, and of course just looking at the UI in your app will probably help.
If your app is distributed through Apple's App Store, you may need to update the app description and other metadata there. Same goes for your own web site, and also Github or whatever code repository you use.
But I would also like to restore some copyright information - so with the date, when the file was created, which I dont have.. - so I thought xcode can do some magic here
The current Xcode template does include a separate line for creation date, and if your files have that, changing the copyright year shouldn't affect the creation date line. If you need to preserve the existing year, you can again use regular expressions, and this time insert the matched pattern. For example, if you want to add an "Original copyright xxxx" comment line, you could do this:
That adds a line break at the end of the first line, and then adds a second line that re-uses the captured year.
add a comment |
I changed the template of the copyright, but this change does not affect my existing project files, only newly created files.
Right. It's like when you bend your cookie cutter into a new shape: you don't expect the cookies you've cut out previously to assume the new shape. ;-)
The templates in Xcode don't retain any association with the files that are created from them: once a file is created, it's just a plain old text file, and the templated fields like your name and the copyright year are just plain text.
Do you know how can I update all copyright information in a whole project?
I assume that we're talking here specifically about the copyright notice in the header comment of each file, like:
//
// FirstViewController.swift
// TestThis
//
// Created by Marcel Gangwisch 11/19/17.
// Copyright © 2017 Marcel Gangwisch. All rights reserved.
//
And you want to update that copyright notice to say 2018, right? Find and replace should do the job here. If you use the Find Navigator in Xcode, you can easily search using patterns, and all the files that match the pattern will be listed in the navigator.
Just to be clear, remember that the copyright notice in your source code comments doesn't affect the final product at all. If you're updating the source code copyright, you'll likely also want to update any copyright notices in the product(s) you're building. That's a little less straightforward because where you display a copyright notice in your app is up to you. But you should still be able to find the relevant files by searching for the ©
symbol, and of course just looking at the UI in your app will probably help.
If your app is distributed through Apple's App Store, you may need to update the app description and other metadata there. Same goes for your own web site, and also Github or whatever code repository you use.
But I would also like to restore some copyright information - so with the date, when the file was created, which I dont have.. - so I thought xcode can do some magic here
The current Xcode template does include a separate line for creation date, and if your files have that, changing the copyright year shouldn't affect the creation date line. If you need to preserve the existing year, you can again use regular expressions, and this time insert the matched pattern. For example, if you want to add an "Original copyright xxxx" comment line, you could do this:
That adds a line break at the end of the first line, and then adds a second line that re-uses the captured year.
I changed the template of the copyright, but this change does not affect my existing project files, only newly created files.
Right. It's like when you bend your cookie cutter into a new shape: you don't expect the cookies you've cut out previously to assume the new shape. ;-)
The templates in Xcode don't retain any association with the files that are created from them: once a file is created, it's just a plain old text file, and the templated fields like your name and the copyright year are just plain text.
Do you know how can I update all copyright information in a whole project?
I assume that we're talking here specifically about the copyright notice in the header comment of each file, like:
//
// FirstViewController.swift
// TestThis
//
// Created by Marcel Gangwisch 11/19/17.
// Copyright © 2017 Marcel Gangwisch. All rights reserved.
//
And you want to update that copyright notice to say 2018, right? Find and replace should do the job here. If you use the Find Navigator in Xcode, you can easily search using patterns, and all the files that match the pattern will be listed in the navigator.
Just to be clear, remember that the copyright notice in your source code comments doesn't affect the final product at all. If you're updating the source code copyright, you'll likely also want to update any copyright notices in the product(s) you're building. That's a little less straightforward because where you display a copyright notice in your app is up to you. But you should still be able to find the relevant files by searching for the ©
symbol, and of course just looking at the UI in your app will probably help.
If your app is distributed through Apple's App Store, you may need to update the app description and other metadata there. Same goes for your own web site, and also Github or whatever code repository you use.
But I would also like to restore some copyright information - so with the date, when the file was created, which I dont have.. - so I thought xcode can do some magic here
The current Xcode template does include a separate line for creation date, and if your files have that, changing the copyright year shouldn't affect the creation date line. If you need to preserve the existing year, you can again use regular expressions, and this time insert the matched pattern. For example, if you want to add an "Original copyright xxxx" comment line, you could do this:
That adds a line break at the end of the first line, and then adds a second line that re-uses the captured year.
edited Nov 20 at 13:22
answered Nov 20 at 13:07
Caleb
109k16150238
109k16150238
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53390334%2fhow-can-i-update-the-copyright-information-of-files-in-xcode%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
4
Mass find/replace (?)
– Alladinian
Nov 20 at 9:55
hmm I think in my case this is not a good idea.. Is there no way, to recreate all copyright information?
– Marcel Gangwisch
Nov 20 at 9:56
2
We are talking about the comments that are included automatically on top of the source files right?
– Alladinian
Nov 20 at 9:56
@Alladinian yes exactly!
– Marcel Gangwisch
Nov 20 at 9:58
1
Then use a regular expression that makes sure that is on the top of the file and marked as a comment. Xcode doesn't keep track of these things in a structured way, so I really think that's your only solution.
– Alladinian
Nov 20 at 10:05