Closed zheorekhy closed 2 months ago
On my phone so this might format badly, I've copy and pasted my prod config from app config ts. This is within the plugins array
[ "@bittingz/expo-widgets", { ios: { src: "./src/widgets/ios", devTeamId: "xxxx", mode: IS_DEV ? "development" : 'production', useLiveActivities: false, frequentUpdates: false, moduleDependencies: [ 'UKBreakdown.swift' ], xcode: { configOverrides: { SWIFT_VERSION: '5.0', // required to avoid SwiftEmitModule normal arm64 Emitting\ module\ for\ UKZeroWidgetExtension (in target 'UKZeroWidgetExtension' from project 'UKZero') // IMPORTANT: must be enclosed in quotes as done below '"EXCLUDED_ARCHS[sdk=iphonesimulator*]"': "arm64", }, }, }, android: { src: "./src/widgets/android", widgets: [ { "name": "MyWidgetProvider", "resourceName": "@xml/breakdown_widget_info" } ], distPlaceholder: 'com.example.widget' } } ],
I've used the config in same way
[
"@bittingz/expo-widgets",
{
"ios": {
"src": "./widget/ios",
"devTeamId": "C9853PNBF7",
"mode": "production",
"moduleDependencies": [],
"useLiveActivities": false,
"frequentUpdates": false,
"entitlements": {
"any xcode entitlement the widget needs": "entitlement value"
},
"xcode": {
"configOverrides": {
"SWIFT_VERSION": "5.4"
}
}
}
}
]
But I get same error:
⚠️ Something went wrong running pod install
in the ios
directory.
Command pod install
failed.
└─ Cause: Unable to determine Swift version for the following pods:
terra-react
is integrated by multiple targets that use a different Swift version: GlucoSenseIncWidgetExtension
(Swift 5.4) and GlucoSenseInc
(Swift 5.0).It's strange. I've removed terra plugin and had success with prebuild command. I've restored terra and still has success with prebuild.
Your main project is swift 5 and you're changing the widget project to 5.4, which causes that error. They have to be the same so I would advise changing the config to swift 5.0
Also, prebuild after changing config or you won't get the updated iOS project. Use --clean to avoid problems
Yes I have now such config:
[
"@bittingz/expo-widgets",
{
"ios": {
"src": "./widget/ios",
"devTeamId": "C9853PNBF7",
"mode": "production",
"moduleDependencies": [],
"useLiveActivities": false,
"frequentUpdates": false,
"entitlements": {
"any xcode entitlement the widget needs": "entitlement value"
},
"xcode": {
"configOverrides": {
"SWIFT_VERSION": "5.0"
}
}
}
}
]
Thank you very much.
Where Can I specify this? https://github.com/gitn00b1337/expo-widgets?tab=readme-ov-file#overriding-xcode-options xcode: { configOverrides: { SWIFT_VERSION: '5.0', },
},
I've got such error:
Updating podfile ⠹ Running prebuildAdding entitlement group.com.app.glucosense.expowidgets to config ✔ Finished prebuild ⚠️ Something went wrong running
pod install
in theios
directory. Commandpod install
failed. └─ Cause: Unable to determine Swift version for the following pods:terra-react
is integrated by multiple targets that use a different Swift version:GlucoSenseIncWidgetExtension
(Swift 5.4) andGlucoSenseInc
(Swift 5.0).pod install --repo-update --ansi exited with non-zero code: 1