Skip to content

PList template platform #26

@amezcua

Description

@amezcua

Hi.

I'm not sure if I'm missing something but I created an xcframework and I had to update the template that you use for it to pass Apple validation (with XCode for example). In plist.rs I had to change the write function from:

pub fn write(&self, path: &str) -> std::io::Result<()> {
    let template = TEAMPLATE
        .replace("{BUNDLE_NAME}", &self.bundle_name)
        .replace("{SUPPORTED_PLATFORM}", self.platform.platform_name())
        .replace("{PLATFORM_NAME}", self.platform.platform_display_name());
    std::fs::write(path, template)
}

to

pub fn write(&self, path: &str) -> std::io::Result<()> {
    let template = TEAMPLATE
        .replace("{BUNDLE_NAME}", &self.bundle_name)
        .replace("{SUPPORTED_PLATFORM}", self.platform.platform_name())
        .replace("{PLATFORM_NAME}", self.platform.platform_name());  <----- CHANGED
    std::fs::write(path, template)
}

Changing platform_display_name to platform_name.

Then in the actual template string I had to change from

...

<key>DTPlatformName</key>
<string>{PLATFORM_NAME}</string>
<key>DTSDKName</key>
<string>iphonesimulator13.0</string>
<key>MinimumOSVersion</key>
<string>13.0</string>

...

to

...

<key>DTPlatformName</key>
<string>{PLATFORM_NAME}</string>
<key>DTSDKName</key>
<string>{PLATFORM_NAME}13.0</string>  <--- CHANGED
<key>MinimumOSVersion</key>
<string>13.0</string>

...

Using the PLATFORM_NAME value in the DTSDKName field.

I'm not sure if I'm missing some configuration somewhere but without these changes I could not make XCode validate the xcframework.

Is this a known thing? Can I make it pass validation without these changes somehow?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions