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

Xcode project add the custom dynamic libraries. #90

Closed
chenxing640 opened this issue Apr 21, 2016 · 5 comments
Closed

Xcode project add the custom dynamic libraries. #90

chenxing640 opened this issue Apr 21, 2016 · 5 comments

Comments

@chenxing640
Copy link

chenxing640 commented Apr 21, 2016

hi kronenthaler,
I only can write the basic python, now I have a problem, I need your help.
The problem is the Title Description。
For example:
/* Begin PBXCopyFilesBuildPhase section /
96AABB551CC874F1000DF362 /
Embed Frameworks / = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
96AABB541CC874F1000DF362 /
xxx.framework in Embed Frameworks /,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/
End PBXCopyFilesBuildPhase section */
Like this situation, how to do?

@chenxing640 chenxing640 changed the title PBXCopyFilesBuildPhase add Embed Frameworks Xcode project add the custom dynamic libraries. Apr 21, 2016
@kronenthaler
Copy link
Owner

Hi, thanks for the question. Before i can answer, please:

  1. Use the code blocks to see all the content of your snippet
  2. Write what is the code you are expecting or what is wrong with the snippet you are posting. Otherwise the snippet looks ok to me.
  3. What do you mean with "Title Description"

@chenxing640
Copy link
Author

chenxing640 commented Apr 21, 2016

Hi,Thank you for your answer.

I know how to add the frameworks. My code blocks:

pbx_path =  "/Users/ajax/tzcq/Unity-iphone.xcodeproj/project.pbxproj"
project = XcodeProject.Load(pbx_path)
framework = project.get_or_create_group("Frameworks")
project.add_file_if_doesnt_exist("/Users/ajax/Desktop/xxx.framework", parent=framework)
project.save()

But I do not know to add the Embed Frameworks in PBXCopyFilesBuildPhase section.

The following contents was taken from the project.pbxproj.

/* Begin PBXCopyFilesBuildPhase section */
        96AABB551CC874F1000DF362 /* Embed Frameworks */ = {
            isa = PBXCopyFilesBuildPhase;
            buildActionMask = 2147483647;
            dstPath = "";
            dstSubfolderSpec = 10;
            files = (
                96AABB541CC874F1000DF362 /* xxx.framework in Embed Frameworks */,
            );
            name = "Embed Frameworks";
            runOnlyForDeploymentPostprocessing = 0;
        };
/* End PBXCopyFilesBuildPhase section */

How did I add the Embed Frameworks in PBXCopyFilesBuildPhase section?

Can you provide the interface or Instructions about adding the Embed Frameworks ?

@kronenthaler
Copy link
Owner

There is no direct function to do that at the moment. I haven't done it myself, but It can be achieved with the result of the add_file_if_doesnt_exist function and iterating over the project.objects dictionary.

I will mark this issue as an improvement to be done.

@chenxing640
Copy link
Author

Thanks!

By the way, I will feedback a question.

project.add_flags('OTHER_LDFLAGS', ['-ObjC', '-all_load', '-fobjc-arc'])

The flags can't be added to the project.pbxproj in the 1.3.0 version with this method. I don't know whether to improve the problem in the 1.3.1 version

@kronenthaler
Copy link
Owner

Thanks, the documentation is incorrect.
It should be:

project.add_flags({'OTHER_LDFLAGS': ['-ObjC', '-all_load', '-fobjc-arc']})

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

No branches or pull requests

2 participants