gitn00b1337 / expo-native-fonts

5 stars 4 forks source link

Target not being set when multiple targets available #5

Open jottenlips opened 1 month ago

jottenlips commented 1 month ago

Example: https://github.com/Vestaboard/expo-native-fonts/pull/1

jottenlips commented 4 weeks ago
Screenshot 2024-06-20 at 10 49 51 AM

Tried recreating the issue and solving it on a fork, this may be a bug in expo-config plugins. Going to try upgrading that package to the latest to see if it resolves. https://github.com/expo/config-plugins

jottenlips commented 4 weeks ago

logs from above xcode project:

✔ Updated package.json and added index.js entry point for iOS and Android
› Installing using npm
> npm install
Updating Info.plist files
plistFilePath: /Users/johnottenlips/vestaboard/expo-native-fonts/example/ios/exponativefontsexampleWidgetExtension/Info.plist
Copying files
SourceDir: /Users/johnottenlips/vestaboard/expo-native-fonts/example/fonts
TargetDir: /Users/johnottenlips/vestaboard/expo-native-fonts/example/ios/Fonts
Font files copied to ios/Fonts
Adding fonts to target exponativefontsexampleWidgetExtension
Font files:
[
  'Montserrat/Montserrat-Black.ttf',
  'Montserrat/Montserrat-BlackItalic.ttf',
  'Montserrat/Montserrat-Bold.ttf',
  'Montserrat/Montserrat-BoldItalic.ttf'
]
Searching for target exponativefontsexampleWidgetExtension
Target UUID: E8F07E52AAB34508AF54FEE8 "exponativefontsexampleWidgetExtension"
Adding resource file Montserrat/Montserrat-Black.ttf
Adding resource file Montserrat/Montserrat-BlackItalic.ttf
Adding resource file Montserrat/Montserrat-Bold.ttf
Adding resource file Montserrat/Montserrat-BoldItalic.ttf
Resource files copied successfully.

Must be a bug in addResourceFileToGroup

jottenlips commented 4 weeks ago

still an issue as of @expo/config-plugins 8.0.5

jottenlips commented 4 weeks ago

https://github.com/expo/config-plugins/issues/239

gitn00b1337 commented 4 weeks ago

Will try get something over next week or if you have the time, the addResourceFile in this might work:

https://github.com/apache/cordova-node-xcode/blob/master/lib/pbxProject.js#L473

You shouldnt need to install, I believe its already included in expo modules.

jottenlips commented 4 weeks ago

thanks so much, I'll take a look at the cordova project

gitn00b1337 commented 3 weeks ago

There seems to be some bugs within the xcode project generation library, I'm getting some serious grief with missing tags within the project file when using different methods. I'll try dig out some time again later in the week, but in short - there be dragons.

jottenlips commented 3 weeks ago

Sounds good, I have a workaround for now. Instead of letting EAS run the prebuild, I am prebuilding our project locally, checking the target box, and committing the ios and android folders. This makes it so EAS only runs pod install and won't recreate the project file with the font bundled in with the correct targets checked.