missing null checks for pointers
Export works in xcode. Testing in shell