i have a file locate in web-app in my grails project.. in the config file for some apns plugin in put the config as the following
environments {
development {
apns {
pathToCertificate = "web-app/apns-dev.p12"
password = "password"
environment = "sandbox"
}
}
test {
apns {
pathToCertificate = "web-app/apns-dev.p12"
password = "password"
environment = "sandbox"
}
}
production {
apns {
pathToCertificate = "apns-prod.p12"
password = "password"
environment = "production"
}
}
}
the reason i put the p12 of production without "web-app" is because i've noticed that the file located on production under the root directrly but it give me fileNotFoundException.. so how can i locate it?
The apns plugin page states
If you don't have access to your server's file system, you can also replace pathToCertificate by certificateResourcePath and set it to the path of your certificate, relative to src/java. So for example, if your certificate is in src/java/mycert.p12, you can set certificateResourcePath=mycert.p12.
This is probably your best bet, allowing you to use paths relative to src/java rather than absolute paths.