a bunch of changes
This commit is contained in:
|
Before Width: | Height: | Size: 452 KiB After Width: | Height: | Size: 452 KiB |
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "icon.png",
|
||||
"filename" : "App-Icon-1024x1024@1x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
@@ -24,6 +24,7 @@ const withClipInfoPlist = (config, {targetName}) => {
|
||||
CFBundleExecutable: '$(EXECUTABLE_NAME)',
|
||||
CFBundlePackageType: '$(PRODUCT_BUNDLE_PACKAGE_TYPE)',
|
||||
CFBundleShortVersionString: config.version,
|
||||
CFBundleIconName: 'AppIcon',
|
||||
UIViewControllerBasedStatusBarAppearance: 'NO',
|
||||
})
|
||||
|
||||
|
||||
@@ -25,6 +25,14 @@ const withFiles = (config, {targetName}) => {
|
||||
fs.copyFileSync(sourcePath, targetPath)
|
||||
}
|
||||
|
||||
const imagesBasePath = path.join(basePath, 'Images.xcassets')
|
||||
const imagesTargetPath = path.join(
|
||||
config.modRequest.platformProjectRoot,
|
||||
targetName,
|
||||
'Images.xcassets',
|
||||
)
|
||||
fs.cpSync(imagesBasePath, imagesTargetPath, {recursive: true})
|
||||
|
||||
return config
|
||||
})
|
||||
}
|
||||
|
||||
@@ -15,20 +15,26 @@ const withXcodeTarget = (config, {targetName}) => {
|
||||
'Sources',
|
||||
target.uuid,
|
||||
'application',
|
||||
'"$(CONTENTS_FOLDER_PATH)/AppClips"',
|
||||
'"AppClips"',
|
||||
)
|
||||
pbxProject.addBuildPhase(
|
||||
[],
|
||||
[`${targetName}/Images.xcassets`],
|
||||
'PBXResourcesBuildPhase',
|
||||
'Resources',
|
||||
target.uuid,
|
||||
'application',
|
||||
'"$(CONTENTS_FOLDER_PATH)/AppClips"',
|
||||
'"AppClips"',
|
||||
)
|
||||
|
||||
const pbxGroupKey = pbxProject.pbxCreateGroup(targetName, targetName)
|
||||
pbxProject.addFile(`${targetName}/Info.plist`, pbxGroupKey)
|
||||
const pbxGroup = pbxProject.addPbxGroup([
|
||||
'AppDelegate.swift',
|
||||
'ViewController.swift',
|
||||
'Images.xcassets',
|
||||
`${targetName}.entitlements`,
|
||||
'Info.plist',
|
||||
])
|
||||
|
||||
pbxProject.addFile(`${targetName}/Info.plist`, pbxGroup.uuid)
|
||||
const configurations = pbxProject.pbxXCBuildConfigurationSection()
|
||||
for (const key in configurations) {
|
||||
if (typeof configurations[key].buildSettings !== 'undefined') {
|
||||
@@ -68,27 +74,13 @@ const withXcodeTarget = (config, {targetName}) => {
|
||||
target.uuid,
|
||||
])
|
||||
|
||||
// pbxProject.addProductFile(targetName, {
|
||||
// basename: `${targetName}.app`,
|
||||
// groupName: 'Embed App Clips',
|
||||
// explicitFileType: 'wrapper.application',
|
||||
// settings: {
|
||||
// ATTRIBUTES: ['RemoveHeadersOnCopy'],
|
||||
// },
|
||||
// includeInIndex: 0,
|
||||
// path: `${targetName}.app`,
|
||||
// sourceTree: 'BUILT_PRODUCTS_DIR',
|
||||
// })
|
||||
|
||||
pbxProject.addToPbxNativeTargetSection(target)
|
||||
|
||||
pbxProject.addBuildPhase(
|
||||
[`${targetName}.app`],
|
||||
'PBXCopyFilesBuildPhase',
|
||||
'Embed App Clips',
|
||||
pbxProject.getFirstTarget().uuid,
|
||||
'application',
|
||||
'"$(CONTENTS_FOLDER_PATH)/AppClips"',
|
||||
'"AppClips"',
|
||||
)
|
||||
|
||||
return config
|
||||
|
||||
Reference in New Issue
Block a user