Xcode16
新建ShareExtenson
之后的project.pbxproj
和以前不一样,导致pod install
等报错。
RuntimeError - `PBXGroup` attempted to initialize an object with unknown ISA `PBXFileSystemSynchronizedRootGroup` from attributes: `{"isa"=>"PBXFileSystemSynchronizedRootGroup", "exceptions"=>["3DC73CB72CB8C2C1000F77DE"], "path"=>"demo", "sourceTree"=>"<group>"}`
If this ISA was generated by Xcode please file an issue:
......
现在将Xcode 14.3.1
和16
新建ShareExtension
后project.pbxproj
文件的差异记录如下:
PBXBuildFile section
存在差异。
- Xcode 14.3.1
81B617402CC60A000032D4E0 /* ShareViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81B6173F2CC60A000032D4E0 /* ShareViewController.swift */; };
81B617432CC60A000032D4E0 /* MainInterface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81B617412CC60A000032D4E0 /* MainInterface.storyboard */; };
81B617472CC60A000032D4E0 /* AnShare.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 81B6173D2CC609FF0032D4E0 /* AnShare.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
- Xcode 16
3D0F7DB82CC624F500030D67 /* AnShare.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 3D0F7DAE2CC624F500030D67 /* AnShare.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
PBXFileReference section
也存在差异。
- Xcode 14.3.1
81B6173D2CC609FF0032D4E0 /* AnShare.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = AnShare.appex; sourceTree = BUILT_PRODUCTS_DIR; };
81B6173F2CC60A000032D4E0 /* ShareViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareViewController.swift; sourceTree = "<group>"; };
81B617422CC60A000032D4E0 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/MainInterface.storyboard; sourceTree = "<group>"; };
81B617442CC60A000032D4E0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
- Xcode 16
3D0F7DAE2CC624F500030D67 /* AnShare.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = AnShare.appex; sourceTree = BUILT_PRODUCTS_DIR; };
- Xcode 16 新增了2个section,
PBXFileSystemSynchronizedBuildFileExceptionSet
和PBXFileSystemSynchronizedRootGroup
。
/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */
3D0F7DB92CC624F500030D67 /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = {
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
membershipExceptions = (
Info.plist,
);
target = 3D0F7DAD2CC624F500030D67 /* AnShare */;
};
/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */
/* Begin PBXFileSystemSynchronizedRootGroup section */
3D0F7DAF2CC624F500030D67 /* AnShare */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (3D0F7DB92CC624F500030D67 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = AnShare; sourceTree = "<group>"; };
/* End PBXFileSystemSynchronizedRootGroup section */
Xcode 14.3.1
的PBXGroup section
中有以下内容,而Xcode 16
没有。
81B6173E2CC60A000032D4E0 /* AnShare */ = {
isa = PBXGroup;
children = (
81B6173F2CC60A000032D4E0 /* ShareViewController.swift */,
81B617412CC60A000032D4E0 /* MainInterface.storyboard */,
81B617442CC60A000032D4E0 /* Info.plist */,
);
path = AnShare;
sourceTree = "<group>";
};
PBXNativeTarget section
也存在差异。
Xcode 14.3.1
81B6173C2CC609FF0032D4E0 /* AnShare */ = {
isa = PBXNativeTarget;
buildConfigurationList = 81B617532CC60A000032D4E0 /* Build configuration list for PBXNativeTarget "AnShare" */;
buildPhases = (
81B617392CC609FF0032D4E0 /* Sources */,
81B6173A2CC609FF0032D4E0 /* Frameworks */,
81B6173B2CC609FF0032D4E0 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = AnShare;
productName = AnShare;
productReference = 81B6173D2CC609FF0032D4E0 /* AnShare.appex */;
productType = "com.apple.product-type.app-extension";
};
Xcode 16
3D0F7DAD2CC624F500030D67 /* AnShare */ = {
isa = PBXNativeTarget;
buildConfigurationList = 3D0F7DBA2CC624F500030D67 /* Build configuration list for PBXNativeTarget "AnShare" */;
buildPhases = (
3D0F7DAA2CC624F500030D67 /* Sources */,
3D0F7DAB2CC624F500030D67 /* Frameworks */,
3D0F7DAC2CC624F500030D67 /* Resources */,
);
buildRules = (
);
dependencies = (
);
fileSystemSynchronizedGroups = (
3D0F7DAF2CC624F500030D67 /* AnShare */,
);
name = AnShare;
packageProductDependencies = (
);
productName = AnShare;
productReference = 3D0F7DAE2CC624F500030D67 /* AnShare.appex */;
productType = "com.apple.product-type.app-extension";
PBXProject section
也存在差异。
- 如果
objectVersion
不是56
,记得改为56
。
在Xcode
和Cocoapods
没有给出解决方案前,如果需要,可以手动修改。