Skip to content

Conversation

@Fatme
Copy link

@Fatme Fatme commented Jun 24, 2015

Problem1 - Quotes

Quotes are added every time when pbxFileReferenceObj function is called. But we need them only when the file contains special characters. If the file doesn't contain special characters and removeResourceFile function is called, the resource was successfully removed from pbxBuildFileSection. But the file reference is not removed from pbxFileReferenceSection. This happens because the reference in pbxproject file doesn't contain quotes but we add the quotes and do incorrect comparison.

Problem2 - Unknown lastKnownFileType

addResourceFile function sets lastKnownFileType property of file to unknown in PBXFileReference section. This PR fixes the type only .png image is added as resource.

@rosen-vladimirov
Copy link

👍

Fatme pushed a commit that referenced this pull request Jun 25, 2015
Fix quotes and lastKnownFileType
@Fatme Fatme merged commit e1f2a36 into master Jun 25, 2015
@Fatme Fatme deleted the fatme/improvements branch June 25, 2015 06:54
KristianDD pushed a commit that referenced this pull request Jan 30, 2019
merge latest updates into mcgrews3-fork
KristianDD pushed a commit that referenced this pull request Jan 30, 2019
The method `project.removeFromFrameworksPbxGroup` directly tries to
access `children` on `project.pbxGroupByName` - but this method might
return `null` if no such group exists.
To prevent a runtime error when trying to access a property on `null` we
can add a check whether the requested group "Frameworks" does exist in
the project and only then continue with the removal of the file.

 This closes #1
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

Successfully merging this pull request may close these issues.

2 participants