https://github.com/below/exposwiftissue
Demostrate an Issue with the generated Swift Header for Expo
https://github.com/below/exposwiftissue
Last synced: about 1 year ago
JSON representation
Demostrate an Issue with the generated Swift Header for Expo
- Host: GitHub
- URL: https://github.com/below/exposwiftissue
- Owner: below
- Created: 2023-05-12T21:41:26.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-13T07:59:02.000Z (almost 3 years ago)
- Last Synced: 2025-01-26T02:44:06.276Z (about 1 year ago)
- Language: Java
- Size: 605 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ExpoSwiftIssue
Demostrate an issue with the automatically generated Swift Header and Objective-C++, here in the case of an Expo App.
## Primary Objective
In an Expo Project, I want to access Swift Code that is local to the native iOS application in the AppDelegate. When using `#import "SwiftIssue-Swift.h` the following error is reported:
```
Cannot find interface declaration for 'ModulesProvider', superclass of 'ExpoModulesProvider'
```
## Apparent reason
This happens, because `AppDelegate.mm` is an Objective-C++ file. Importing the header in a different, pure Objective-C file is [not an issue](https://github.com/below/ExpoSwiftIssue/tree/working).
## Running the sample
To run the sample and see the error, you will have to do the usualy Expo schenanigans (it hurts me more than it hurts you). In the main project directory, execute in the terminal:
```shell
npm install
(cd ios & pod install)
```
After this, you can `xed ios` and build like usual