         }
     }
 
+    /// The value of remoteGlobalIDString property in pbxproj. Use this accessor if the object is in remote .xcodeproj.
+    public var remoteGlobalIDString: String? {
+        get {
+            return remoteGlobalIDReference?.value
+        }
+        set {
+            remoteGlobalIDReference = newValue.map { PBXObjectReference($0) }
+        }
+    }
+
     /// Element remote info.
     public var remoteInfo: String?
 
+    init(containerPortalReference: PBXObjectReference,
+         remoteGlobalIDReference: PBXObjectReference? = nil,
+         proxyType: ProxyType? = nil,
+         remoteInfo: String? = nil) {
+        self.containerPortalReference = containerPortalReference
+        self.remoteGlobalIDReference = remoteGlobalIDReference
+        self.remoteInfo = remoteInfo
+        self.proxyType = proxyType
+        super.init()
+    }
+
     /// Initializes the container item proxy with its attributes.
+    /// Use this initializer if the proxy is for an object within the same .pbxproj file.
     ///
     /// - Parameters:
-    ///   - containerPortal: container portal.
+    ///   - containerPortal: container portal. PBXProject object located in current .xcodeproj
     ///   - remoteGlobalID: remote global ID.
     ///   - proxyType: proxy type.
     ///   - remoteInfo: remote info.
-    public init(containerPortal: PBXObject,
-                remoteGlobalID: PBXObject? = nil,
-                proxyType: ProxyType? = nil,
-                remoteInfo: String? = nil) {
-        containerPortalReference = containerPortal.reference
-        remoteGlobalIDReference = remoteGlobalID?.reference
-        self.remoteInfo = remoteInfo
-        self.proxyType = proxyType
-        super.init()
+    public convenience init(containerPortal: PBXObject,
+                            remoteGlobalID: PBXObject? = nil,
+                            proxyType: ProxyType? = nil,
+                            remoteInfo: String? = nil) {
+        self.init(containerPortalReference: containerPortal.reference,
+                  remoteGlobalIDReference: remoteGlobalID?.reference,
+                  proxyType: proxyType,
+                  remoteInfo: remoteInfo)
+    }
+
+    /// Initializes the container item proxy with its attributes.
+    /// Use this initializer if the proxy is for an object residing in referenced .pbxproj file.
+    ///
+    /// - Parameters:
+    ///   - containerPortal: file reference to external .xcodeproj.
+    ///   - remoteGlobalID: string object ID within the remote project.
+    ///   - proxyType: proxy type.
+    ///   - remoteInfo: remote info.
+    public convenience init(containerPortal: PBXFileReference,
+                            remoteGlobalID: String? = nil,
+                            proxyType: ProxyType? = nil,
+                            remoteInfo: String? = nil) {
+        self.init(containerPortalReference: containerPortal.reference,
+                  remoteGlobalIDReference: remoteGlobalID.map { PBXObjectReference($0) },
+                  proxyType: proxyType,
+                  remoteInfo: remoteInfo)
     }
 
     // MARK: - Decodable

        }
    }

    /// Element proxy type.
    public var proxyType: ProxyType?

    /// Element remote global ID reference.
    var remoteGlobalIDReference: PBXObjectReference?

    /// Remote global object
    public var remoteGlobalID: PBXObject? {
        get {
            return remoteGlobalIDReference?.getObject()

    func plistKeyAndValue(proj _: PBXProj, reference: String) -> (key: CommentedString, value: PlistValue) {
        var dictionary: [CommentedString: PlistValue] = [:]
        dictionary["isa"] = .string(CommentedString(PBXContainerItemProxy.isa))
        dictionary["containerPortal"] = .string(CommentedString(containerPortalReference.value, comment: isContainerPortalFileReference ? containerPortalAsFileReference.name : "Project object"))
        if let proxyType = proxyType {
            dictionary["proxyType"] = .string(CommentedString("\(proxyType.rawValue)"))
        }
