Closed blueneel05 closed 4 years ago
Anybody there ?
I solved this issue by renaming the import statement to #import "rctdefines.h"
and searched for the file "rctdefines.h" from finder and adding the path of the file in header search path in RNSmtpMailer.a in Xcode.
Having the same issue here. @blueneel05 could you send a print of your code? Thanks
I found the source of the problem, it is on RNSmtpMailer.podspec
.
The source files are not being copied, the path "RNSmtpMailer/*/.{h,m}" is wrong, it should be "*.{h,m}" since the files and Podspec are at the same location, plus the you have to add s.dependency "mailcore2-ios"
as a dependency.
Podspec after fix:
Pod::Spec.new do |s|
s.name = "RNSmtpMailer"
s.version = "1.2.0"
s.summary = "RNSmtpMailer"
s.description = <<-DESC
RNSmtpMailer
DESC
s.homepage = "https://github.com/angelos3lex/react-native-smtp-mailer"
s.license = "MIT"
s.author = { "author" => "angelos3lex" }
s.platform = :ios, "7.0"
s.source = { :git => "https://github.com/angelos3lex/react-native-smtp-mailer.git", :tag => "master" }
s.source_files = "*.{h,m}"
s.requires_arc = true
s.dependency "React"
s.dependency "mailcore2-ios"
end
Hi @marciok, I was with the same error, I made the changes RNSmtpMailer.podspec and then run pod install, right after that this mistake stopped and another started. Error:
Apple Mach-O Linker Error Group no such file or directory: '/Users/acount/Library/Developer/Xcode/DerivedData/projectName-eehtedkfxgdaxhadldecpbhgjelx/Build/Products/Debug-iphonesimulator/libRNSmtpMailer.a'
First make sure that the files are being copied (pod is installed) RNSmtpMailer.h and RNSmtpMailer.m:
Clean your build on Xcode and try again
@marciok Thank you that was my problem, but I have a question Does this api work on the ios emulator?
@dionisio28 yes!
Hi again @marciok, I went back to work on the mailing project now, so I reinstalled the library in version 1.2.1, changed the path in RNSmtpMailer.podspec and added "mailcore2-ios" OK the project compiled, however when sending email it takes a while and soon after catch falls :(. edit - 1 -> OBS: I am using exactly the same setting on the Android device that works
Error Message
@dionisio28 It looks like a problem with your SMTP server, check the credentials.
I am getting error "null is not an object (evaluating reactNativesmtpmailer.default.sendmail)" when trying to send an email. I have used automatic linking.
And when I follow the steps for manual linking and when I try to send an email I get error "'React/RCTDefines.h' file not found".
Works fine on android. Only IOS part has issue I am using RN 0.60. Any help ?