Can I run apps on iPhone without paying to be a developer? I am new to ios development.

I am using Xcode 6.4 and iOS 8.4.1, when I'm trying to run my app on
my device I get this message from xcode:


  No valid signing identities (i.e. certificate and private key pair)
  matching the team ID “(null)” were found.
  
  Xcode can attempt to fix this issue.


And when clicking "Fix issue" it suggesting me to enrol Apple's dev program. I would rather not be a paid developer - is that the only way forward?
You need to make your apps in Xcode 7 to run on your iDevice without any developer program. You need to sign in with your Apple ID. For more details visit the Xcode 7 site. It's in beta 6 now.

https://developer.apple.com/xcode/

If you need Xcode 6 or lower, paying the fee is the only alternative.