Adds Heyzap integration to React Native on Android and iOS.
- node >= 4.1
- rnpm >= 1.6
$ rnpm install react-native-heyzap
After rnpm
has linked the package, there are still a few steps required.
Create a new group in your project called 'Frameworks', then right-click and
select 'Add Files to...'. Find the HeyzapAds.framework
file, and check the 'Copy items
if needed' option.
Then go to 'Build Phases > Link Binary With Libraries' and add libxml2
and
libsqlite3
.
Finally, open 'Libraries' from the navigator, and expand Heyzap.xcodeproj
. If
it already has a HeyzapAds.framework
file, remove it and re-add as before.
Add the following to your index.js
:
let Heyzap = require('react-native-heyzap');
class AwesomeApp extends Component {
constructor(props) {
super(props);
Heyzap.initialize('your-publisher-id');
}
}
You can then call any of the following methods:
Heyzap.showDebugPanel();
Heyzap.showInterstitialAd();
Heyzap.fetchVideoAd();
Heyzap.showVideoAd();
Heyzap.fetchIncentivizedAd();
Heyzap.showIncentivizedAd();
The MIT License (MIT). Please see License File for more information.