Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error run: Expected a type #96

Open
fukemy opened this issue Sep 6, 2022 · 4 comments
Open

error run: Expected a type #96

fukemy opened this issue Sep 6, 2022 · 4 comments

Comments

@fukemy
Copy link

fukemy commented Sep 6, 2022

plz help i got this error:
Screenshot 2022-09-06 at 11 48 26

@Fauzee26
Copy link

Fauzee26 commented Jan 5, 2023

hi, any update on this issue? i'm experience similar thing too

@wandersonsousa
Copy link
Contributor

I've got the same error running on M1 with reactnative 0.61.5 and Simulator Iphone 11.0

@wandersonsousa
Copy link
Contributor

For anyone having this issue, just put this import:

#import <PushKit/PushKit.h>

inside this file located at RNVoipPushNotification pod files:

RNVoipPushNotificationManager.h

@wandersonsousa
Copy link
Contributor

For anyone having this issue, just put this import:

#import <PushKit/PushKit.h>

inside this file located at RNVoipPushNotification pod files:

RNVoipPushNotificationManager.h

To maintain this update on every pod install, add this code to podfile

**This should be inside post_install do |installer|**
find_and_replace("../node_modules/react-native-voip-push-notification/ios/RNVoipPushNotification/RNVoipPushNotificationManager.h",
"#import <React/RCTEventEmitter.h>",
"#import <React/RCTEventEmitter.h>
#import <PushKit/PushKit.h>
")

This should go in the final of podfile
def find_and_replace(dir, findstr, replacestr)
Dir[dir].each do |name|
text = File.read(name)
replace = text.gsub(findstr,replacestr)
if text != replace
puts "Fix: " + name
File.open(name, "w") { |file| file.puts replace }
STDOUT.flush
end
end
Dir[dir + '*/'].each(&method(:find_and_replace))
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants