star-micronics / react-native-star-io10

react-native-star-io10 is a library for supporting application development for Star Micronics devices.
Other
91 stars 55 forks source link

iOS build fails on XCode 16 when using use_frameworks! :linkage => :static #125

Open 16thomas opened 1 month ago

16thomas commented 1 month ago

Description

iOS build fails on XCode 16 when using use_frameworks! :linkage => :static

Your device where the bug occurs

Your development environment

ProductName: macOS ProductVersion: 15.0 BuildVersion: 24A335

Also, the result of executing the command npx react-native info. System: OS: macOS 15.0 CPU: (8) x64 Apple M2 Memory: 40.99 MB / 16.00 GB Shell: version: "5.9" path: /bin/zsh Binaries: Node: version: 20.17.0 path: ~/.nvm/versions/node/v20.17.0/bin/node Yarn: version: 3.6.4 path: ~/.nvm/versions/node/v20.17.0/bin/yarn npm: version: 10.8.2 path: ~/.nvm/versions/node/v20.17.0/bin/npm Watchman: Not Found Managers: CocoaPods: version: 1.14.3 path: /usr/local/bin/pod SDKs: iOS SDK: Platforms:

To Reproduce

Steps to reproduce the behavior:

  1. Go to Podfile in example app -> example/ios/Podfile
  2. Add use_frameworks! :linkage => :static inside target 'example' do block in starting.
  3. Run pod install
  4. Build in xcode.

Expected behavior

Should build successfully.

Screenshots

Screenshot 2024-10-02 at 13 47 58

Additional context

Working fine if not using use_frameworks! :linkage => :static

bandit-ibayashi commented 1 month ago

@16thomas Thank you for posting your issue. Could you please confirm and let us know your StarXpand SDK or react-native-star-io10 version?

We have added support for use_frameworks in 1.6.0, so it would be very helpful if you could first tell us what version of the sample you are using.

Thank you in advance.

16thomas commented 1 month ago

@bandit-ibayashi Thanks for looking into the issue.

react-native-star-io10 version is 1.7.0, I know you guys have added the support for use_frameworks in 1.6.0, and that was working fine till XCode 15, but it stopped working in XCode 16.

It still builds fine with XCode 15. But not building on XCode 16.

bandit-ibayashi commented 1 month ago

@16thomas Thank you for letting us know the version of react-native-star-io10. We will investigate in more detail. Thank you for your patience.

lukhol commented 1 month ago

+1. I have the same errors on 1.7.0 version of the library when building with xcode 16. Do you have an estimated timeframe for when the issue will be resolved?

can-miki commented 1 month ago

@16thomas @lukhol Thank you for your cooperation. Based on our research, the build error can be avoided by upgrading the react-native library and manually resolving the build error.

16thomas commented 1 month ago

@can-miki I'm not able to find this assert.h file. Can you please help me with the path or full screenshot?

bandit-ibayashi commented 1 month ago

@16thomas Thank you for your confirmation. I found there are some environments where this error does not occur.

So could you first try the version of React Native used, 0.75.4, and see if build errors occur? If the same error occurs, you can probably refer to the relevant file from the error.

In my confirmation, I used our example SDK version 1.7.0. I have added use_frameworks! :linkage => :static to line 30 of the Podfile. In line with the addition of this setting, lines 20 and 38 regarding Flipper have been commented out.

# flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
# :flipper_configuration => flipper_config,

Then change ‘react-native’ in dependencies in package.json to ‘0.75.4’, and also make other libraries up-to-date. See the following image for details.

20241021T064551Z

After following the Usage instructions and executing the necessary commands, the project in the iOS folder was run and built in Xcode 16. No errors occurred during this procedure.

Thank you in advance.

16thomas commented 1 month ago

@bandit-ibayashi The build is still failing for me on react-native 0.75.4 and react-native-star-io10 1.7.0. And the build only fails react-native-star-io10.

Screenshot 2024-10-21 at 21 32 17
bandit-ibayashi commented 1 month ago

Thank you for letting us know your situation.

These errors did not occur in our environment, so I assume there is some difference.

The results of the npx react-native info command execution show that there are differences between the macOS version and the CPU. It is not yet clear whether this is relevant to the present results, but we would like to start our investigation from this point.

% npx react-native info   
System:
  OS: macOS 14.6.1
  CPU: (8) arm64 Apple M2
  Memory: 93.52 MB / 8.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 21.7.3
    path: /usr/local/bin/node
  Yarn:
    version: 1.22.22
    path: /usr/local/bin/yarn
  npm:
    version: 10.9.0
    path: /usr/local/bin/npm
  Watchman:
    version: 2024.07.01.00
    path: /usr/local/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /usr/local/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.0
      - iOS 18.0
      - macOS 15.0
      - tvOS 18.0
      - visionOS 2.0
      - watchOS 11.0
  Android SDK: Not Found
IDEs:
  Android Studio: 2023.1 AI-231.9392.1.2311.11330709
  Xcode:
    version: 16.0/16A242d
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 22.0.1
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.75.4
    wanted: 0.75.4
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false
16thomas commented 3 weeks ago

Thanks @bandit-ibayashi, waiting for some resolution.